How to Install ERPNext on Clear Linux Latest

ERPNext is a free, open-source enterprise resource planning (ERP) software that helps businesses manage their operations. Clear Linux, on the other hand, is a lightweight and fast Linux distribution that is designed for cloud and data center environments.

In this tutorial, we will walk you through the process of installing ERPNext on Clear Linux latest.

Prerequisites

Before you begin, make sure that you have:

Step 1: Install Dependencies

First, you need to install some necessary dependencies for ERPNext:

sudo swupd bundle-add nginx mariadb python38 nodejs-default

Step 2: Clone ERPNext

Next, you need to clone the latest version of ERPNext repository from GitHub.

sudo git clone https://github.com/frappe/erpnext.git --branch version-13 --depth 1 --recursive

Step 3: Install ERPNext

Now, navigate to the ERPNext directory and run the install.py script to install ERPNext.

cd erpnext && sudo python3 install.py --production --site_name example.com

Once the installation is complete, it will display the credentials for the ERPNext Administrator account. Make sure to note them down as they will be required for the next step.

Step 4: Configure Nginx and Firewall

Next, you need to configure Nginx to serve ERPNext and allow incoming connections through the firewall.

Configure Nginx

Create a Nginx configuration file for ERPNext.

sudo nano /etc/nginx/conf.d/erpnext.conf

Paste the following configuration and replace example.com with your domain name, and update the SSL certificate paths if you have installed one:

server {
    listen 80;
    server_name example.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name example.com;
    ssl_certificate /path/to/ssl/certificate;
    ssl_certificate_key /path/to/ssl/private/key;

    proxy_read_timeout     1200s;
    proxy_connect_timeout  240s;
    proxy_redirect        dev-jd-publish-190.asseco.pl https://example.com;

    ssl_protocols         TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:50m;

    location / {
        proxy_pass       http://localhost:8000;
        proxy_buffering             off;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
    }

    location /socket.io {
        proxy_pass http://localhost:9000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    location /assets/ {
        expires max;
        add_header Cache-Control public;
        add_header ETag "";
        add_header Access-Control-Allow-Origin *;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        if (-f $request_filename) {
            break;
        }
        rewrite ^/assets/(.*)$ /assets/bench/$1;
        proxy_pass       http://localhost:8000;
    }
}

Once done, save and exit.

Configure Firewall

Allow incoming connections through the firewall for ports 80 and 443.

sudo firewall-cmd --permanent --zone public --add-service=http
sudo firewall-cmd --permanent --zone public --add-service=https
sudo firewall-cmd --reload

Step 5: Access ERPNext

Now, open your web browser and visit your domain name. You should see the ERPNext login page.

Login with the credentials provided during the installation process and start using your ERPNext.

Congratulations! You have successfully installed ERPNext on Clear Linux latest.

Conclusion

In this tutorial, we have shown you how to install ERPNext on Clear Linux latest. We have also configured Nginx to serve ERPNext and allowed incoming connections through the firewall.

If you face any issues during the installation process, please refer to the ERPNext documentation or ask for help from the ERPNext community.

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!