Installing Frappe Framework and ERPNext on Ubuntu Step By Step

Frappe Framework is a versatile Python-based tool for building dynamic web applications. ERPNext is a powerful open-source ERP (Enterprise Resource Planning) system built upon Frappe. This tutorial w

 · 2 min read

Requirements

Ensure that your server meets the following requirements:

  1. Python 3.10+ (v14)
  2. Node.js 16+
  3. Redis 6
  4. MariaDB 10.3.x / Postgres 9.5.x
  5. Yarn 1.12+
  6. pip 20+
  7. wkhtmltopdf (version 0.12.5 with patched qt) (for PDF generation)
  8. cron
  9. NGINX


Update and Upgrade Packages

Run the following commands to update and upgrade your system:

sudo apt-get update -y
sudo apt-get upgrade -y


Create a New User — Bench User

Creating a separate user for Frappe Bench is recommended:

sudo adduser frappe-user
sudo usermod -aG sudo frappe-user
su frappe-user
cd /home/frappe-user


Install Required Packages

Install necessary packages for ERPNext:

sudo apt-get install git
sudo apt-get install python3.10-dev python3-setuptools python3-pip python3-distutils python3.10-venv
sudo apt-get install software-properties-common
sudo apt-get install mariadb-server mariadb-backup mariadb-client
sudo apt-get install redis-server
sudo apt-get install xvfb libfontconfig wkhtmltopdf
sudo apt-get install libmysqlclient-dev
sudo apt-get install curl


Edit MYSQL Default Config File

Edit the MySQL configuration file:

sudo nano /etc/mysql/my.cnf

Add the following block of code:

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4

Save and exit the file.


Restart the MYSQL Server

Restart the MySQL server to apply the changes:

sudo service mysql restart


Install CURL, Node, NPM, and Yarn

Install CURL, Node.js, NPM, and Yarn:

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
nvm install 16.15.0
sudo apt-get install npm
sudo npm install -g yarn


Install Frappe Bench

Install Frappe Bench using pip:

sudo pip3 install frappe-bench


Initialize Frappe Bench

Initialize Frappe Bench with version 14:

bench init --frappe-branch version-14 frappe-bench


Change User Directory Permissions

Give execution permission to the bench user’s home directory:

chmod -R o+rx /home/[frappe-user]


Create a New Site

Create a new ERPNext site:

bench new-site accounts.yoursite.com


Install ERPNext and Other Apps

Download and install ERPNext and other apps:

bench get-app payments
bench get-app --branch version-14 erpnext
# Download and install other apps if needed
bench --site accounts.yoursite.com install-app erpnext


Start ERPNext

Start the ERPNext server:

bench start

Great! You have successfully set up ERPNext version 14 on Ubuntu 22.04. If you visit your server IP with port 8000 (e.g., http://your_server_ip:8000), you should see ERPNext running.


Important Notes

  1. Production Environments: Use a process manager (like Supervisor) for reliability and set up Nginx as a reverse proxy.
  2. Official Documentation: Refer to the Frappe and ERPNext docs for more advanced options and troubleshooting:
  3. Frappe Framework: https://frappeframework.com/docs/user/en/installation
  4. ERPNext: https://docs.erpnext.com/


Congratulations! You've installed both Frappe Framework and ERPNext. You're now ready to explore and leverage this powerful platform for your business management needs.


No comments yet.

Add a comment
Ctrl+Enter to add comment