Prerequisites
The below prerequisites are advised in order to get an optimal functionality of ERPNext on your server.
Software Requirements
- Updated Ubuntu 24.04
- Python 3.12+
- A user with sudo privileges
- pip 20+
- MariaDB 10.3.x
- Node.js 18
- yarn 1.22+
Hardware Requirements
- 4GB RAM
- 40GB Hard Disk
Note:
ubuntu 24.04 default python version is python3.12
ubuntu 24.04 default mariadb version is 10.11
Here we go…
Step 1 : Create Frappe user
sudo apt-get update -y && sudo apt-get upgrade -y
sudo adduser frappe
sudo usermod -aG sudo frappe
su frappe
cd /home/frappe
Step 2 : Install Git and Python
sudo apt-get install git
sudo apt-get install python3-dev
sudo apt-get install python3-setuptools python3-pip
sudo apt install python3.12-venv
Step 3 : Install MariaDB
sudo apt-get install software-properties-common
sudo apt install mariadb-server
sudo systemctl status mariadb
sudo mysql_secure_installation
Enter current password for root: (Enter your SSH root user password)
-Switch to unix_socket authentication [Y/n]: Y
-Change the root password? [Y/n]: Y
It will ask you to set new MySQL root password at this step. This 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
sudo nano /etc/mysql/my.cnf
Add the below code block at the bottom of the file:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci[mysql]
default-character-set = utf8mb4
sudo service mysql restart
Step 4 : Install Redis
sudo apt-get install redis-server
Step 5 : Install Node.js 18.X package
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 18
Step 6 : Install Yarn
sudo apt-get install npm
sudo npm install -g yarn
Step 7 : Install wkhtmltopdf
sudo apt-get install xvfb libfontconfig wkhtmltopdf
Step 8 : Install frappe-bench
sudo -H pip3 install frappe-bench --break-system-packages
bench --version
Step 9 : Initilise the frappe bench & install frappe latest version
bench init frappe-bench --frappe-branch version-15
cd frappe-bench/
chmod -R o+rx /home/frappe
Step 10 : Create New Site
bench new-site site1.local
Step 11 : Get App ERPNext, Payment and HRMS
bench get-app erpnext --branch version-15
bench get-app payments
bench get-app hrms
Step 12 : Install App in site
bench --site site1.local install-app erpnext
bench --site site1.local install-app hrms
Step 13 : Start
bench use site1.local
bench start
Disable maintenance mode and Enable scheduler
bench --site site1.local set-maintenance-mode off
bench --site site1.local enable-scheduler
** Enable Developer Mode**
bench set-config -g developer_mode 1