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 --installRestart 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 -ySTEP 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 yarnSTEP 4 Start Services
WSL doesn’t use systemd by default, so start services manually:
sudo service mariadb start
sudo service redis-server startSTEP 5 Configure MariaDB
sudo mysql_secure_installation
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnfAdd under [mysqld]:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4sudo service mariadb restartSTEP 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 startOpen your Windows browser and go to:
http://localhost:8000Auto-Start Services Script
Create a script to start services when you open WSL:
nano ~/.bashrcAdd at the bottom:
sudo service mariadb start 2>/dev/null
sudo service redis-server start 2>/dev/nullYou now have a fully working ERPNext development environment on Windows. Use VS Code with the WSL extension for the best development experience.
Comments
Join the discussion. Got a question, found an issue, or want to share your experience?