Introduction

ERPNext is an open-source, web-based ERP (Enterprise Resource Planning) software for small and medium-sized businesses. This guide will walk you through the process of installing ERPNext on Debian 12.

Prerequisites

Before you begin, ensure you have:

  1. A Debian 12 server with at least 4GB of RAM
  2. Root or sudo privileges
  3. Python 3.6 or later installed

Step 1: Install Dependencies

Update the package index and install required dependencies:

sudo apt update
sudo apt install -y python3-minimal python3-dev python3-pip git mariadb-server redis-server nginx supervisor

Step 2: Install Bench

Install Bench, a command-line utility for managing ERPNext installations:

sudo pip3 install frappe-bench

Step 3: Create a Bench Instance

Create a new directory for the ERPNext instance and navigate into it:

mkdir erpnext
cd erpnext

Initialize a new Bench instance:

bench init frappe-bench --frappe-branch version-13 --python /usr/bin/python3

Navigate into the Bench directory:

cd frappe-bench

Step 4: Install ERPNext

Install ERPNext using the Bench CLI:

bench get-app erpnext --branch version-13
bench --site site1.local install-app erpnext

Step 5: Set up Nginx

Create a new Nginx server block configuration file for ERPNext:

sudo nano /etc/nginx/sites-available/erpnext

Add the following configuration:

server {
    listen 80;
    server_name your_domain.com;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://127.0.0.1:8000;
    }
}

Enable the Nginx server block and restart Nginx:

sudo ln -s /etc/nginx/sites-available/erpnext /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Step 6: Access ERPNext

Access ERPNext by navigating to your domain in a web browser:

http://your_domain.com

Conclusion

Congratulations! You have successfully installed ERPNext on Debian 12. You can now start using ERPNext for managing your business operations.

Was this answer helpful? 0 Users Found This Useful (0 Votes)