ERPNext Setup on Ubuntu 22.04 โ From Zero to Hero!


๐ Table of Contents
๐ Introduction: Why ERPNext?
๐ฏ Aim of this Blog
๐ ๏ธ Prerequisites Before You Begin
โ๏ธ Step 1: Server Setup โ Preparing Ubuntu for ERPNext
๐ฆ Step 2: Install Required Packages
๐๏ธ Step 3: Configure MySQL Server
๐ง Step 4: Install CURL, Node.js, NPM, and Yarn
๐๏ธ Step 5: Install Frappe Bench Framework
๐ Step 6: Install ERPNext and Other Applications
โ Final Verification and Testing Your Setup
๐ Conclusion: Running ERPNext Smoothly
๐ Introduction : Why ERPNext?
Running a business requires managing multiple operations finance, sales, HR, payroll, CRM, projects, and more. Instead of juggling multiple tools, wouldnโt it be better to have one platform for everything? Thatโs exactly what ERPNext delivers.
ERPNext is an open-source ERP solution designed to simplify and automate business processes. From startups to enterprises, itโs trusted worldwide for being cost-effective, flexible, and scalable. Unlike other ERP tools that demand heavy licensing costs, ERPNext offers a free and community-driven platform that anyone can install and use.This blog is your complete, beginner-friendly guide to installing ERPNext on Ubuntu 22.04 LTS.
๐ฏ Aim of this Blog
The main objective of this guide is to help you:
โ Understand ERPNext installation requirements.
โ Learn server setup and dependency installation.
โ Configure and install ERPNext with Frappe framework.
โ Explore add-on modules like HR, Payroll, Sales, and CRM.
By the end, youโll have a fully functional ERPNext system running on your local machine.
๐ ๏ธ Prerequisites Before You Begin
Before we start the installation, make sure your system meets the minimum requirements:
๐น Operating System
- Ubuntu 22.04 LTS (64-bit)
๐น Minimum Hardware Requirements
CPU: 2 cores
RAM: 2 GB
Storage: 15 GB free disk space
(Tip: For smoother performance, 4 GB RAM and 2+ CPUs are recommended.)
๐น Setup Environment
Perform the installation on a local machine for practice/testing.
Ensure you have basic Linux command knowledge (updating system, installing packages, using terminal).
โ๏ธ Step 1: Server Setup โ Preparing Ubuntu
Before we start installing ERPNext, letโs make sure our Ubuntu 22.04 server is ready.
๐น Update & Upgrade Packages
Keep the system up to date:
sudo apt update && sudo apt upgrade -y
๐น Set Timezone
Correct timezone ensures accuracy in reports, HR, and payroll:
sudo timedatectl set-timezone Asia/Kolkata
๐น Install Basic Tools
Essential utilities for smooth installation:
sudo apt install git curl wget htop nano unzip -y
โ Thatโs it! Your server is now ready to proceed with ERPNext installation.
๐ฆ Step 2: Install Required Packages
In this step, we install the essential tools for Python, create swap memory for smooth performance, and set up MariaDB (MySQL alternative) for database support.
๐ Install Python + Build Tools
sudo apt -y install python3 python3-pip python3-venv python3-dev build-essential libffi-dev libssl-dev
๐ Explanation:
python3 โ Installs the Python 3 interpreter.
python3-pip โ Python package manager (used to install libraries).
python3-venv โ For creating isolated virtual environments.
python3-dev โ Development headers required for compiling Python extensions.
build-essential โ Provides compiler tools like
gcc
andmake
.libffi-dev & libssl-dev โ Required for cryptography and secure connections.
๐ These dependencies are necessary for ERPNext/Bench to work properly.
๐ง Create & Enable Swap Memory
sudo fallocate -l 2G /swapfile # Create a 2GB swap file
sudo chmod 600 /swapfile # Set correct permissions
sudo mkswap /swapfile # Format the swap file
sudo swapon /swapfile # Enable swap
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab # Make swap permanent after reboot
๐ Explanation:
Swap memory acts as virtual RAM using disk space.
If the system runs out of physical RAM, swap ensures processes donโt crash.
Here, we created a 2GB swap file to handle heavy package installations and Python compilations smoothly.
๐๏ธ Install MariaDB (MySQL Server)
sudo apt -y install mariadb-server mariadb-client
๐ Explanation:
mariadb-server โ Installs the database engine (where ERPNext stores data).
mariadb-client โ Provides tools to interact with the database.
๐ MariaDB is a drop-in replacement for MySQL โ it uses the same commands but is faster and open-source.
๐๏ธ Step 3: Configure MySQL Server
Now, letโs secure the MariaDB server.
sudo mysql_secure_installation
๐ Explanation:
This is an interactive script that asks security-related questions:
Set root password โ Protects the database root user with a password.
Remove anonymous users โ Deletes default anonymous accounts.
Disallow remote root login โ Ensures root can only log in from localhost.
Remove test database โ Deletes the unnecessary test DB.
๐ These steps make MariaDB secure and production-ready.
๐ Understanding the bind-address
in MariaDB for ERPNext
When setting up ERPNext on Ubuntu with MariaDB, one important configuration line you might have noticed in the erpnext.cnf
file is:
bind-address = 127.0.0.1
But what does this mean, and why do we use it? ๐ค
๐ What is bind-address
?
The bind-address
tells MariaDB which network interface (IP address) it should listen to for incoming connections.
127.0.0.1
โ This is the loopback address (localhost). It means MariaDB will only accept connections from the same machine where it is installed.Any other IP (like
0.0.0.0
or serverโs public IP) โ MariaDB would listen to requests from outside machines too.
๐ Why use 127.0.0.1
for ERPNext?
For most ERPNext installations:
โ
ERPNext and MariaDB run on the same server.
โ
We donโt need external machines to connect directly to MariaDB.
โ
It provides better security, as no one from outside the server can attempt to connect to the database.
This is why:
bind-address = 127.0.0.1
is the safest choice for local or single-server ERPNext setups.
โก Step 4: Install Redis, Node.js, Yarn & Frappe Bench
In this step, we will install all the required tools to run ERPNext efficiently.
๐ ๏ธ 4.1 Install Redis & wkhtmltopdf
1๏ธโฃ Install Redis & wkhtmltopdf:
sudo apt -y install redis-server wkhtmltopdf
๐ redis-server
: Used for caching and background task queues.
๐ wkhtmltopdf
: Helps ERPNext generate PDF reports (Invoices, Quotations, etc.).
2๏ธโฃ Enable Redis to start on boot:
sudo systemctl enable redis-server
๐ Makes sure Redis automatically starts when the server reboots.
3๏ธโฃ Start Redis immediately:
sudo systemctl start redis-server
๐ Runs Redis service right now without waiting for reboot.\
4๏ธโฃ Test Redis is working:
redis-cli ping
๐ If Redis is active, you will see PONG โ .
โ๏ธ 4.2 Install Node.js
1๏ธโฃ Add Node.js 18.x repository:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
๐ Downloads & configures Node.js LTS (18.x) setup for Ubuntu.
2๏ธโฃ Install Node.js:
sudo apt -y install nodejs
๐ Installs both Node.js (runtime) and npm (package manager).
๐ฆ 4.3 Install Yarn
1๏ธโฃ Install Yarn globally:
sudo npm install -g yarn
๐ Yarn is a faster package manager used by ERPNext frontend for handling JavaScript libraries.
2๏ธโฃ Check Yarn version:
yarn -v
๐ Confirms Yarn is installed successfully.
3๏ธโฃ Check Node.js version:
node -v
๐ Confirms Node.js installed properly.
4๏ธโฃ Check npm version:
npm -v
๐ Confirms npm (Node package manager) is working.
๐ 4.4 Install Frappe Bench
1๏ธโฃ Install pipx (required for managing Python apps safely):
sudo apt -y install pipx
๐ Installs pipx, which isolates Python-based applications.
2๏ธโฃ Add pipx to system PATH:
pipx ensurepath
๐ Ensures pipx commands can run globally from terminal.
3๏ธโฃ Install Frappe Bench:
pipx install frappe-bench
๐ Installs the bench tool, used to create and manage ERPNext projects/sites.
4๏ธโฃ Verify Bench installation:
bench --version
๐ Confirms that Bench is installed correctly.
โจ โ At this point, Redis, Node.js, Yarn, and Frappe Bench are all set up!
๐๏ธ Step 5: Installing Frappe Bench Framework
The Frappe Bench is the backbone of ERPNext. It helps you create, manage, and run multiple ERPNext sites with ease ๐. Letโs set it up!
โก 1. Create a Frappe Directory
mkdir -p ~/frappe && cd ~/frappe
๐น mkdir -p ~/frappe
โ Creates a new folder called frappe inside your home directory.
๐น cd ~/frappe
โ Immediately moves you inside that folder.
๐ This ensures we have a clean space where all ERPNext files will be stored ๐.
โก 2. Initialize Bench with Frappe v15
bench init --frappe-branch version-15 frappe-bench
๐น bench init
โ Starts the setup of a new Bench environment.
๐น --frappe-branch version-15
โ Installs the latest stable Frappe v15.
๐น frappe-bench
โ Name of the folder where the new Bench environment will be created.
๐ After this, a new directory frappe-bench is created which contains all necessary files โ๏ธ.
โก 3. Move into Bench Directory
cd frappe-bench
๐น Switches into the frappe-bench folder created in the previous step.
๐ From here, you can start creating ERPNext sites and apps ๐ฏ.
โจ Step 6: Installing ERPNext and Applications
Once your Frappe Framework is ready, the next move is to bring ERPNext into action. This step will set up ERPNext inside your local environment ๐.
๐ฅ๏ธ 1. Create a New Site
bench new-site site1.local
๐น Creates a fresh site named site1.local.
๐น It will ask for:
MySQL root password ๐
Administrator password (used later for ERPNext login)
๐ Think of this as preparing an empty house ๐ where ERPNext will live.
๐ฅ 2. Download ERPNext App
bench get-app erpnext --branch version-15
๐น Fetches ERPNext source code from GitHub.
๐น --branch version-15
ensures you install the latest stable ERPNext (v15).
๐ Like bringing ERPNext package ๐ฆ into your system.
๐ 3. Install ERPNext on Your Site
bench --site site1.local install-app erpnext
๐น Installs ERPNext inside your site.
๐น Now, site1.local
is fully powered by ERPNext.
๐ Imagine you just plugged ERPNextโs engine ๐ into your site.
๐จ 4. Build ERPNext Assets
bench build --app erpnext
๐น Compiles JS, CSS, and frontend files.
๐น Without this, your ERPNext dashboard may look broken.
๐ This step decorates the house ๐กโจ, making ERPNextโs UI ready.
โก 5. Install Honcho (Process Manager)
pip install honcho
honcho --version
๐น Honcho helps run multiple services (Frappe, Redis, Workers) together.
๐น First command installs it, second confirms the version.
๐ Think of Honcho as your site manager ๐ท, keeping everything running smoothly.
โ Final Verification and Testing Your Setup
โถ๏ธ Start ERPNext and Access on Localhost
Once ERPNext is installed, itโs time to bring it to life! ๐
๐น Step 1: Go to your bench folder
cd ~/frappe-bench
๐น Step 2: Start ERPNext services
bench start
This command will launch the web server, scheduler, workers, and all background services required for ERPNext.
๐น Step 3: Open ERPNext in your browser
Now visit:
http://site1.local:8000
(If site1.local
doesnโt work, try http://localhost:8000
)
โจ And boom ๐ฅ โ your ERPNext dashboard will appear, ready for you to explore modules like HR, Sales, CRM, Accounting, Inventory, and more! ๐ฏ
๐ After installing ERPNext, complete the Setup Wizard by creating your admin account and entering your company details. Once done, youโll be redirected straight to the ERPNext dashboard, ready to explore all modules. ๐
โ ๏ธ Notice
If you donโt see modules like HR, Sales, CRM, Accounting, or Tools on your ERPNext dashboard after installation, donโt worry!
๐ Simply use the Search Bar (Ctrl + G) at the top and type the module name (e.g., HR or Sales). Once opened, you can pin or add them to your sidebar/dashboard.
This happens because ERPNext hides some modules by default โ but they are all available and just one search away. โ
โ
Conclusion
Youโve now completed the full journey from setting up the server to launching ERPNext on your browser. ๐ฏ With modules like HR, Sales, CRM, Accounting, and Inventory, your business is ready to streamline operations on a modern open-source ERP system. This is just the beginning explore, customize, and make ERPNext truly yours! ๐
๐จโ๐ป About the Author
This project is a deep dive into the ERPNext ecosystem, designed to strengthen my foundation in enterprise resource planning, business automation, and modular integration using open-source technology.
This series isnโt just about installing ERPNext; itโs about mastering the core modules that power modern business management from HR and Sales to Accounting, Inventory, and CRM. ๐
๐ฌ Let's Stay Connected
๐ง Email: gujjarapurv181@gmail.com
๐ GitHub: github.com/ApurvGujjar07
๐ผ LinkedIn: linkedin.com/in/apurv-gujjar
โจ Final Note
This blog is a reflection of my personal journey and learning efforts. I have written and shaped it with my own understanding and dedication. Still, perfection is a continuous process so if you find any mistakes, missing points, or areas of improvement, feel free to share your suggestions in the comments. Your feedback will not only help me improve this work but will also add more value to everyone who reads it. ๐
Thank you for taking the time to read! ๐
Subscribe to my newsletter
Read articles from Gujjar Apurv directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Gujjar Apurv
Gujjar Apurv
Gujjar Apurv is a passionate DevOps Engineer in the making, dedicated to automating infrastructure, streamlining software delivery, and building scalable cloud-native systems. With hands-on experience in tools like AWS, Docker, Kubernetes, Jenkins, Git, and Linux, he thrives at the intersection of development and operations. Driven by curiosity and continuous learning, Apurv shares insights, tutorials, and real-world solutions from his journeyโmaking complex tech simple and accessible. Whether it's writing YAML, scripting in Python, or deploying on the cloud, he believes in doing it the right way. "Infrastructure is code, but reliability is art."