Install ERPNext ERP on Ubuntu 22.04 (Jammy Jellyfish)

Posted on 23 views

ERPNext is a simple yet free and open source ERP system written using Frappe framework – a full-stack web app framework in Python & JavaScript. In this guide, we will cover How to Install ERPNext ERP System on Ubuntu 22.04 Linux . ERPNext is a feature-rich enterprise ready ERP system which has good features like:

  • Accounting Management
  • Inventory Management
  • Manufacturing Management
  • Customer Relationship Management system
  • Sales Management
  • Purchase Management
  • Project Management
  • Huma Resource Management System and more.

ERPNext ERP system is fit for both small and medium enterprises. It comes with a well-baked web interface with all functionalities of an ERP system.

For Debian, use: Install ERPNext ERP System on Debian

Most ERPs can run slowly after installation. For example, you are waiting a long time for the report results, or it takes too much time to process data when loading. It is often the case, but you can quickly solve it by tuning the server or optimizing the database.

ERPNext Setup Pre-requisites:

  • Updated Ubuntu 22.04 (Jammy Jellyfish) Linux system
  • A user with sudo privileges
  • Python 3.10+
  • MariaDB Database Server
  • Nodejs, Nginx, yarn, redis, wkhtmltopdf

Install ERPNext on Ubuntu 22.04 (Jammy Jellyfish)

Let’s start ERPNext installation by making sure our system is updated:

sudo apt update
sudo apt -y upgrade

It is recommended to reboot your system whenever you do upgrade:

[ -f /var/run/reboot-required ] && sudo reboot -f

Step 1: Install Python Tools & wkhtmltopdf

Start the installation process by ensuring all Python build packages required to build and setup ERPNext are installed.

Install Python 3.10 on your Ubuntu system:

sudo apt install git python3 python3-dev python3-pip python3-venv

Install other utilities required.

sudo apt update
sudo apt -y install vim libffi-dev xvfb libfontconfig libssl-dev wkhtmltopdf  redis-server

Step 2: Install Redis and Node.js

To install Redis and Node.js on Ubuntu 22.04, run the commands:

sudo curl --silent --location | sudo bash -
sudo apt -y install gcc g++ make nodejs redis-server
sudo npm install -g yarn

Step 3: Install Nginx and MariaDB Database server

Next step is to Nginx and MariaDB for serving ERPNext and storing database data respectively.

Install Nginx using:

sudo apt -y install nginx

For installation of MariaDB server on Ubuntu:

sudo apt install mariadb-server -y

Ensure you have the following settings for mysqld and mysql client as provided:

$ sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation_server = utf8mb4_unicode_ci

$ sudo vim /etc/mysql/mariadb.conf.d/50-client.cnf
default-character-set = utf8mb4

Comment out other character set lines

$ sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
# * Character sets

# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
# utf8 4-byte character set. See also client.cnf
#character-set-server  = utf8mb4
#collation-server      = utf8mb4_general_ci

After the installation of MariaDB database server, you should create a database for erpnext user.

sudo systemctl restart mariadb

Change authentication plugin.

$ sudo mysql -u root
USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';

Set root password

$ sudo mysql_secure_installation
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Step 4: Install Bench and ERPNext

A bench is a tool used to install and manage ERPNext on your Ubuntu system. We will create a user that will run the ERPNext system, then configure the system.

sudo useradd -m -s /bin/bash erpnext
sudo passwd erpnext
sudo usermod -aG sudo erpnext

Update your PATH.

$ sudo su - erpnext
tee -a ~/.bashrc<source ~/.bashrc

Create a directory for ERPNext setup and give erpnext user read and write permissions to the directory:

sudo mkdir /srv/bench
sudo chown -R erpnext /srv/bench

Next switch to erpnext user and install the application:

cd /srv/bench

Now install bench using pip command:

sudo pip3 install frappe-bench

Confirm the bench installation by checking version

$ bench --version

The next step is to initialize the bench directory with frappe framework installed:

cd /srv/bench
bench init frappe-bench

A sample output is:

Production mode
✔ Built js/moment-bundle.min.js
✔ Built js/libs.min.js

Building frappe assets...

