How to Install ERPNext Version 15 on Ubuntu 24.04: A Complete Step-by-Step Guide

ERPNext is a robust open-source ERP system that streamlines business operations across various domains. This guide provides detailed instructions to install ERPNext Version 15 on Ubuntu 24.04, ensuring a smooth setup for both development and production environments.


โœ… Prerequisites

Software Requirements:

  • Ubuntu 24.04
  • Python 3.11+
  • pip 20+
  • MariaDB 10.3.x
  • Node.js 18+
  • Yarn 1.22+
  • Redis 5+
  • wkhtmltopdf (with patched Qt)
  • Supervisor (for process management)
  • NGINX (for production setups)

Hardware Requirements:

  • 8GB RAM
  • 40GB Hard Disk

Server Settings

After installing your Ubuntu Server 24.04, do the below steps.

Setup correct Date and Timezone

Check the serverโ€™s current timezone

date

Check the List of Available Timezone

timedatectl list-timezones

Set correct timezone as per your region, Need more help in setting Timezone check here.

timedatectl set-timezone "Asia/Kolkata"

๐Ÿ› ๏ธ Step 1: Update System Packages

Begin by updating your system to ensure all packages are current:

sudo apt update -y && sudo apt upgrade -y

๐Ÿ‘ค Step 2: Create a Dedicated User for ERPNext

It’s advisable to run ERPNext under a non-root user for security reasons:

sudo adduser frappe
sudo usermod -aG sudo frappe
su frappe
cd /home/frappe

๐Ÿ“ฆ Step 3: Install Required Dependencies

Install essential packages and libraries:

Git:

sudo apt install git

python-dev

sudo apt-get install python3-dev -y

setuptools and pip

sudo apt-get install python3-setuptools python3-pip -y

virtualenv

sudo apt install python3.12-venv -y

๐Ÿ—ƒ๏ธ Step 4: Install and Configure MariaDB

1. Install MariaDB server:

sudo apt install mariadb-server mariadb-client -y

2. Secure the MariaDB installation:

sudo mysql_secure_installation

Follow the prompts:

  • Enter your current password for root (enter for none): Press “Enter” if no password is set.
  • Switch to unix_socket authentication [Y/N]: Y
  • Change the root password [Y/n]: Y (if desired)
  • Remove anonymous user [Y/N]: Y
  • Disallow root login remotely? [Y/n]: N
  • Remove test database and access to it? [Y/n]: Y
  • Reload privilege tables now? [Y/n]: Y

3. Edit the MariaDB configuration file:

 sudo nano /etc/mysql/my.cnf

Add the following lines:

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

4. Restart MariaDB:

 sudo service mysql restart

๐Ÿ”ฅ Step 5: Install Redis Server

Redis is used for caching and background job processing:

sudo apt install redis-server -y

๐ŸŒ Step 6: Install cURL, Node, NPM and Yarn

CURL:

sudo apt install curl

Node:

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 22

NPM:

sudo apt-get install npm -y

Yarn:

sudo npm install -g yarn -y

๐Ÿงฐ Step 7: Install wkhtmltopdf

This tool is necessary for generating PDF reports.

sudo apt install xvfb libfontconfig wkhtmltopdf -y

๐Ÿ› ๏ธ Step 8: Install Frappe Bench

Frappe Bench is a command-line tool to manage Frappe applications:
In this step, we need to supply the โ€“ H and โ€“break-system-packages flags. The flags do the following:

  • –break-system-packages: Overrides the default behavior of pip to avoid breaking system packages. This flag is used to indicate that you are aware that this installation might cause conflicts with the system package manager, but you want to proceed anyway.
  • -H: Sets the HOME environment variable to the home directory of the target user. This ensures that the package installation happens in the correct directory and avoids permission issues.
sudo -H pip3 install frappe-bench --break-system-packages

๐Ÿ—๏ธ Step 9: Initialize Frappe Bench

Install Ansible

sudo -H pip3 install ansible --break-system-packages

Set up a new Frappe Bench instance:

bench init frappe-bench --frappe-branch version-15
cd frappe-bench
chmod -R o+rx /home/frappe

๐Ÿ†• Step 10: Create a New Site

Create a new site where ERPNext will be installed:

bench new-site site1.local

During this process, you’ll be prompted to set the MySQL root password and the administrator password for ERPNext.


๐Ÿ“ฆ Step 11: Install ERPNext and Additional Apps

ERPNext:

bench get-app erpnext --branch version-15

Payments: (Optional)

bench get-app payments
bench get-app hrms

Install apps on our site:

bench --site [site-name] install-app erpnext

Install all the other apps you downloaded in the same way. For example, if you downloaded the human resource app, use the below command to install it.

bench --site [site-name] install-app hrms

๐Ÿš€ Step 12: Start the Development Server

Launch the development server to test your ERPNext instance:(LinuxShout)

bench use site1.local
bench start

Access ERPNext by navigating to http://localhost:8000 in your web browser.
Please note that instances which are running on develop mode, like the one we just setup, will not get started when you restart your server. You will need to run the bench start command every time the server restarts.

In the below steps, we will learn how to deploy the production mode.


โš™๏ธ Step 13: Set Up Production Environment (Optional)

Enable Scheduler

bench --site [site-name] enable-scheduler

Disable maintenance mode

bench --site site1.local set-maintenance-mode off

Setup production config

sudo bench setup production frappe

Setup NGINX to apply the changes

bench setup nginx

Restart Supervisor and Launch Production Mode

sudo supervisorctl restart all

The next step will prompt you to save the existing config file, You should respond withย Y

sudo bench setup production frappe

๐Ÿงพ Conclusion

Congratulations! You’ve successfully installed ERPNext Version 15 on Ubuntu 24.04. This setup provides a solid foundation for managing various business processes. For production environments, consider implementing additional security measures and regular backups.

Now you can be access using your IP, without specifying the port. Example: http://10.10.1.10


If you would like to install an SSL certificate on your site, follow this tutorial.


Scroll to Top