Business and ERP

How to Install ERPNext 16 (or 15) on Ubuntu 24.04: Step-by-Step Production Guide

Install ERPNext 16 or 15 on Ubuntu 24.04 with Frappe Bench: exact versions (Python 3.14, Node 24, MariaDB 11.8), HRMS, Nginx, SSL and fixes for common errors.

By Amjid Ali · · Updated · 8 min read

In this article
  1. Quick answer: the steps at a glance
  2. Requirements for ERPNext 16 and 15
  3. Step 1: Update Ubuntu and create the frappe user
  4. Step 2: Install system packages
  5. Step 3: Install MariaDB 11.8 and configure it for ERPNext
  6. Step 4: Install Node.js 24 and Yarn
  7. Step 5: Install uv, Python 3.14 and Frappe Bench
  8. Step 6: Initialise the bench
  9. Step 7: Create a site and install ERPNext and HRMS
  10. Step 8: Set up production (Nginx and Supervisor)
  11. Step 9: Add SSL with Let's Encrypt
  12. ERPNext 15 on Ubuntu 24.04: what changes
  13. What changed in ERPNext 16 for installers
  14. Troubleshooting common ERPNext install errors
  15. Other ways to run ERPNext
  16. Full course on ERPNext

Prefer to watch? This video walks through it step by step. Prefer to read? The full guide is below.

To install ERPNext 16 on Ubuntu 24.04, prepare a clean server with Python 3.14, Node.js 24, MariaDB 11.8, Redis and wkhtmltopdf, install Frappe Bench with uv, run bench init --frappe-branch version-16, create a site, add ERPNext (and HRMS if you need payroll) and finish with bench setup production for Nginx and Supervisor. The whole job takes 30 to 45 minutes, and every command you need is below in order.

I have rebuilt this guide for the current release (ERPNext v16.51, October 2026) after testing the steps on Ubuntu 24.04 VMs in my Proxmox homelab. If you must stay on version 15, the same steps work with the small changes shown in the "ERPNext 15 on Ubuntu 24.04" section further down.

Quick answer: the steps at a glance

  1. Update Ubuntu 24.04 and create a non-root frappe user with sudo.
  2. Install system packages: git, Redis, Nginx, Supervisor, build tools and wkhtmltopdf.
  3. Install MariaDB 11.8 from the official MariaDB repository and set utf8mb4.
  4. Install Node.js 24 with nvm, then Yarn.
  5. Install uv, Python 3.14 and Frappe Bench (uv tool install frappe-bench).
  6. bench init --frappe-branch version-16 frappe-bench.
  7. bench new-site, then bench get-app and install-app for ERPNext and HRMS.
  8. bench setup production, point DNS at the server and add SSL with Certbot.

Requirements for ERPNext 16 and 15

These figures come from the Frappe installation docs:

Component ERPNext / Frappe 16 ERPNext / Frappe 15
Operating system Ubuntu 24.04+ or Debian 13+ Ubuntu 22.04 or 24.04, Debian 12
Python 3.14 3.10 to 3.13
Node.js 24 18 or newer (use 20)
MariaDB 11.8 10.6.6 or newer
Redis 6 or newer 6 or newer
Yarn 1.22+ 1.12+
pip / installer uv (pip 25.3+) pip 20+ or pipx
wkhtmltopdf 0.12.6 with patched Qt 0.12.6 with patched Qt

Hardware: a small company (up to about 20 users) runs well on 2 to 4 vCPUs, 4 to 8 GB RAM and 40 GB of SSD. Front-end builds are the hungriest step, so if bench init or bench get-app gets killed on a 2 GB VPS, add swap or more RAM before anything else.

You also need a domain or subdomain (for example erp.example.com) with an A record pointing to the server if you want HTTPS at the end.

Step 1: Update Ubuntu and create the frappe user

Log in as root or a sudo user and update the system:

sudo apt update && sudo apt upgrade -y
sudo timedatectl set-timezone Australia/Sydney   # use your own time zone

Never run bench as root. Create a dedicated user (I call it frappe) and switch to it:

sudo adduser frappe
sudo usermod -aG sudo frappe
su - frappe

Every command from here runs as frappe in /home/frappe.

Step 2: Install system packages

sudo apt install -y git curl build-essential pkg-config \
  python3-dev python3-venv libffi-dev libssl-dev \
  libmariadb-dev redis-server nginx supervisor cron \
  xvfb libfontconfig fontconfig

ERPNext uses wkhtmltopdf for PDF prints. The Ubuntu package is built without the patched Qt, which breaks headers and footers, so install the patched build from the wkhtmltopdf packaging releases. The jammy package installs cleanly on 24.04:

wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo apt install -y ./wkhtmltox_0.12.6.1-3.jammy_amd64.deb
wkhtmltopdf --version

Expected output: wkhtmltopdf 0.12.6.1 (with patched qt). On an ARM server use the jammy_arm64.deb file instead.

Step 3: Install MariaDB 11.8 and configure it for ERPNext

Ubuntu 24.04's own repository has MariaDB 10.11. That is enough for ERPNext 15, but version 16 expects 11.8, so add the official MariaDB repository first (MariaDB repository docs):

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-11.8"
sudo apt update
sudo apt install -y mariadb-server mariadb-client
mariadb --version

Secure the server and set a root password (bench asks for it when it creates a site):

sudo mariadb-secure-installation

My answers: switch to unix_socket authentication n, change the root password Y, remove anonymous users Y, disallow root login remotely Y, remove the test database Y, reload privilege tables Y.

Now set the character set ERPNext needs. A separate drop-in file survives package upgrades better than editing my.cnf:

sudo tee /etc/mysql/mariadb.conf.d/99-frappe.cnf > /dev/null <<'EOF'
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4
EOF
sudo systemctl restart mariadb

Check it took effect:

sudo mariadb -e "SHOW VARIABLES LIKE 'character_set_server';"

You should see utf8mb4. If your database will live on a separate server, follow my ERPNext external database guide for this step instead.

Step 4: Install Node.js 24 and Yarn

Install nvm as the frappe user (no sudo), then Node 24:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc
nvm install 24
nvm alias default 24
npm install -g yarn
node -v && yarn -v

Expected: v24.x.x and 1.22.x. Do not use sudo npm here: with nvm, Node lives in your home folder.

Step 5: Install uv, Python 3.14 and Frappe Bench

Frappe now recommends uv for Python and bench. It avoids the externally-managed-environment error that pip install frappe-bench hits on Ubuntu 24.04.

curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
uv python install 3.14 --default
uv tool install frappe-bench
bench --version

If bench: command not found appears, run uv tool update-shell, then open a new shell.

Step 6: Initialise the bench

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

If bench picks up the wrong Python, point it at 3.14 explicitly:

bench init --frappe-branch version-16 --python "$(uv python find 3.14)" frappe-bench

The chmod lets Nginx read the built assets later; skipping it is the usual cause of an ERPNext login page with no CSS.

Step 7: Create a site and install ERPNext and HRMS

Name the site after the domain you will use, so SSL and Nginx line up without extra configuration:

bench new-site erp.example.com

Enter the MariaDB root password from step 3, then choose an Administrator password. Now get the apps from the same major branch and install them:

bench get-app --branch version-16 erpnext
bench get-app --branch version-16 hrms        # optional: HR and payroll
bench --site erp.example.com install-app erpnext
bench --site erp.example.com install-app hrms
bench use erp.example.com

Check what is installed:

bench --site erp.example.com list-apps
bench version --format table

You can test the development server with bench start and open http://SERVER-IP:8000. Stop it with Ctrl+C before going to production.

Step 8: Set up production (Nginx and Supervisor)

bench --site erp.example.com enable-scheduler
bench --site erp.example.com set-maintenance-mode off
sudo env "PATH=$PATH" bench setup production frappe
sudo supervisorctl status

sudo env "PATH=$PATH" matters: bench and Node live in the frappe user's home, and plain sudo bench cannot find them. You should see the web, socketio, worker and schedule processes in RUNNING state. Open http://erp.example.com (or the server IP) and log in as Administrator to run the setup wizard.

If supervisorctl status shows nothing, link the config by hand:

sudo ln -sf /home/frappe/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench.conf
sudo supervisorctl reread && sudo supervisorctl update

Step 9: Add SSL with Let's Encrypt

Make sure the A record points to the server and ports 80 and 443 are open, then:

sudo ufw allow 22,80,443/tcp
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d erp.example.com

Certbot edits the Nginx config bench generated and sets up automatic renewal. If you prefer a reverse proxy in front of several apps, see my Traefik vs Nginx comparison. Before you put real data in, schedule backups: my ERPNext backup and restore guide covers bench backup and off-site copies.

ERPNext 15 on Ubuntu 24.04: what changes

If a custom app still needs version 15, keep the same steps with these changes:

  • MariaDB: the Ubuntu package (10.11) is fine, so skip the repository script and run sudo apt install -y mariadb-server mariadb-client.
  • Node.js: nvm install 20 instead of 24.
  • Python: Ubuntu's Python 3.12 works; install bench with pipx install frappe-bench or uv tool install frappe-bench.
  • Branches: bench init --frappe-branch version-15 frappe-bench, then bench get-app --branch version-15 erpnext and bench get-app --branch version-15 hrms.

What changed in ERPNext 16 for installers

  • Python moves to 3.14 and Node.js to 24, so old guides that use nvm install 18 and system Python fail on v16.
  • MariaDB 11.8 is the documented version, which Ubuntu 24.04 does not ship.
  • bench is installed with uv rather than sudo pip3 install frappe-bench --break-system-packages, which older guides (including the first version of this one) used.
  • Ubuntu 22.04 is no longer a supported base for v16; use 24.04 or Debian 13.

Troubleshooting common ERPNext install errors

error: externally-managed-environment when installing bench. You used system pip. Install with uv tool install frappe-bench (step 5) or pipx.

Access denied for user 'root'@'localhost' during bench new-site. MariaDB root is still on socket authentication. Give it a password that bench can use:

sudo mariadb -e "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('YourStrongPassword') OR unix_socket; FLUSH PRIVILEGES;"

bench init stops with a Node or Yarn error. Run node -v as the frappe user. If it is not v24 (v20 for ERPNext 15), run nvm use 24 and nvm alias default 24, then delete the half-built frappe-bench folder and run bench init again.

Build killed or JavaScript heap out of memory. The server ran out of RAM during asset builds. Add 2 to 4 GB of swap or more memory, then run bench build.

Login page loads without styles after production setup. Nginx cannot read the assets. Run chmod -R o+rx /home/frappe, then bench build and sudo systemctl reload nginx.

ERPNext is not installed or the setup wizard is missing modules. The app was downloaded but not installed on the site. Run bench --site erp.example.com install-app erpnext and check with list-apps.

Port 8000 not reachable during testing. bench start is only for testing; open the port with sudo ufw allow 8000/tcp or go straight to production setup on port 80.

Other ways to run ERPNext

Full course on ERPNext

If you want the whole journey on video, from server build to configuration and integrations, see my ERPNext installation and integration course on Udemy.

Frequently asked questions

Which ERPNext version should I install in 2026?+

Install ERPNext 16 for a new system. It is the current major release (v16.51 in October 2026) and gets new features first. Choose ERPNext 15 only if you depend on a custom or marketplace app that has not been ported to v16 yet; v15 still receives fixes and installs on the same Ubuntu 24.04 server with Python 3.12 and Node 20.

What are the requirements for ERPNext 16?+

According to the Frappe documentation, Frappe and ERPNext 16 need Ubuntu 24.04 or Debian 13 or newer, Python 3.14, Node.js 24, MariaDB 11.8, Redis 6 or newer, Yarn 1.22 or newer and wkhtmltopdf. For hardware, plan on at least 2 vCPUs, 4 GB RAM (8 GB is more comfortable during asset builds) and 40 GB of disk.

Does Ubuntu 24.04 include MariaDB 11.8?+

No. Ubuntu 24.04 ships MariaDB 10.11, which is fine for ERPNext 15 but below the 11.8 that Frappe lists for version 16. Add the official MariaDB repository with the mariadb_repo_setup script and the --mariadb-server-version=mariadb-11.8 option before installing mariadb-server.

How do I fix the externally-managed-environment error when installing bench?+

Ubuntu 24.04 protects the system Python, so sudo pip install frappe-bench fails. Install bench with uv instead (uv tool install frappe-bench), which is what the Frappe docs now recommend, or with pipx. Avoid --break-system-packages and avoid deleting the EXTERNALLY-MANAGED file.

Can I install HRMS with ERPNext 16?+

Yes. Get HRMS from the same major branch as Frappe and ERPNext: bench get-app --branch version-16 hrms, then bench --site yoursite install-app hrms. Mixing major versions, such as ERPNext 15 with HRMS 16, is not supported and usually fails during install or migrate.

How long does an ERPNext installation take?+

On a 4 vCPU VM with a decent connection, the full process takes about 30 to 45 minutes. Most of that is bench init and bench get-app erpnext, which download the apps and build the front-end assets.

Related videos

Video library
  • Business and ERP

    ERPNext 15 Installation on Ubuntu 22.04 with HRMS: Step-by-Step

    · 11:32 · 23K views

    Read the guide Watch on YouTube
  • Cloud and Self-Hosting

    Set a Static IP and Hostname on Ubuntu Server 24.04 (Netplan)

    · 9:02 · 1.7K views

    Watch on YouTube
  • Cloud and Self-Hosting

    Ubuntu Server Auto Updates with Crontab | Automate System Updates on Ubuntu 24.04

    · 6:17 · 310 views

    Watch on YouTube