✔ Built js/checkout.min.js
✔ Built js/dialog.min.js
✔ Built js/social.min.js
✔ Built js/web_form.min.js
✔ Built js/list.min.js
✔ Built js/chat.js
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
✔ Built css/tailwind.css
✔ Built js/desk.min.js
✔ Built css/frappe-rtl.css
✔ Built css/printview.css
✔ Built js/barcode_scanner.min.js
✔ Built js/bootstrap-4-web.min.js
✔ Built js/frappe-recorder.min.js
✔ Built css/list.min.css
✔ Built css/report.min.css
✔ Built frappe/css/email.css
✔ Built js/frappe-web.min.js
✔ Built css/frappe-chat-web.css
✔ Built css/form.min.css
✔ Built js/control.min.js
✔ Built js/form.min.js
✔ Built css/web_form.css
✔ Built css/desk.min.css
✔ Built css/frappe-web-b4.css
✔ Built js/data_import_tools.min.js
✔ Built js/report.min.js
✨  Done in 100.386s
Done in 101.55s.
INFO:bench.utils:setting up backups
SUCCESS: Bench frappe-bench initialized

Create a new Frappe site, don’t forget to replace with your own domain.

$ cd frappe-bench
$ bench new-site 
MySQL root password: 

Installing frappe...
Updating DocTypes for frappe        : [========================================]
Updating country info               : [========================================]
Set Administrator password: 
Re-enter Administrator password: 
*** Scheduler is disabled ***

The above command will ask you to provide the MySQL root password and set a new password for the administrator account for the web interface. Wait for the new Frappe site to be created, then

Step 5: Starting ERPNext application and access UI

Once the application is deployed, you can start it using the command:

$ bench start

When the program is running, you should get:

21:17:12 watch.1          | yarn run v1.22.19
21:17:12 watch.1          | $ node esbuild --watch --live-reload
21:17:12 web.1            | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
21:17:12 web.1            |  * Running on all addresses (
21:17:12 web.1            |  * Running on
21:17:12 web.1            |  * Running on
21:17:12 web.1            | Press CTRL+C to quit
21:17:12 web.1            |  * Restarting with stat
21:17:14 web.1            |  * Debugger is active!
21:17:14 web.1            |  * Debugger PIN: 811-922-435
21:17:15 watch.1          | clean: postcss.plugin was deprecated. Migration guide:
21:17:15 watch.1          |

From the output, you can confirm the service is running on To access the web interface, open the server IP address and port http://ip-address:8000.

Step 6: Configure Nginx and Supervisord

Install supervisor:

sudo apt -y install supervisor

Run production configuration script:

$ sudo bench setup production erpnext
PLAY [setup bench and dev environment] ***************************************************************************************************************************************************************

TASK [Gathering Facts] *******************************************************************************************************************************************************************************
task path: /usr/local/lib/python3.10/dist-packages/bench/playbooks/site.yml:40
<> EXEC /bin/sh -c 'echo ~root && sleep 0'
<> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1661808076.6268294-8278-222201978895155 `" && echo ansible-tmp-1661808076.6268294-8278-222201978895155="` echo /root/.ansible/tmp/ansible-tmp-1661808076.6268294-8278-222201978895155 `" ) && sleep 0'
Using module file /usr/local/lib/python3.10/dist-packages/ansible/modules/
<> PUT /root/.ansible/tmp/ansible-local-7704nxsoekge/tmp9qq7xbh6 TO /root/.ansible/tmp/ansible-tmp-1661808076.6268294-8278-222201978895155/
<> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1661808076.6268294-8278-222201978895155/ /root/.ansible/tmp/ansible-tmp-1661808076.6268294-8278-222201978895155/ && sleep 0'
<> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1661808076.6268294-8278-222201978895155/ && sleep 0'
<> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1661808076.6268294-8278-222201978895155/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers
META: ran handlers
META: ran handlers

PLAY RECAP *******************************************************************************************************************************************************************************************
localhost                  : ok=8    changed=5    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0

Setting Up supervisor...
Setting Up NGINX...
Port configuration list:

Site assigned port: 80
Setting Up symlinks and reloading services...
$ sudo /usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
$ sudo systemctl reload nginx

Generated Nginx file is placed under: /etc/nginx/conf.d/frappe-bench.conf and supervisor config file /etc/supervisor/conf.d/frappe-bench.conf.

If you find supervisor configuration missing rerun setup commands:

 sudo bench setup production erpnext

Confirm nginx service is running:

$ systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-08-29 20:59:59 UTC; 37min ago
       Docs: man:nginx(8)
    Process: 8365 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS)
   Main PID: 5535 (nginx)
      Tasks: 2 (limit: 2258)
     Memory: 3.4M
        CPU: 51ms
     CGroup: /system.slice/nginx.service
             ├─5535 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             └─8366 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Warning: some journal files were not opened due to insufficient permissions.

Open your application domain configured to login.

Proceed with web based configuration.


You should get a page to login. Use the username Administrator and the password you provided during setup.


Select the language of your choice and click “Next“. Next select country, it will fill currency automatically.



Add the first user with email and password and click “Complete Setup” button.

When done, you should get to ERPNext web dashboard.




Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.