Frappe v16 Native Installation
update
# apt update
add user frappe
# adduser frappe
adding user frappe to sudo
# usermod -aG sudo frappe
switch to user frappe
# su - frappe
install dependencies
sudo apt install -y git redis-server mariadb-server mariadb-client libmariadb-dev libmariadb-dev-compat pkg-config xvfb libfontconfig cron curl build-essential gcc certbot python3-certbot-nginx -y
Install pip
sudo apt install python3-pip
setting mariadb password
sudo mariadb-secure-installation
configure mariadb by adding the parameters
sudo vim /etc/mysql/my.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
restart the mariadb server
sudo systemctl restart mariadb
install dependency
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt install -f -y
Install Node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc
Install NVM
nvm install 24
nvm use 24
node -v
Install YARN
npm install -g yarn
npm install -g npm@11.7.0
Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
Set Python Version
uv python install 3.14 --default
Check version
python --version
Install Frappe-Bench
uv tool install frappe-bench
bench --version
initiate the bench
mkdir ~/frappe
cd ~/frappe
bench init --frappe-branch version-16 frappe-bench
navigate to the bench directory
cd frappe-bench
Change user directory permissions
chmod -R o+rx /home/frappe/
bench setup procfile
Activate the env
source env/bin/activate
Install Ansible
pip3 install ansible
Install honcho for manager
pip install honcho
Create a new site
bench new-site erpnext.yoursite.in
get app erpnext (use same frappe version if mismatch cause error)
bench get-app --branch v16.0.0 https://github.com/frappe/erpnext.git
start bench
bench start
Create a New terminal and login the same server for below steps
su - frappe
cd frappe
cd frappe-bench
source env/bin/activate
bench --site erpnext.yoursite.in install-app erpnext
set the app in production mode
enable the scheduler
$ bench --site erpnext.yoursite.in enable-scheduler
Disable maintenance mode
$ bench --site erpnext.yoursite.in set-maintenance-mode off
set the path
$ bench setup env --python PATH="$PATH"
set sudo access to the user in venv
$ sudo -E env PATH="$PATH" bench setup sudoers $(whoami)
Setup production config
$ sudo -E env PATH="$PATH" bench setup production frappe
reload the nginx
$ sudo systemctl reload nginx
Setup NGINX to apply the changes
$ bench setup nginx
Restart Supervisor and Launch Production Mode
$ sudo supervisorctl restart all
$ sudo -E env PATH="$PATH" bench setup production frappe
$ sudo systemctl reload nginx
set lets encrypt ssl for the application
$ sudo certbot --nginx
Stop the bench on old tab , Restart Supervisor and Launch Production Mode
$ sudo supervisorctl restart all