In today’s competitive business landscape, having an efficient and integrated Enterprise Resource Planning (ERP) software is crucial for streamlining operations and achieving growth. ERPNext, a free and open-source ERP solution, offers a comprehensive suite of tools to manage various aspects of your business, from finance and inventory to sales and human resources. In this article, we will guide you through the step-by-step process of installing ERPNext on Ubuntu 23.10, enabling you to harness the power of this robust software for your organization.
Prerequisites
Before we dive into the installation process, let’s ensure that we have all the necessary prerequisites in place:
- Ubuntu 23.10 VPS with at least 4GB of RAM and 40GB Disk
- Root access or a user with sudo privileges
- A qualified domain or subdomain name
Update the System
First, let’s start by updating all the packages installed on your Ubuntu 23.10 server. Open your terminal and run the following commands:
apt update -y apt upgrade -y
These commands will update your system with the latest packages and security patches, ensuring a smooth installation process.
Create a New User
To maintain security best practices, it is recommended to create a new user specifically for the ERPNext installation. Follow these steps to create a new Frappe Bench User:
sudo adduser shapehost usermod -aG sudo shapehost su shapehost cd /home/shapehost
Replace “shapehost” with the desired username for your ERPNext installation.
Install Dependencies
Next, let’s install the necessary dependencies to ensure a seamless installation process. Open your terminal and run the following commands:
sudo apt-get install git sudo apt-get install python3 python3-dev python3-setuptools python3-pip python3-distutils sudo apt-get install python3.11-venv sudo apt-get install software-properties-common sudo apt install mariadb-server mariadb-client sudo apt-get install redis-server
These commands will install GIT, Python 3.11, virtual environment, MariaDB, and Redis Server, which are essential components for ERPNext.
Configure MariaDB
Now, let’s configure the MariaDB server for ERPNext. Run the following command to secure your MariaDB installation:
sudo mysql_secure_installation
Follow the prompts and set a secure password for the root user.
Next, we need to edit the MySQL default config file. Open the file with your preferred text editor:
sudo nano /etc/mysql/my.cnf
Add the following lines to the file:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Save the changes and exit the text editor.
Finally, restart the MySQL server to apply the new configuration:
sudo service mysql restart
Install CURL, Node, NPM, and Yarn
To install additional required packages, run the following commands:
sudo apt install curl curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash source ~/.profile nvm install 16.15.0 sudo apt-get install npm sudo npm install -g yarn
These commands will install CURL, Node.js 16.15.0, NPM, and Yarn, which are necessary for the smooth functioning of ERPNext.
Install Frappe Bench
Now, let’s install Frappe Bench, a command-line utility for managing ERPNext installations. Run the following command:
sudo pip3 install frappe-bench
This command will install Frappe Bench, allowing you to create and manage ERPNext instances effortlessly.
Initialize Frappe Bench
To initialize Frappe Bench and set up a new ERPNext installation, run the following command:
bench init --frappe-branch version-14 frappe-bench
This command will initialize Frappe Bench with the latest version of ERPNext (version-14). It may take a few moments to complete the process.
Download ERPNext and Other Apps
To download ERPNext and other apps required for your installation, run the following commands:
bench get-app payments bench get-app --branch version-14 erpnext bench get-app hrms
These commands will download the Payments, ERPNext, and HRMS apps, which are essential for ERPNext functionality.
Install ERPNext and Other Apps
Now, let’s install ERPNext and the additional apps on your site. Run the following commands:
bench --site erpnext.domainhere.info install-app erpnext bench --site erpnext.domainhere.info install-app hrms
Replace “erpnext.domainhere.info” with your qualified domain or subdomain name.
Start the Bench
To start the Frappe Bench and run your ERPNext instance, run the following command:
bench start
Please note that instances running in develop mode will not start automatically upon server restart. You will need to run the “bench start” command every time you restart your server manually.
Enable Scheduler
To enable the scheduler for your ERPNext instance, run the following command:
bench --site erpnext.domainhere.info enable-scheduler
This command will enable the scheduler, allowing ERPNext to automate various tasks and workflows.
Disable Maintenance Mode
If your ERPNext instance is currently in maintenance mode, run the following command to disable it:
bench --site erpnext.domainhere.info set-maintenance-mode off
This command will disable maintenance mode, allowing users to access your ERPNext instance.
Setup Production Mode
To set up ERPNext for production usage, we need to configure NGINX and Supervisor. Run the following commands:
sudo bench setup production erpnext.domainhere.info sudo apt install supervisor sudo supervisorctl restart all
When prompted to save the new or existing config file, respond with “Y” to proceed.
These commands will set up ERPNext in production mode, ensuring optimal performance and stability. Your ERPNext instance will now start automatically upon server restart.
Setup Let’s Encrypt SSL/TLS Certificates with NGINX
To secure your ERPNext instance with SSL/TLS certificates from Let’s Encrypt, follow these steps:
sudo apt-get install certbot python3-certbot-nginx pip install urllib3==1.26.15 requests-toolbelt==0.10.1 sudo certbot --nginx -d erpnext.domainhere.info
Replace “erpnext.domainhere.info” with your qualified domain or subdomain name.
These commands will install the Let’s Encrypt client and obtain SSL/TLS certificates for your ERPNext instance. The certificates will be automatically renewed in the background to ensure ongoing security.
Conclusion
Congratulations! You have successfully installed ERPNext on your Ubuntu 23.10 server. With ERPNext’s comprehensive suite of tools, you can streamline your business operations and drive growth. By following the step-by-step instructions in this guide, you have set up a powerful ERP solution that will empower your organization with efficiency, scalability, and security.
For reliable and scalable cloud hosting solutions for your ERPNext instance, consider Shape.host’s Cloud VPS services. With their expertise in cloud hosting and commitment to exceptional service, Shape.host is the ideal partner to ensure the optimal performance and availability of your ERPNext installation.