( If Ubuntu version of your instance is 20+, most probably your Python is 3.8 and node is 12. For Frappe and ERPNext version 14, it is mandatory to have Python 3.10 and Node 16+. We have explained the upgrading procedures in this document ( https://cloud.erpgulf.com/blog/support-forum/erpnext-upgrade-from-version-13-to-version-14-ubnutu . Use that document to prepare server. Please do that and come back here to continue. If you are not sure about Ubuntu version please type this command cat /etc/os-release )
![]()
If you are upgrading from 15 , use the commands below
bench switch-to-branch version-16 frappe erpnext hrms
bench update --patch
bench migrate
bench build
bench restart
**A video version we previously uploaded for Version 14 can tremendously help on ERPNext version 16 also. Please watch it here. ( https://youtu.be/RU9lXV1sTlI )
( commands are in blue letters )
apt-get update -y
init 6 ( will restart )
Create swap disk
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Add /swapfile none swap sw 0 0 to /etc/fstab
( vim /etc/fstab
add /swapfile none swap sw 0 0 on top )
free -h
Requirements
Python 3.14
Node 24
Mardiadb 11.8
Redis 6+
Yarn 1.22+
Pip 25.3+
sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt update sudo apt install python3.14 python3.14-dev python3.14-venv -y
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.14 python3.14 -m pip install --upgrade pip
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
source ~/.bashrc
# Install Node 24 and Yarn
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.6/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 24
npm install -g yarn
node -v ( must be 24+ )
( Often your Ubuntu repos doesn't have all above packages, in that case follow this steps https://cloud.erpgulf.com/blog/blogs/ubuntu-repo-issues-in-oracle-cloud-riyadh-region )
Test python installation and version at this stage
python3 -V # ( result Python 3.12.X )
python -V # ( result Python 3.12.X )
python3.14 -V # ( result Python 3.14.X )
# 1. Register Python 3.12 (the original) in the system
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
# 2. Register Python 3.14 with a higher priority (2)
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.14 2
# 3. (Optional) Make 'python' point to 'python3' as well
sudo apt install python-is-python3 -y
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.14
python3.14 -m pip install --upgrade "pip>=25.3"
node --version
v24+
--------------------------------------------
sudo apt install redis-server -y
sudo systemctl enable redis-server
sudo systemctl start redis-server
redis-server --version # ( 7 + )
npm install -g yarn
Check NPM version at this statem and make sure you installed npm properly
npm --version ( result must be above : 10.XX.X )
yarn -v (Should be 1.22.22 or similar)
Install Mariadb
apt-get install mariadb-server mariadb-client -y
check MariaDB version here
mariadb --version ( result must be mariadb Ver 15.1 Distrib 10.6.7-MariaDB, )
Set Mariadb security features correct
mysql_secure_installation
Enter current password for root (enter for none): Press your [Enter] key, there is no password set by default
Switch to unix_socket authentication N
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Set Mariadb formats.
vim /etc/mysql/mariadb.conf.d/erpnext.cnf
Add these lines
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
systemctl restart mariadb
Next, we are going to create a user called "erpgulf" . Set its password, usermod, and sudo prvilege.
useradd -m -s /bin/bash erpgulf
passwd erpgulf
usermod -aG sudo erpgulf
su - erpgulf
Now you are inside the new user. Now let us set it's path.
vim ~/.bashrc
add this line
PATH=$PATH:~/.local/bin/
source ~/.bashrc
su - erpgulf
sudo mkdir /opt/bench
sudo chown -R erpgulf:erpgulf /opt/bench
cd /opt/bench
yarn add node-sass
Check yarn and node-sass at this point
yarn --version ( result must be:1.22.19 )
/opt/bench/node_modules/.bin/node-sass -v ( result must be: node-sass 9.0.1 (Wrapper) [JavaScript]
libsass 3.5.5 (Sass Compiler) [C/C++] )
npm node-sass -v ( Result must be: 8.19.1 )
Check pip3 version
pip3 -V ( Result must be pip 23.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10) )
pip -V ( Result must be pip 23.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10) )
Now we are entering to Frappe installation. Before that finish all the following tests ( in violet letters ) . Otherwise installation will fail
****************************************************
python -V ( result Python 3.11.4 )
node --version ( result must be : v20.17.0 )
npm --version ( result must be : 9.8.1 )
mariadb --version ( result must be mariadb Ver 15.1 Distrib 10.6.7-MariaDB, )
yarn --version ( result must be:1.22.19 )
/opt/bench/node_modules/.bin/node-sass -v ( result must be: node-sass 9.0.1 (Wrapper) [JavaScript] libsass 3.5.5 (Sass Compiler) [C/C++] )
npm node-sass -v ( Result must be: 9.8.1 )
pip3 --version ( Result must be pip 23.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10) )
pip --version ( Result must be pip 23.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10) )
redis-server --version (Redis server v=7.0.16 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=a3fdef44459b3ad6)
wkhtmltopdf -V ( wkhtmltopdf 0.12.6 )
git -v (git version 2.39.1)
***************************************************
Once you start using pip , you may get error "This environment is externally managed" in that case, either use following command, or use pipx
remove file
/usr/lib/python3.x/EXTERNALLY-MANAGED,rm
/usr/lib/python3.12/EXTERNALLY-MANAGED
sudo apt install pipx
pip3 install frappe-bench ( or pipx install frappe-bench , if you havent removed EXTERNALLY-MANAGED )
sudo apt install python3.14-venv
bench init frappe-bench --frappe-branch version-16
cd frappe-bench
sed -i '/web:/ s/$/ --noreload/' Procfile
pip3 install honcho
bench start &
While you are running the above command , you can see below
* Running on http://127.0.0.1:8000
14:29:30 web.1 | * Running on http://45.56.78.183:8000 (Press CTRL+C to quit)
Also, you can telnet to port 8000 to this server from outside.
telnet v14.erpgulf.com 8000 ( port will show open )
Press CTRL+C to return to CLI
bench new-site yourhost.erpgulf.com --db-name site01
At this point we have a frappe site running - bench start and you will get the website on port 8000. But ERPNext not yet installed. Let's continue
bench get-app erpnext --branch version-16
bench --site yourhost.erpgulf.com install-app erpnext
Now you have ERPNext on port 8000. ( http://yourhost.example.com:8000 )
You can run the setup-wizard on the browser.
----- NOW deploy it in production mode - on nginx server -------
Continues in this article ( https://cloud.erpgulf.com/blog/blogs/erpnext-version-14-install-in-production-mode-nginx-supervirso-gunicorn )






