1.1 Login to the server using SSH
1.2 Setup correct date and timezone
Check the server’s default timezone:
date
1.3 Update & upgrade system packages
sudo apt-get update -y
sudo apt-get upgrade -y
1.4 Create a new user
We will install Frappe Bench, ERPNext and other apps using this user.
sudo adduser [frappe-user]
usermod -aG sudo [frappe-user]
su [frappe-user]
cd /home/[frappe-user]/
INSTALL REQUIRED PACKAGES
2.1 Install Git
sudo apt-get install git -y
Check if GIT is correctly installed by running git --version
2.2 Install cURL
sudo apt-get install curl -y
Check if cURL is correctly installed by running curl --version
2.3 Install Python
sudo apt-get install python3-dev python3-pip python3-setuptools -y
sudo apt-get install python3-venv -y
Check if Python is correctly installed by running python3 --version
cd /home/[frappe-user]/
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
uv python install 3.14 --default
Check if uv is correctly installed by running uv –-version
Check if Python 3.14 is correctly installed by running python3 --version
2.4 Install other required packages
sudo apt-get install software-properties-common -y
sudo apt-get install xvfb libfontconfig -y
sudo apt-get install libmysqlclient-dev -y
sudo apt-get install pkg-config -y
2.5 Install Redis Server
sudo apt-get install redis-server -y
2.6 Install wkhtmltopdf
sudo apt install wkhtmltopdf -y
CONFIGURE MySQL SERVER
Frappe v16 required Mariadb 11.8+ so we will first install Mariadb server and client.
3.1 Install MariaDB server
sudo apt install mariadb-server mariadb-client -y
3.2 Configure MariaDB server
sudo mysql_secure_installation
Follow the instructions to continue the setup;
Enter current password for root: (Enter your SSH root user password or leave blank if you don’t have it)
Switch to unix_socket authentication [Y/n]: Y
Change the root password? [Y/n]: Y
It will ask you to set a new MySQL root password at this step. Set a new password. This password can be different from the SSH root user password.
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n]: N
This is set as N because we might want to access the database from a remote server for using business analytics software like Metabase / PowerBI / Tableau, etc.
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
3.3 Update MariaDB config file
sudo nano /etc/mysql/my.cnf
Add the below code block at the end of the file:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
If you don’t know how to use nano editor:
Once the file is open, paste the above code and hit CTRL+X
Enter “Y” when prompted and hit Enter
3.4 Restart MariaDB server
INSTALL Node, NPM, Yarn
4.1 Install Node
Frappe v16 requires Node 24. We will install it using Node Version Manager (nvm) as below:
cd /home/[frappe-user]/
curl https://raw.githubusercontent.com/cre... | bash
source ~/.profile
nvm install 24
nvm use 24
4.2 Install Node Package Manager (npm)
sudo apt-get install npm -y
4.3 Install Yarn
sudo npm install -g yarn
Initialize Frappe Bench
5.1 Install Frappe Bench
uv tool install frappe-bench
5.2 Initialize Frappe Bench
cd /home/[frappe-user]/
bench init --frappe-branch version-16 frappe-bench
5.3 Set bench directory permissions
cd /home/[frappe-user]/frappe-bench/
sudo chmod -R o+rx /home/frappe-user/
CREATE NEW SITE & INSTALL FRAPPE FRAMEWORK
6.1 Create new site
bench new-site site1.local
SETUP PRODUCTION ENVIRONMENT
7.1 Enable Scheduler Service
bench --site site1.local enable-scheduler
7.2 Disabled Maintenance Mode
bench --site site1.local set-maintenance-mode off
7.3 Bench Setup Production
sudo apt install -y ansible
sudo env "PATH=$PATH" bench setup production [frappe-user]
7.4 Setup NGINX web server
bench setup nginx
7.5 Restart all services using supervisor
sudo supervisorctl restart all
INSTALL ERPNEXT & OTHER APPS
8.1 Fetch apps from GitHub
bench get-app --branch version-16 erpnext
bench get-app --branch version-16 hrms
8.2 Install apps on the site
We will now install the apps on our site as below:
bench --site site1.local install-app erpnext
bench --site site1.local install-app hrms
#ERPNext #ERPNextV16 #ERPNextInstallation #Ubuntu2404 #UbuntuLinux
#FrappeFramework #ERPNextGuide #OpenSourceERP #ERPNextTutorial
#LinuxAdmin #SysAdminLife #TechTutorial #DevOpsCommunity