ERPNext doesn’t natively run on Windows, but WSL (Windows Subsystem for Linux) makes it possible. This guide walks you through setting up WSL and installing ERPNext for development on Windows.

STEP 1 Enable WSL

Open PowerShell as Administrator and run:

wsl --install

Restart your computer. After restart, WSL will finish installing Ubuntu. Set your Linux username and password when prompted.

STEP 2 Update Ubuntu

sudo apt update && sudo apt upgrade -y

STEP 3 Install Dependencies

sudo apt install -y python3-dev python3-pip python3-setuptools python3-venv
sudo apt install -y software-properties-common git curl
sudo apt install -y redis-server mariadb-server mariadb-client
sudo apt install -y libffi-dev libssl-dev libmysqlclient-dev
sudo apt install -y wkhtmltopdf

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g yarn

STEP 4 Start Services

WSL doesn’t use systemd by default, so start services manually:

sudo service mariadb start
sudo service redis-server start

STEP 5 Configure MariaDB

sudo mysql_secure_installation
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Add under [mysqld]:

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

[mysql]
default-character-set = utf8mb4
sudo service mariadb restart

STEP 6 Install Bench and ERPNext

sudo pip3 install frappe-bench
bench init --frappe-branch version-15 frappe-bench
cd frappe-bench
bench new-site site1.local
bench get-app erpnext --branch version-15
bench --site site1.local install-app erpnext
bench start

Open your Windows browser and go to:

http://localhost:8000

Auto-Start Services Script

Create a script to start services when you open WSL:

nano ~/.bashrc

Add at the bottom:

sudo service mariadb start 2>/dev/null
sudo service redis-server start 2>/dev/null

You now have a fully working ERPNext development environment on Windows. Use VS Code with the WSL extension for the best development experience.

Share this article

Comments

Join the discussion. Got a question, found an issue, or want to share your experience?

Leave a Comment

Your email stays private. We just use it for replies.

Nothing to preview yet.

Use **bold**, *italic*, `code`, ```code blocks```, [link](url), > quote, - list