ERPNext is based on Frappe, a full-stack web application framework written in Python that takes full advantage of the Node/JavaScript runtime environment and uses MariaDB as its database backend. One of the many advantages of Frappe-based applications, like ERPNext, is the bench command-line utility. The bench CLI saves administrators time by automating tasks such as installing, updating, configuring, and managing multiple Frappe/ERPNext sites.
In this tutorial you will install and configure an ERPNext stack on one server running Ubuntu 20.04. This will allow you to configure your stack for various development or production environments depending on your needs, and it will prepare you to build a more complex, fault-tolerant architecture.
Now you will add MariaDB to your server stack. ERPNext 12 requires MariaDB 10.2+ for proper operation. Because Ubuntu 20.04 includes MariaDB 10.3 in its official repositories you can install this version using the apt command:
Now that your database backend is ready you can continue setting up your ERPNext web application. In this section, you will learn how to install and configure all components required by ERPNext 12 and then install the application itself.
The DEBIAN_FRONTEND=noninteractive variable has been passed to the installation command in order to avoid Postfix prompts. For detailed information regarding Postfix configuration please read our guide on How To Install and Configure Postfix on Ubuntu 20.04
setuptools facilitates the installation and upgrading of Python packages, cryptography adds encryption capabilities to your stack, and psutil aids with system monitoring. Now that you have installed all necessary global dependencies, you will now install all the services and libraries required by ERPNext 12.
Whether you are installing the ERP system for development or for production, you are now ready for the next step, which is installing the Frappe full-stack framework and the actual ERPNext 12 web application.
This guide is assuming that you are installing ERPNext 12 for testing/production scenarios and thus that you are using the master branch. But if your intention is to develop applications or custom ERPNext modules, then the develop branch might be a better option. In either case, you are now prepared to install the Frappe Framework. This will be your final step before installing ERPNext itself.
Note: The bench init process could halt if a spawn ENOMEM error is encountered. This error is caused when your system runs out of memory. You must fix the issue before continuing, either by installing more physical memory or allocating SWAP space.
The above will initiate a real-time monitoring console showing you various messages regarding the webserver and other services. Open a web browser and navigate to localhost:8000 (for local installations) or your_domain:8000 (if you are using a remote server). You will see the ERPNext login screen (we will proceed with login and setup in a later step, once we have made our site production-ready).
If your main goal is creating modules or modifying ERPNext 12, then you could stop at this point. No more components are needed for development purposes. However, if what you need is a production-ready system that does not require a manual initialization, then you will need to install and configure a few additional components. This is your next step.
Up to this point, you have installed and configured ERPNext 12 manually, which has allowed you to customize the process to match any particular use case. Nevertheless, for the rest of the production setup, you can leverage the convenience of the bench CLI and let it automate the installation and configuration of these remaining services.
Now that you have properly installed your ERPNext 12 application, you might want to start implementing the system for your business needs. A good starting point is clicking the Getting Started button on the ERPNext Dashboard. ERPNext will then help you configure the platform for all your business and e-commerce needs.
Hi! Followed your Ubuntu guide carefully but nothing showed on port 80 web. (Have done similar V14 install on latest Stream and Fedora releases with the same results.)
Here is the error when I bench restart:
Hello Shashank!
Thank you so much for this guide. Recently I was able to install v13 with my own collected infos, but I never got to work production mode or the correct creation of PDF files.
I used your guide to install a new VM. I have a Proxmox server and I used the LXC Ubuntu 22.04 template.
Everything installed fine and it is much better than my own install guide.
I have one remaining issue: When i create an offer and I want to create&download the offer-PDF-file, then the PDF is zoomed in and the outer edges of the page are missing.
Do you have an idea how to solve this?
Thank you very much for your work!
Edit: It might be this bug:
Thanks for the update on this. Some installations might require additional configuration to be done in MariaDB cnf files as well. This was required in v13 but for v14 I tried with just the my.cnf file and it did work.
The ERPNext is a trending ERP software intended for the use of small to medium-sized businesses. It comes with highly user-friendly operations. The following article is all about configuring an Ubuntu system for ERPNext and making it up and running. The process is not that complex, but there can be some stuff that you might need help with. Here we have tried our best to present you with clear guidelines for a smooth installation experience.
That is it then! Now you have a successful installation of the ERPNext of your Ubuntu server. From now on, you are free to use ERPNext for your business operations. We hope that you will find it interesting.
1. A clean LTS Ubuntu server installation is recommended.
2. Terminal Access to your server via SSH or direct terminal access.
3. Root Access for system-level operations.
4. Internet Connection for downloading packages during the installation process.
It will be a good practice if you run the system update command on our Linux before installing some new package after some time. It is not only going to install the latest available updates for your system packages but even refresh the APT index cache.
So, this was the tutorial in which we not only tried to cover the installation of ERPNext on the Ubuntu server in detail but also the solutions to problems we faced while setting it up. In case you want some more info, can see the the official documentation.
You will need to install all the prerequisites that include tools and applications like git, python, node js, Redis, MariaDB, yarn wkhtmltopdf, cron, and Nginx. let us install all of them by using the below commands;
You can now install the database, I will be using the same server for the database and application, which is recommended. Let us see how to install, secure and configure the database service on Ubuntu Server for ERPNext.
Now you must ensure that the native password is configured, which will help the frappe framework automatically create the database when you create the site. For this, you will need to login to MySQL as root and then update the root user or the user that you want to use. I will be using root for my installation so use the below commands
Now at this step close the termination and open it again. Or open a new terminal to continue with the next step. Ensure you do it. Once you have done run the below command to install the node
Let us now create the frappe-bench environment. Here you have to decide the purpose for which you are installing ERPNext, it is just for test or training then you can use the latest version, which will be developing and may not be stable. However you can also use a stable version by choosing a specific version, You can search and learn which is the stable version today.
To choose a specif version you can use the branch version. I will be using branch version 13 in this installation. You can look for the latest stable release of the frappe environment. This guide will perfectly work for Version 13, for other versions you might need to install relevant version of Other pre-requisites, please visit latest release on Frappe Github
Now you need to get the app from the frappe repository, have two options, either clone the latest development package, which is not stable currently, or install the stable package. I have given both options for you to choose from.
Now run the below command to install the certificate to your site. Make sure you have the public address of the site and that port 80 is open. If this address is local make sure the site address is pointing to the correct IP address.
( If Ubuntu version of your instance is 20+, most probably your Python is 3.8 and node is 12. For Frappe and ERPNext version 14, it is mandatory to have Python 3.10 and Node 16+. We have explained the upgrading procedures in this document ( -forum/erpnext-upgrade-from-version-13-to-version-14-ubnutu . Use that document to prepare server. Please do that and come back here to continue. If you are not sure about Ubuntu version please type this command cat /etc/os-release )
sudo apt-get install python3-dev python3.11-dev python3-setuptools python3-pip python3-distutils software-properties-common xvfb libfontconfig wkhtmltopdf libmysqlclient-dev -y
14:29:30 web.1 * Running on 192.168.43.196:8000 (my vm ip) (Press CTRL+C to quit) -- This is not coming..which results i cannot access erpnext from any other system in my network. even inside vm i cannot access using ip address. pls help to solve this
ERPNext recommends that a VPS should have at least 1GB RAM but after I installed this, RAM usage appeared to be between 1-2GB. Using 1GB RAM would not completely load (although I have read that others have been successful while using only a few users), so the minimum required should be 2GB RAM.
b9b4d2437c