Windows Development Setup
Complete guide to setting up your Windows development environment for Chatwoot contribution using WSL2.
Windows Development Setup
This guide will walk you through setting up your Windows development environment for contributing to Chatwoot. We’ll use Windows Subsystem for Linux 2 (WSL2) which provides the best development experience on Windows.
Requirements
You need to install the Windows Subsystem for Linux 2 (WSL2) on your Windows machine.
Prerequisites
- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11
- Administrator privileges on your Windows machine
Step 1: Enable Developer Mode
The first step is to enable “Developer mode” in Windows. You can do this by opening up Settings and navigating to “Update & Security”. In there, choose the tab on the left that reads “For Developers”. Turn the “Developer mode” toggle on to enable it.
Step 2: Enable Windows Subsystem for Linux
Next you have to enable the Windows Subsystem for Linux. Open the “Control Panel” and go to “Programs and Features”. Click on the link on the left “Turn Windows features on or off”. Look for the “Windows Subsystem for Linux” option and select the checkbox next to it.
You’ll also need to enable “Virtual Machine Platform” for WSL2. Make sure both checkboxes are selected:
- ✅ Windows Subsystem for Linux
- ✅ Virtual Machine Platform
After enabling these features, restart your computer.
Step 3: Install WSL2 and Ubuntu
Option 1: Using Microsoft Store (Recommended)
- Open Microsoft Store and search for “Ubuntu”
- Install Ubuntu 22.04 LTS (or latest LTS version)
- Launch Ubuntu from the Start Menu
Option 2: Using Command Line
Open PowerShell as Administrator and run:
Step 4: Initial Ubuntu Setup
When you first launch Ubuntu, you’ll be prompted to create a user account:
Update the system packages:
Step 5: Install Core Dependencies
You need core Linux dependencies installed in order to install Ruby and other tools.
Installing RVM & Ruby
Install additional dependencies required for RVM:
Install RVM & Ruby version 3.2.2:
Install Node.js
Chatwoot requires Node.js version 20. Install Node.js from NodeSource using the following commands:
Verify Node.js installation:
Install pnpm
We use pnpm
as the package manager for better performance:
Install PostgreSQL
The database used in Chatwoot is PostgreSQL. Use the following commands to install PostgreSQL:
The installation procedure created a user account called postgres that is associated with the default Postgres role. In order to use PostgreSQL, you can log into that account:
Install libpq-dev
dependencies for Ubuntu:
Start PostgreSQL service:
Configure PostgreSQL to start automatically:
Create a database user:
Install Redis Server
Chatwoot uses Redis server for agent assignments and reporting. To install redis-server
:
Start Redis service:
Configure Redis to start automatically:
Enable Redis to start on system boot:
Install ImageMagick
Chatwoot uses ImageMagick for image processing:
Configure Git
Set up Git with your information:
Windows-Specific Configuration
Install VS Code with WSL Extension
- Install Visual Studio Code on Windows from https://code.visualstudio.com/
- Install Remote - WSL extension from the Extensions marketplace
- Open your project in WSL by running
code .
from your WSL terminal
Configure File Permissions
WSL2 may have file permission issues. Fix them:
Environment Verification
Verify all installations are working correctly:
Troubleshooting Common Issues
If you encounter issues during setup:
- Common Errors: Check Common Errors
- WSL2 Documentation: Microsoft WSL Documentation
- Discord Community: Join our Discord
- GitHub Issues: Create an issue
Your Windows development environment with WSL2 is now ready for Chatwoot development! 🪟🐧