Installing WSL on Windows and Setting Up ERPNext (Step-by-Step Guide)

2 min read
If you're a developer or system admin looking to run ERPNext on a Windows machine, using WSL (Windows Subsystem for Linux) here is one of the most seamless ways to do it.
In this guide, you’ll learn how to:
- Install WSL on Windows
- Set up a Linux environment
- Install Bench and ERPNext
- Start a development server
1. Install WSL on Windows
Open PowerShell as Administrator and run:
wsl --install
This installs:
WSL 2
Ubuntu (default Linux distro)
Required kernel updates
After installation, restart your machine, then open Ubuntu from the Start menu.
2. Set Up Ubuntu in WSL
When Ubuntu opens for the first time:
Create a username and password (Linux user)
Update your system:
bash
Copy
Edit
sudo apt update && sudo apt upgrade -y
Install required dependencies:
bash
Copy
Edit
sudo apt install python3-dev python3-pip python3-setuptools python3-venv \
redis-server curl git gcc g++ make mariadb-server -y
3. Create a Python Virtual Environment for Bench
WSL follows PEP 668, so you’ll want to isolate Python packages.
bash
Copy
Edit
sudo apt install python3-venv -y
python3 -m venv ~/.bench-env
source ~/.bench-env/bin/activate
Install Bench:
bash
Copy
Edit
pip install frappe-bench
4. Create Your ERPNext Workspace
bash
Copy
Edit
bench init erpnext-dev --frappe-branch version-14
cd erpnext-dev
Download the ERPNext app:
bash
Copy
Edit
bench get-app erpnext --branch version-14
5. Create and Set Up a Site
bash
Copy
Edit
bench new-site demo-erp
When prompted:
Set a MySQL root password
Set the ERPNext admin password
Install the ERPNext app on your site:
bash
Copy
Edit
bench --site demo-erp install-app erpnext
🚀 6. Start the Development Server
bash
Copy
Edit
bench start
Open your browser and visit:
arduino
Copy
Edit
http://localhost:8000
Log in with:
Username: Administrator
Password: the one you set during site creation
Tips for Daily Use
Reactivate Virtual Environment
Each time you open Ubuntu:
bash
Copy
Edit
source ~/.bench-env/bin/activate
cd ~/erpnext-dev
bench start
You’re Done!
You’ve successfully:
Installed WSL
Set up a virtual Python environment
Installed ERPNext
Launched your local ERP system!
Now you’re ready to build modules, experiment, or run a full ERP on your Windows machine using Linux via WSL.
0
Subscribe to my newsletter
Read articles from collince kiprotich directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
