Skip to content
Follow
CMS

How to Install ERPNext on Ubuntu 24.04

Richard
Written by
Richard
Jan 30, 2025 Updated Jul 13, 2026 6 min read
How to Install ERPNext on Ubuntu 24.04
How to Install ERPNext on Ubuntu 24.04

ERPNext on Ubuntu 24.04 installs by running a series of commands and setup steps on your computer.

ERPNext is a free and open-source system that helps businesses manage important tasks. These include things like company money, employee records, making products, and keeping track of stock.

This guide shows you exactly how to set up ERPNext on Ubuntu 24.04 LTS, codenamed "Noble Numbat." This is the newest version that gets long-term support.

Putting ERPNext onto Ubuntu 24.04 gives you a strong and affordable way to run your business more smoothly.

⚡ Quick Answer

Install ERPNext on Ubuntu 24.04 by first updating packages and installing dependencies like Python, Node.js, Redis, and MariaDB. Then, create a user, set up the bench command-line tool, and finally initialize and build your ERPNext site.

Install dependencies

To successfully install ERPNext on Ubuntu 24.04, you must first update your system and install the necessary package dependencies. This involves running commands to upgrade your current Ubuntu system and then installing specific packages like libffi-dev and python3-pip, which are crucial for ERPNext to function correctly.

Run the command below to update and upgrade Ubuntu.

🐧Bash / Shell
sudo apt update
sudo apt upgrade

Next, run the command below to install these package dependencies.

🐧Bash / Shell
sudo apt-get install libffi-dev python3-pip python3-dev  python3-venv python3-testresources libssl-dev wkhtmltopdf gcc g++ make curl git

Install Node.js and Redis

ERPNext requires Node.js and Redis to operate, so the next step in the installation process is to get these essential components onto your Ubuntu system. You’ll install Node.js and Redis server, along with the yarn package manager, using a single command to streamline the setup.

Also, install the Redis server and yarn by running the next command.

🐧Bash / Shell
sudo curl --silent --location https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt-get install nodejs redis-server
sudo npm install -g yarn

Install MariaDB

A database server is essential for ERPNext to store its data, and this section guides you through installing and setting up MariaDB on your Ubuntu system. You’ll use simple terminal commands to install the MariaDB database server, which will then be ready to support your ERPNext installation.

To install and use the MariaDB database server, use the instructions below.

Open the Ubuntu terminal and run the commands below to install the MariaDB database server.

🐧Bash / Shell
sudo apt update
sudo apt install mariadb-server

Once the MariaDB database server is installed, use the commands below to stop, start, and enable the MariaDB server to start automatically when the server boots.

🐧Bash / Shell
sudo systemctl stop mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

Run the following commands to validate and test if the MariaDB database server is installed successfully.

🐧Bash / Shell
sudo mariadb

Once you run the commands above, it will log you onto the MariaDB console and display a message similar to the one below.

💻Code
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 32
Server version: 10.11.2-MariaDB-1 Ubuntu 23.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> 

The message tells you that the server is installed successfully.

Once MariaDB is installed, run the command below to set the root password.

First, log on to the database by running the sudo mariadb command.

💻Code
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'type_password_here';
FLUSH PRIVILEGES;
exit

Additional help on installing MariaDB.

Configure ERPNext

After installing all the required software, you can begin to configure ERPNext by creating a special system user just for it and setting up its working environment. This involves creating an ‘erpnext’ user, giving it necessary permissions, and then logging in as that user to prepare its home directory for ERPNext.

🐧Bash / Shell
sudo useradd -m -s /bin/bash erpnext
sudo passwd erpnext
sudo usermod -aG sudo erpnext
⚠️Warning
Next, log in to the ERPNext user and set up the environment variables by running the command below.
💻Code
su - erpnext
nano ~/.bashrc

Add the line below at the end of the file and exit.

💻Code
PATH=$PATH:~/.local/bin/

Save and close the file, then activate the environment variable with the following command:

💻Code
source ~/.bashrc

While still switched to the erpnext user, create a directory in /opt called bench.

🐧Bash / Shell
sudo mkdir /opt/bench
sudo chown -R erpnext:erpnext /opt/bench

