Skip to content
Follow
CMS

How to Install ERPNext on Ubuntu 24.04

Richard
Written by
Richard
Jan 30, 2025 Updated Sep 15, 2026 5 min read
How to Install ERPNext on Ubuntu 24.04
How to Install ERPNext on Ubuntu 24.04

ERPNext on Ubuntu 24.04 LTS sets up a complete, free business management system on your server to handle company money, employee records, manufacturing, and inventory all in one place. Getting the software running takes about 20 to 30 minutes using the command line on a fresh server installation.

Advertisement
⚡ 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.

Advertisement

Install dependencies

System dependencies and software packages must be installed before you can install ERPNext Ubuntu 24.04. Update your system packages and install essential tools like Python and build tools using your terminal to prepare your server for the installation process.

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

Node.js and Redis are required backend services to install ERPNext Ubuntu 24.04 successfully. You must install the correct Node.js version, the Redis server for caching, and the yarn package manager to handle the JavaScript dependencies used by the application.

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

Advertisement
🐧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

MariaDB acts as the primary database server to store all your application data when you install ERPNext Ubuntu. You need to install the database server, secure the root installation, and configure the character set settings for the application to work properly.

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.

Advertisement
🐧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.

Advertisement

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

A dedicated system user helps you configure ERPNext Ubuntu securely without running applications as the root user. Create a new user account with home directory access, assign proper permissions, and switch to that user account before downloading the application files.

🐧Bash / Shell
sudo useradd -m -s /bin/bash erpnext
sudo passwd erpnext
sudo usermod -aG sudo erpnext
⚠️WarningNext, log in to the ERPNext user and set up the environment variables by running the command below.
Advertisement
💻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.

Advertisement
⬛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
⚠️WarningIf 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.

Advertisement
💻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

Production environments require Nginx as a web server and Supervisor as a process manager to keep your application running reliably. Install these tools alongside the Frappe framework command-line tool to set up automatic restarts and handle live web traffic.

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.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

📚 Related Tutorials

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

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

Leave a Comment

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