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
Requirements
Ensure that your server meets the following requirements:
- Python 3.10+ (v14)
- Node.js 16+
- Redis 6
- MariaDB 10.3.x / Postgres 9.5.x
- Yarn 1.12+
- pip 20+
- wkhtmltopdf (version 0.12.5 with patched qt) (for PDF generation)
- cron
- NGINX
Update and Upgrade Packages
Run the following commands to update and upgrade your system:
sudo apt-get update -ysudo apt-get upgrade -y
Create a New User — Bench User
Creating a separate user for Frappe Bench is recommended:
sudo adduser frappe-usersudo usermod -aG sudo frappe-usersu frappe-usercd /home/frappe-user
Install Required Packages
Install necessary packages for ERPNext:
sudo apt-get install gitsudo apt-get install python3.10-dev python3-setuptools python3-pip python3-distutils python3.10-venvsudo apt-get install software-properties-commonsudo apt-get install mariadb-server mariadb-backup mariadb-clientsudo apt-get install redis-serversudo apt-get install xvfb libfontconfig wkhtmltopdfsudo apt-get install libmysqlclient-devsudo 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 = FALSEcharacter-set-server = utf8mb4collation-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 | bashnvm install 16.15.0sudo apt-get install npmsudo 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 paymentsbench get-app --branch version-14 erpnext# Download and install other apps if neededbench --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
- Production Environments: Use a process manager (like Supervisor) for reliability and set up Nginx as a reverse proxy.
- Official Documentation: Refer to the Frappe and ERPNext docs for more advanced options and troubleshooting:
- Frappe Framework: https://frappeframework.com/docs/user/en/installation
- 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. Login to start a new discussion Start a new discussion