Installation of ERPNext on Windows

Krupalvora
5 min readJul 16, 2023

--

Install ERPNext on Windows using VirtualBox, Ubuntu Server, and port forwarding.

Since the Frappe framework is itself open-source, it supports only Linux OS. But we all might not use Linux as the Host operating system, which discourages learners from starting with it.

Before starting with installation, let us understand what ERP is and its use cases.

Enterprise Resource Planning (ERP) systems are used by organizations to streamline and integrate various business processes across departments and functions. Here are some common reasons why ERP is used:

Centralized Data Management: ERP systems provide a central database that allows for the storage, management, and retrieval of data from various business functions. This eliminates data duplication, improves data accuracy, and provides real-time access to information for decision-making.

Process Automation: ERP systems automate repetitive and time-consuming tasks such as data entry, inventory management, financial processes, and reporting. By automating these processes, organizations can increase efficiency, reduce errors, and free up employees’ time for more value-added activities.

Streamlined Operations: ERP systems integrate various business functions such as finance, human resources, procurement, inventory management, sales, and customer relationship management. By consolidating these functions into a unified system, organizations can streamline their operations, eliminate silos, and improve overall efficiency.

Data Visibility and Reporting: ERP systems provide real-time visibility into key business metrics and performance indicators. This allows managers and executives to monitor the organization’s performance, make data-driven decisions, and generate comprehensive reports for analysis and planning.

So, one of the challenging parts is its installation. Since the frappe frame is itself open-source, it supports only the Linux OS. But we all might not use Linux as the Host operating system, which discourages learners from starting with it.

This article provides one of the best and most optimized ways to install and use ERPNext on Windows.

Prerequisites:

  1. Oracle VM virtual box
  2. Ubuntu Server 22 iso file
  3. Install the Ubuntu server on the virtual box with 4 GB of RAM, a 2-core processor, and a minimum of 20 GB of disk space. (Reference)

Note: During the installation process, it will prompt you to enter the password. Try to keep the password the same throughout the process.

Steps:

  1. Update packages.

sudo apt-get update

2. Install Git.

sudo apt-get install git

3. Install Python. It might prompt Y/N to enter Y.

sudo apt-get install python3-dev python3.10-dev python3-setuptools python3-pip python3-distutils

4. Install MariaDB.

sudo apt install mariadb-server mariadb-client

It will ask to restart services. Usespace key to select services and ARROW keys to move UP & DOWN, TAB and hit ENTER .

5. Install Redis Server.

sudo apt-get install redis-server

6. Install other packages.

sudo apt-get install xvfb libfontconfig wkhtmltopdf
sudo apt-get install libmysqlclient-dev

7. Setup the MYSQL server.

sudo mysql_secure_installation

It will prompt the following:

Enter current password for root: (Enter your SSH root user password)
Switch to unix_socket authentication [Y/n]: Y
Change the root password? [Y/n]: Y
It will ask you to set a new MySQL root password at this step. This can be different from the SSH root user password.
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n]: N
This is set as N because we might want to access the database from a remote server for using business analytics software like Metabase / PowerBI / Tableau, etc.
Remove the test database and access it. [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

8. Edit the MYSQL default config file.

sudo nano /etc/mysql/my.cnf

Add the following block of code exactly as is:

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4

Save & Exit: CTRL + X → Y → Press Enter. And restart services.

sudo service mysql restart

9. Instal CURL, Node, NPM, and Yarn.

sudo service mysql restart
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

10. Create a folder ERP .

mkdir erp
cd erp

11. Install Frappe Bench.

sudo pip3 install frappe-bench

12. Initialize Frappe Bench.

bench init — frappe-branch version-14 frappe-bench

13. Switch directories into the Frappe Bench directory.

cd frappe-bench

14. Create a New Site.

bench new-site [site-name]

15. Install ERPNext.

bench get-app — branch version-14 erpnext

16. Install all the apps on our site.

bench — site [site-name] install-app erpnext

Now we have successfully installed ERP next on our server. To access it on the host machine i.e. on Windows we need to do port forwarding using open-ssh.

17. Install OpenSSH and configure ports.

sudo apt install openssh-server
sudo systemctl status ssh
sudo ufw status
sudo ufw enable
sudo ufw allow 8000
sudo ufw allow 3306

List of ports allowed.

18. VM Network configuration.

Select VM → Click on settings → Network → Advanced → Port Forwarding.

Add the below Name and Host, Guest IP & port number.

Settings in the Network tab of the Ubuntu server.

19. Select a site and run the frappe server on the Ubuntu server.

bench use [site-name]
bench start

20. Visit localhost:8000 on a Windows machine. You will ask for a username and password.

User name: Administrator

Password : [Your-password]

Setup account.
Enter details accordingly.

--

--