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.
sudo apt-get update && sudo apt-get upgradesudo 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-clientsudo 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.debsudo 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 restartsudo mysql_secure_installation
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bashsource ~/.bashrc; nvm install 20
npm install -g yarnsudo pip3 install frappe-benchbench init erp15 --version version-15 --verbose --install-app erpnextcd erp15bench new-site my-site-name.local --install-app erpnextadd 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/npmFix 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/$USERsudo bench setup production $USER
sudo sed -i '6i chown='"$USER"':'"$USER"'' /etc/supervisor/supervisord.confbench config dns_multitenant on
sudo service supervisor restart
sudo bench setup production $USERbench --site my-site-name.local scheduler enable
bench --site my-site-name.local scheduler resumebench setup lets-encrypt my-site-name.combench restart
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