A step-by-step guide to install Frappe/ERPNext v15 on Ubuntu 24.04 LTS, including production setup with Nginx, Supervisor, and SSL.
Ubuntu 24.04 includes Python 3.12 by default. Ensure the following dependencies are installed:
- Python 3.11+ (Python 3.12 is built-in)
- Node.js 18+
- Redis 5+
- MariaDB 10.8 (recommended) / PostgreSQL
- Yarn 1.12+
- wkhtmltopdf 0.12.5 (patched qt)
- Cron & NGINX (for production setup)
Run the following commands, one by one to install all dependencies and set up Frappe/ERPNext:
sudo apt update && sudo apt upgrade -y
sudo apt install -y git python3-dev python3-setuptools python3-pip python3.12-venv \
software-properties-common mariadb-server libmysqlclient-dev redis-server \
curl npm xvfb libfontconfig wkhtmltopdf nginx supervisor
sudo systemctl start mariadb
sudo mysql_secure_installation
This directly edits the 50-server.cnf file using tee.
sudo tee /etc/mysql/mariadb.conf.d/50-server.cnf > /dev/null <<EOL
[server]
user = mysql
pid-file = /run/mysqld/mysqld.pid
socket = /run/mysqld/mysqld.sock
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
bind-address = 127.0.0.1
query_cache_size = 16M
log_error = /var/log/mysql/error.log
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
EOL
sudo systemctl restart mariadb
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g yarn
sudo -H pip3 install frappe-bench --break-system-packages
bench init frappe-bench --frappe-branch version-15
cd frappe-bench
bench new-site mysite.local --db-type=mariadb
bench use mysite.local
echo "127.0.0.1 mysite.local" | sudo tee -a /etc/hosts
bench get-app erpnext --branch version-15
bench --site mysite.local install-app erpnext
bench start
bench setup production frappe
sudo supervisorctl restart all
sudo systemctl restart nginx
This guide installs MariaDB 10.11, but Frappe recommends 10.8 for compatibility.
If using PostgreSQL, replace --db-type=mariadb with --db-type=postgres.
For production, use bench setup production frappe to configure NGINX & Supervisor.