Install ERPNext on Ubuntu 18.04

How to Install ERPNext on Ubuntu 18.04

 · 4 min read

How to Install ERPNext on Ubuntu 18.04

What is ERPNext?

ERPNext is a free and open-source integrated web-based ERP software developed by Frappe. ERPNext is used by manufacturers, distributors and services companies. In ERPNext offer large number of Apps like accounting, sales, CRM, purchasing, and many more. So let’s start how to install ERPNext on Ubuntu 18.04 manually.

Steps for Install ERPNext on Ubuntu 18.04

Step 1 Update and Upgrade APT

Update APT list of available packages and their versions. And use upgrade command to actually installs newer versions of the packages.

sudo apt-get update && sudo apt-get upgrade

Step 2 Install Python

First of all, you have to install Python 2.7 for ERPNext. Moreover, you can also verify Python version.

sudo apt -y install python-minimal

$ python -V
Python 2.7.15rc1

Step 3 Install Dependencies

You have to install the following dependencies.

sudo apt -y install git build-essential python-setuptools python-dev libffi-dev libssl-dev

Step 4 Install Python pip Tool

You need to execute the following command to install pip package manager.

sudo python

Execute the following command to verify that you have the latest version of pip and setuptools.

sudo pip install --upgrade pip setuptools

Install the ansible module using pip. Ansible pip module automates manage Python libraries and configuration.

sudo pip install ansible

Step 5 Install curl and yarn

First, you have to install curl.

sudo apt -y install curl

Later you have to configure the yarn package repository.

curl -sS | sudo apt-key add -
echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

Next, execute the following command to install yarn.

sudo apt -y update && sudo apt -y install yarn

Step 6 Install MariaDB

You have to run the following command to install MariaDB.

sudo apt -y install mariadb-server libmysqlclient-dev

When creating ERPNext database, you need to enable barracuda storage engine. So you need first to configure MariaDB configuration my.cnf file.

sudo nano /etc/mysql/my.cnf

Add the following lines at the end of my.cnf file.

character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

default-character-set = utf8mb4

Next, you have to restart MariaDB and enable it to auto start MariaDB at boot time.

sudo systemctl restart mariadb
sudo systemctl enable mariadb

Use the mysql_secure_installation tool to configure additional security options.

sudo mysql_secure_installation

This tool will ask if you want to set a new password for the MySQL root user and few security related questions.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!

Security questions, answer Y at the following prompts:

  1. Remove anonymous users?
  2. Disallow root login remotely?
  3. Remove test database and access to it?
  4. Reload privilege tables now?

Step 7 Install Nginx, Node.js and Redis

You have to add the Node source Node.js 8.x repository.

sudo curl --silent --location | sudo bash -

To install Nginx, Node.js and Redis on Ubuntu, run the commands below.

sudo apt -y install nginx nodejs redis-server

After installing, start and enable Nginx service to always start up with the boots.

sudo systemctl start nginx
sudo systemctl enable nginx

Start and enable Redis service to always start up with the boots.

sudo systemctl start redis-server
sudo systemctl enable redis-server

Step 8 Install wkhtmltopdf and fonts

Execute the following command to install wkhtmltopdf, fonts and other required dependencies.

sudo apt -y install libxrender1 libxext6 xfonts-75dpi xfonts-base

Download the compressed file of wkhtmltopdf and extract to /opt path.

sudo tar -xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -C /opt

Next, you have to create a soft link to access and execute wkhtmltopdf and wkhtmltoimage globally as a command.

sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
sudo ln -s /opt/wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage

Even more, you can check version of wkhtmltopdf.

$ wkhtmltopdf -V
wkhtmltopdf 0.12.4 (with patched qt)

Step 9 Install and Create Virtual Environment

A virtual environment is a tool that helps to keep separate dependencies by different projects to creating isolated python virtual environments for them. A virtual environment is the essential tools that most of the Python developers use.

First of all, in your home directory create new folder. Go to that folder.

mkdir erpnext
cd erpnext/

Run below command to install virtual environment.

sudo apt install virtualenv

Furthermore, you need to create virtual environment on “erpnext” directory using the following command.

virtualenv .

Even more, you have to activate virtual environment using below command.

source ./bin/activate

Step 10 Install Bench

Bench is a command line utility to install, manage multiple sites and manage the ERPNext application on a Unix-based system.

git clone bench-repo
sudo pip install -e bench-repo

Step 11 Create a new bench

The init command will create a bench directory with frappe framework installed.

bench init --frappe-branch master --frappe-path frappe-bench

Now you have to go frappe-bench directory,

cd frappe-bench/

Step 12 Get ERPNext Apps

Bench get-app command gets remote frappe apps from a remote git repository and installs them.

bench get-app --branch master erpnext

Step 13 Create new site

Frappe sites run frappe apps. So you have to create at least one site. Using the following command to create a new site.

bench new-site testsite

Step 14 Install Apps (Install ERPNext on Ubuntu 18.04)

Use the bench install-app command to install an app on your site.

bench --site testsite install-app erpnext

Step 15 Start bench

Use the bench start command to start using the bench.

bench start

Finally, go to your web browser open your server IP address with 8000 port number and you will see the ERPNext login screen. Here you have to log in with username “administrator” and password as per you set when you created the new site.

For support

Golive Solutions Co.

Contact us on

You can text us on WhatsApp

So we specialize in customizations, upgrades & migrations, support, implementations as well as custom extension development.

Golive Solutions

ERPNext Egypt Partner

No comments yet

No comments yet. Start a new discussion.

Add Comment