Next, change into the /opt/bench directory and clone the bench repository from GitHub.

Command Prompt
cd /opt/bench
git clone https://github.com/frappe/bench bench-repo

Next, install using the pip3 command.

💻Code
pip3 install -e bench-repo
⚠️Warning
If you run the command above and get an the “Externally Managed Environment” error, fix it by running the command below.
💻Code
python3 -m pip config set global.break-system-packages true
sudo python3 -m pip config set global.break-system-packages true

Rerun the failed command above.

Once installed, initialize the bench directory using the command below.

💻Code
bench init erpnext

Next, change into the erpnext directory and create a new site with the following command:

Command Prompt
cd /opt/bench/erpnext
bench new-site erpnext.example.com

After running the command above, type the database root password created above to begin the installation.

💻Code
Enter mysql super user [root]: 
MySQL root password:

Installing frappe...
Updating DocTypes for frappe : [====================] 100%
Set Administrator password:
Updating Dashboard for frappe
erpnext.example.com: SystemSettings.enable_scheduler is UNSET
*** Scheduler is disabled ***

At this point, ERPNext should be installed and ready to use locally.

You can start the bench service using the command below.

💻Code
bench start

Accessing ERPNext Portal

Now that ERPNext is installed open your browser and browse to the server IP hostname, followed by port 8000.

💻Code
http://erpnext.example.com:8000
ERPnext login portal
ERPnext login portal

Continue with the wizard.

ERPnext login wizard
ERPnext login wizard

Create an admin account.

ERPnext account
ERPnext account

Complete the setup.

ERPnext complete
ERPnext complete

ERPNext should be ready to use.

ERPnext admin portal
ERPnext admin portal

Configure ERPNext for production

To run ERPNext smoothly in a live production environment, you need to set up a web server like Nginx and a tool called Supervisor to manage the application. These steps involve installing both Supervisor and Nginx, and then installing the ‘frappe-bench’ tool, which is the core framework for ERPNext.

You can do that with the steps below.

First, switch to the erpnext account and install Nginx.

💻Code
su - erpnext
sudo apt-get install supervisor nginx

Then, install frappe-bench using the command below.

🐧Bash / Shell
sudo pip3 install frappe-bench

Next, change into the /opt/bench/erpnext folder and setup ERPNext for production environment by running the command below.

Command Prompt
cd /opt/bench/erpnext
sudo /home/erpnext/.local/bin/bench setup production erpnext

If everything is right, you should see an output similar to the one below.

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

Site erpnext.example.com 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

You can now access the portal using the domain name.

That should do it!

Conclusion:

Installing ERPNext on Ubuntu 24.04 is a straightforward process that can enhance your business operations. Here are key takeaways:

  • Comprehensive ERP Solution: ERPNext provides an all-in-one platform for managing various business functions such as finance, human resources, and inventory.
  • Cost-Effective: Leveraging Ubuntu as the operating system ensures a stable and budget-friendly environment.
  • Simple Installation Process: The step-by-step guide makes it easy for users to install and configure ERPNext.
  • Flexibility: Users can customize various features according to their specific business needs and workflows.
  • Production-Ready Setup: Additional steps allow for configuring ERPNext in a production environment for enhanced performance and reliability.
  • User-Friendly Access: Once installed, users can easily navigate the ERPNext portal for managing business operations efficiently.

By following the outlined steps, you can successfully implement ERPNext and take advantage of its powerful features for your organization.

Are frappe and ERPNext the same?

To understand the core distinction, think of it this way: the Frappe Framework is the foundation, and ERPNext is the fully functional house built on top of that foundation. Frappe is the Framework: Frappe is an open-source, full-stack web framework built with Python and JavaScript.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Install Etherpad on Ubuntu Linux
Ubuntu Linux How to Install Etherpad on Ubuntu Linux
How to Install JasperReports Server on Ubuntu Linux
CMS How to Install JasperReports Server on Ubuntu Linux
How to Install FreeScout with Nginx on Ubuntu Linux
CMS How to Install FreeScout with Nginx on Ubuntu Linux
How to Install NetData on Ubuntu 24.04
Ubuntu Linux How to Install NetData on Ubuntu 24.04

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *