Step 1: Update Your System
Before installing anything, it’s important to update your system packages:
sudo apt-get update -y
sudo apt-get upgrade -y
Step 2: Create a User for Frappe
It’s recommended not to run Bench as root. Create a new user or use an existing one:
sudo adduser frappe_user
sudo usermod -aG sudo frappe_user
su - frappe_user
cd /home/frappe_user
If you prefer to use your existing user, just replace
frappewith your username in the commands below.
Step 3: Install Dependencies
Install the essential packages required for Frappe and ERPNext:
sudo apt-get install git -y
sudo apt-get install python3-dev -y
sudo apt-get install python3-setuptools python3-pip -y
sudo apt install python3.13-venv -y
sudo apt-get install software-properties-common -y
Step 4: Install MariaDB
sudo apt install mariadb-server -y
sudo mariadb-secure-installation
During the setup, use these recommended options:
Enter current password for root: (press ENTER)
Switch to unix_socket authentication? Y
Change root password? Y
Remove anonymous users? Y
Disallow root login remotely? N
Remove test database? Y
Reload privilege tables? Y
Step 5: Configure MariaDB
Open the MariaDB configuration file:
sudo nano /etc/mysql/my.cnf
Add the following:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Restart MariaDB:
sudo service mysql restart
Step 6: Install Redis
sudo apt-get install redis-server -y
Step 7: Install Node.js and npm (latest stable)
Step 7a: Remove old versions (if any)
sudo apt remove nodejs npm -y
sudo apt autoremove -y
Step 7b: Update packages and install prerequisites
sudo apt update
sudo apt upgrade -y
sudo apt install -y curl ca-certificates gnupg
Step 7c: Add NodeSource repository and install Node.js 22 LTS
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
Verify installation:
node -v
npm -v
Step 7d: Install Yarn
sudo npm install -g yarn
Step 8: Install PDF Rendering Tools
sudo apt-get install xvfb libfontconfig wkhtmltopdf -y
Step 9: Install Frappe Bench and Ansible
sudo -H pip3 install frappe-bench --break-system-packages
sudo -H pip3 install ansible --break-system-packages
-Hensures correct HOME directory and--break-system-packagesis needed for Ubuntu 24+.
Step 10: Initialize Frappe Bench
For v16 beta, use the beta branch:
bench init frappe-bench --frappe-branch v16.0.0-beta.1
Switch to your bench folder:
cd frappe-bench
Fix permissions:
sudo chmod -R o+rx /home/$USER
Replace
$USERwith your frappe username if needed.
Step 11: Create a New Site
bench new-site yoursite_name
-
Enter MySQL root user:
rootor your user -
MySQL root password: your MySQL password
-
Set Frappe admin password when prompted
Step 12: Get ERPNext and HRMS Apps
ERPNext v16 beta:
bench get-app --branch v16.0.0-beta.1 https://github.com/frappe/erpnext.git
HRMS v16 beta:
bench get-app --branch v16.0.0-beta.1 https://github.com/frappe/hrms.git
Step 13: Install Apps to Your Site
ERPNext:
bench --site yoursite.local install-app erpnext
HRMS:
bench --site yoursite.local install-app hrms
Set the current site
bench use yoursite_name
Step 14: Start Development Server
bench start
