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

Welcome to our comprehensive guide on installing ERPNext Version 15 on Ubuntu 24.04. ERPNext is a powerful, open-source ERP system that streamlines business processes from inventory management to accounting. Whether you’re new to ERPNext or have worked with it for years, this step-by-step tutorial will walk you through the installation process, ensuring you have everything set up correctly on your Ubuntu 24.04 system.

Full Course on Udemy

Prerequisites

To ensure optimal functionality, prepare your server with the following requirements:

Software Requirements

  • Updated Ubuntu 24.04
  • A user with sudo privileges
  • Python 3.11+
  • pip 20+
  • MariaDB 10.3.x
  • Node.js 18
  • Yarn 1.12+

Hardware Requirements

  • 4GB RAM
  • 40GB Hard Disk

Step-by-Step Installation

1. Update and Upgrade Packages

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

2. Create a New User

It is advisable to avoid using the root user for daily tasks. Create a Frappe Bench user:

sudo adduser [frappe-user]
sudo usermod -aG sudo [frappe-user]
su [frappe-user]
cd /home/[frappe-user]

Replace [frappe-user] with your desired username, e.g., frappe.


Installing Required Packages

3. Install Git

sudo apt-get install git -y

4. Install Python Dependencies

ERPNext requires Python 3.11+ and other dependencies:

sudo apt-get install python3-dev -y
sudo apt-get install python3-setuptools python3-pip -y
sudo apt install python3.12-venv -y

5. Install MariaDB

ERPNext relies on MariaDB:

sudo apt-get install software-properties-common -y
sudo apt install mariadb-server -y
sudo mysql_secure_installation

During the configuration:

  • Set a root password.
  • Remove anonymous users.
  • Allow remote root login (set N).
  • Remove the test database.
  • Reload privilege tables.

Edit the MariaDB configuration file:

sudo nano /etc/mysql/my.cnf

Add:

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

Restart MariaDB:

sudo service mysql restart

6. Install Redis Server

sudo apt-get install redis-server -y

7. Install CURL, Node.js, NPM, and Yarn

Install CURL:

sudo apt install curl

Install Node.js:

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

Install NPM:

sudo apt-get install npm -y

Install Yarn:

sudo npm install -g yarn -y

8. Install wkhtmltopdf

sudo apt-get install xvfb libfontconfig wkhtmltopdf -y

Setting Up Frappe Bench

9. Install Frappe Bench

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

10. Initialize Frappe Bench

bench init frappe-bench --frappe-branch version-15
cd frappe-bench

Change directory permissions:

chmod -R o+rx /home/[frappe-user]

11. Create a New Site

bench new-site [site-name]

12. Install ERPNext and Other Apps

Download and install required apps:

bench get-app payments
bench get-app --branch version-15 erpnext
bench get-app hrms
bench --site [site-name] install-app erpnext
bench --site [site-name] install-app hrms

Start the server:

bench start

ERPNext will run on http://[YOUR SERVER IP]:8000.


Deploying ERPNext in Production Mode

13. Enable Scheduler and Disable Maintenance Mode

bench --site [site-name] enable-scheduler
bench --site [site-name] set-maintenance-mode off

14. Setup Production Config

sudo bench setup production [frappe-user]
bench setup nginx

Restart Supervisor:

sudo supervisorctl restart all
sudo bench setup production [frappe-user]

Access your site via the server’s IP without the port number.


Optional: Install SSL Certificate

Follow SSL Cerrtificate process that i explained in n8n installation

You can alternatively use nginx or traefik reverse proxy

Full Course on ERPNext

Full Course on ERPNext Installation and Integration


Leave a Comment