How to Install ERPNext on Arch Linux

ERPNext is an open-source ERP software that is designed to help businesses run efficiently. It is a reliable software that provides various features and functions to automate and manage day-to-day business operations. In this tutorial, we will explore how to install ERPNext on Arch Linux.

Prerequisites

To install ERPNext on Arch Linux, ensure that you have the following prerequisites:

Step 1: Install Dependent Packages

Before proceeding with the ERPNext installation, ensure that all necessary dependencies are available on your system. To install dependent packages, run the following command:

sudo pacman -S yarn wkhtmltopdf python redis nginx

Step 2: Install ERPNext

Now, we can proceed to install ERPNext on Arch Linux. Follow the steps below:

  1. Clone the ERPNext repository from GitHub:
sudo git clone https://github.com/frappe/erpnext.git
  1. Navigate to the cloned directory and run the setup script:
cd erpnext
sudo python setup.py install
  1. Install ERPNext with the following command:
sudo bench init frappe-bench
cd frappe-bench
sudo bench get-app erpnext https://github.com/frappe/erpnext.git
sudo bench --site <site-name> install-app erpnext

Note: Replace <site-name> with the name of the site you want to create.

  1. After completing the installation, set up the supervisor configuration by creating a configuration file:
sudo nano /etc/supervisor/conf.d/erpnext.conf

Add the following configuration to the file:

[program:frappe-web]
command=/home/<user>/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 4 -t 120 frappe.app:application --preload
directory=/home/<user>/frappe-bench/sites
user=<user>
autostart=true
autorestart=true
redirect_stderr=true

Note: Replace <user> with your username.

  1. Save the configuration and reload the supervisor configuration:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start frappe-web

Step 3: Configure Nginx

Now, configure the Nginx web server to access the ERPNext application. Follow the steps below:

  1. Create an Nginx configuration file:
sudo nano /etc/nginx/conf.d/erpnext.conf

Add the following configuration to the file:

server {
    listen 80;
    server_name yourdomain.com;
    root /home/<user>/frappe-bench/sites;

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

    location /assets {
        expires 365d;
        add_header Cache-Control public;
        add_header ETag "";
        break;
    }

    location /files {
        proxy_pass http://localhost:9000;
        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_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_buffering off;
        access_log off;
    }
}
  1. Save the configuration file, check the Nginx configuration, and restart the Nginx service:
sudo nginx -t
sudo systemctl restart nginx

Step 4: Access ERPNext

Finally, open your web browser and enter your server IP address or domain name in the browser's URL bar. You will be redirected to the ERPNext login page. Enter your login details and start using ERPNext.

Congratulations! You have successfully installed ERPNext on Arch Linux.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!