Skip to content

Instantly share code, notes, and snippets.

@ascorbic-acid
Last active February 6, 2026 13:14
Show Gist options
  • Select an option

  • Save ascorbic-acid/450b40c384c6cd06f6ec997f732260a3 to your computer and use it in GitHub Desktop.

Select an option

Save ascorbic-acid/450b40c384c6cd06f6ec997f732260a3 to your computer and use it in GitHub Desktop.
How to Install ERPNext v15 & Frappe Framework on Ubuntu 22.04 / 24.04

How to Install ERPNext v15 & Frappe Framework on Ubuntu 22.04 / 24.04

This tutorial provides a step-by-step walkthrough for installing the Frappe Framework and ERPNext v14/15. While it is best compatible with Ubuntu 22.04 LTS for Production or development usecase, these steps also support Ubuntu 24.04 for development which i dont recommend anyway but you can try also with help of uv/pipx.

Install Required Packages for Frappe Framework.

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install software-properties-common \
nginx wget zip unzip git curl file certbot python3-pip \
python3-dev python3-venv redis-server mariadb-server \
mariadb-client

Install wkhtmltopdf qt patched with its required packages

sudo apt-get install xvfb libfontconfig xfonts-75dpi fontconfig libxrender1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb

Config mariadb, add the following at the bottom.

sudo nano /etc/mysql/my.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

# select your best value, for development i use 128M or more if the site db is huge.
innodb_buffer_pool_size = 2048M

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

Configure mariadb for the first time

sudo mysql_secure_installation

Install nvm and install NodeJs v20 with Yarn

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
source ~/.bashrc; nvm install 20
npm install -g yarn

Install Bench CLI

sudo pip3 install frappe-bench

Create new frappe bench env (here i choose v15 and name it erp15)

bench init erp15 --version version-15 --verbose --install-app erpnext
cd erp15

Create your first Site, feel free to install other apps

bench new-site my-site-name.local --install-app erpnext

Now have ready Frappe/ERPNext Env for development.

Continue the following to setup Production Ready Env.

add node & npm links to /usr/bin to avoid supervisor.conf not having node entry and therefore socketio io not working.

sudo ln -s $(which node) /usr/bin/node
sudo ln -s $(which npm) /usr/bin/npm

Fix permissions issue in Ubuntu 22.04, where page loads with missing styles (only run this command if you got that issue)

sudo usermod -aG $USER www-data chmod g+x /home/$USER
sudo bench setup production $USER
sudo sed -i '6i chown='"$USER"':'"$USER"'' /etc/supervisor/supervisord.conf
bench config dns_multitenant on
sudo service supervisor restart
sudo bench setup production $USER

Enable site scheduler

bench --site my-site-name.local scheduler enable
bench --site my-site-name.local scheduler resume

Setup Domain SSL

bench setup lets-encrypt my-site-name.com
bench restart

We are done Thank you, if you have any issues or tips please report.

you may also find this erpnext chrome extension useful.

https://github.com/ascorbic-acid/frappe_chrome_dev_utils

@itsyosefali
Copy link

when pip error on Ubuntu: externally-managed-environment × This environment is externally managed
this happned when u have os 24.04

to solved just do this command :
sudo rm /usr/lib/python3.12/EXTERNALLY-MANAGED

@ascorbic-acid
Copy link
Author

when pip error on Ubuntu: externally-managed-environment × This environment is externally managed this happned when u have os 24.04

to solved just do this command : sudo rm /usr/lib/python3.12/EXTERNALLY-MANAGED

thanks for your tip, yes ubuntu 24 is not tested or recommended in general but can be good choice too for developing maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment