ERPNext v15 Print

  • 0

Last Updated: 31 August 2025
Applies to: Ubuntu 24.04 LTS (fresh server recommended)
Skill Level: Intermediate to Advanced


Overview

This guide will walk you through installing ERPNext 15 manually on a fresh Ubuntu 24.04 VPS. By the end, you will have ERPNext running in production mode with NGINX, SSL, and Supervisor.


Prerequisites

Before starting, ensure you have:

  • Ubuntu 24.04 VPS with root access
  • A domain name pointing to your VPS IP (A record)
  • The following details ready:
Variable Example Value Description
FRAPPE_PASSWORD StrongPassword123 Linux user password for frappe
SITE_NAME erp.example.com ERPNext domain name
ADMIN_PASSWORD AdminPass123 ERPNext Administrator password
DB_ROOT_PASSWORD DBRootPass123 MariaDB root password
VERSION version-15 ERPNext/Frappe branch

Step 1: Prepare Your Server

Update and remove apt locks

sudo fuser -k /var/lib/dpkg/lock-frontend || true
sudo rm -f /var/lib/dpkg/lock-frontend /var/lib/dpkg/lock
sudo dpkg --configure -a || true

Disable unattended-upgrades

sudo systemctl stop unattended-upgrades
sudo systemctl disable unattended-upgrades
sudo systemctl mask unattended-upgrades

Step 2: Create the Frappe User

sudo adduser frappe
sudo usermod -aG sudo frappe
echo "frappe:FRAPPE_PASSWORD" | sudo chpasswd

(Replace FRAPPE_PASSWORD with your chosen password)


Step 3: Install System Dependencies

sudo apt update && sudo apt install -y \
software-properties-common dirmngr ca-certificates apt-transport-https \
curl snapd python3-dev python3-pip python3-venv python3-pymysql git \
redis-server xvfb libfontconfig wkhtmltopdf libmysqlclient-dev gnupg2 \
fontconfig libjpeg-turbo8 xfonts-75dpi mariadb-server mariadb-client nginx \
libxrender1 libxext6 libssl-dev build-essential locales

Step 4: Configure MariaDB

Start MariaDB

sudo systemctl enable mariadb
sudo systemctl start mariadb

Secure MariaDB

sudo mysql -u root <

(Replace DB_ROOT_PASSWORD)

Configure UTF8MB4

sudo tee -a /etc/mysql/my.cnf > /dev/null <

Step 5: Install Node.js, Yarn and Certbot

Node.js 18 and Yarn

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g yarn

Certbot (SSL)

sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot

Step 6: Install Bench CLI

sudo pip3 install frappe-bench

Step 7: Create Bench and ERPNext Site

Switch to frappe user:

sudo su - frappe

Initialize bench:

bench init --frappe-branch VERSION bench

Create site:

cd ~/bench
bench new-site SITE_NAME --admin-password ADMIN_PASSWORD --db-root-password DB_ROOT_PASSWORD

Get ERPNext app:

bench get-app --branch VERSION erpnext

Install ERPNext:

bench --site SITE_NAME install-app erpnext
bench --site SITE_NAME enable-scheduler
bench --site SITE_NAME set-maintenance-mode off

(Replace VERSION, SITE_NAME, ADMIN_PASSWORD, DB_ROOT_PASSWORD accordingly)


Step 8: Setup Production Mode

cd ~/bench
bench setup production frappe

Step 9: Obtain SSL Certificate

sudo certbot --nginx -d SITE_NAME --non-interactive --agree-tos -m admin@SITE_NAME

Step 10: Final Steps

sudo systemctl restart nginx
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl restart all

Login to ERPNext

Open your browser and go to:

https://SITE_NAME
  • Username: Administrator
  • Password: ADMIN_PASSWORD

Troubleshooting

  • Check ERPNext logs:
cd /home/frappe/bench
bench --site SITE_NAME logs
  • Restart ERPNext processes:
sudo supervisorctl restart all

Notes

  • Use a fresh VPS to avoid conflicts.
  • Keep your passwords safe.
  • Run updates regularly:
cd /home/frappe/bench
bench update

Was this answer helpful?
Back