Environment Preparation

4.1 Virtual Machine Planning

Before installing ERPNext, the virtual machines were prepared with clear roles:

  • Application nodes: run ERPNext services and serve users

  • Database nodes: host MariaDB and business data

  • Load balancer node: receive client requests and distribute them to healthy application backends

Static IP addresses were used to keep the environment predictable and avoid issues caused by changing DHCP addresses.

Example addresses:

App1: 192.168.31.40
App2: 192.168.31.41
App3: 192.168.31.42
HAProxy: 192.168.31.60

Database nodes were assigned separate private IP addresses on the same network according to the deployment plan.

4.2 Operating System Setup

Each server was installed with Ubuntu Server and then updated.

Commands used:

sudo apt update
sudo apt upgrade -y

4.3 Required Packages

The following packages were needed before ERPNext could be installed and run properly:

sudo apt install -y git curl wget nano vim build-essential python3-dev python3-pip python3-venv redis-server nginx supervisor mariadb-client wkhtmltopdf

4.4 Node.js and Yarn

ERPNext also needs Node.js and Yarn to build frontend assets.

Installation steps included:

curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
sudo apt install -y nodejs
npm install -g yarn

4.5 Bench Installation

Bench is the management tool used to operate Frappe and ERPNext.

It was installed with:

pip3 install --user frappe-bench

To make Bench available in the shell, the PATH was updated:

echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Verification was done with:

bench --version

The deployment used Bench version 5.31.0.