WSL
π₯οΈ Deploying DMB on Windows Setup Guide (Docker/WSL)#
Docker Desktop
Ensure that Docker Desktop is not installed; if so, uninstall and reboot before proceeding.
This guide will walk you through setting up DMB on a Windows system using a lightweight Docker + WSL2 setup, without relying on Docker Desktop.
π§ WSL Install#
-
From the Microsoft Store, install Windows Subsystem for Linux (WSL)
-
From the Microsoft Store, install Ubuntu 22.04 LTS
-
Follow the setup to create your Ubuntu username and password
-
From a Windows Command Prompt, paste the following:
cd C:\WINDOWS\system32
-
Then set Ubuntu 22.04 as the default distro:
wsl --setdefault Ubuntu-22.04
-
From the Windows app menu, start Ubuntu 22.04, then paste the following inside the terminal:
sudo apt update sudo apt upgrade -y sudo mount --make-rshared /
Note
sudo mount --make-rshared /
does not persist after reboots. Youβll need to run it each time WSL2 or Windows is restarted.Alternatively, see the Ubuntu systemd service guide to automate this at startup.
π³ Docker Install#
-
Once Docker is installed, you can either:
- Use the standard Docker CLI to create the container
- Or follow the Docker Deployment or Portainer Deployment guides for predefined setups
π Accessing the Mount on Windows#
-
From the Ubuntu terminal, open File Explorer in the current directory:
explorer.exe .
-
A new File Explorer window will appear β youβre now inside the Ubuntu file system
-
Navigate to the mount location and copy the full path from the Explorer address bar
-
In another File Explorer window:
- Click This PC
- Right-click in the blank space and select Add a network location
-
In the popup:
- Click Next twice
- Paste the WSL path you copied
-
Complete the remaining prompts to finalize the mount
π Mirrored Mode Networking#
Starting with Windows 11 22H2, WSL2 supports a new networking mode called mirrored networking, which improves compatibility and unlocks several new features by mirroring Windows' network interfaces into Linux.
β Benefits of Mirrored Networking#
- π§ Full IPv6 support
- π Access Windows services from WSL using
127.0.0.1
- π Improved VPN support (VPNs work in both Windows and WSL)
- π‘ Multicast compatibility
- π§· Reach WSL directly from your local LAN
π§ Enabling Mirrored Mode#
-
Open (or create) the
.wslconfig
file in your Windows home directory:notepad $env:USERPROFILE\.wslconfig
-
Add the following section:
[wsl2] networkingMode=mirrored
-
Restart WSL for the changes to take effect:
wsl --shutdown
Then restart your distro from the Windows menu or run:
wsl
π Additional Notes#
- You can combine this with
autoProxy=true
if you're using a proxy. - This setting applies globally across all WSL2 instances.
π Extra Credit#
If you want to manage Docker visually via Portainer:
-
Create the Portainer data volume:
docker volume create portainer_data
-
Start the Portainer container:
docker run -d \ -p 8000:8000 \ -p 9443:9443 \ --name portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ portainer/portainer-ce:latest
You can now manage Docker containers via the browser at: https://<ip>:9443
Note
On the first run of Portainer, you need to access the Web UI quickly to create your initial administrator user, which is crucial for accessing and managing your Docker environment.
Tip
If you can't access the UI after the initial setup, ensure the Portainer container is running and that the correct port is open. You might need to restart the container if it timed out.
For more, see the Portainer Deployment Guide.
Now youβre ready to run DMB inside WSL2 with full Docker support β no Docker Desktop required!