Setting it up
Running on Windows Server
A Linux VM on Hyper-V, or WSL 2 with Docker Engine. Where the operator tool runs, what is not supported, and licensing.
ContactMesh runs as Linux containers, so on Windows Server it needs a Linux environment of its own. Two work: a Linux virtual machine on Hyper-V, which is the one to use for production, and WSL 2 with Docker Engine. Inside either, From nothing to a dashboard applies as written.
A Linux VM on Hyper-V (recommended)
Section titled “A Linux VM on Hyper-V (recommended)”-
Add Hyper-V, in PowerShell as an administrator. The server restarts.
Terminal window Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart -
Create a Generation 2 VM on an external virtual switch, so it has its own address on your network, and install Ubuntu Server LTS in it. Microsoft lists 22.04 and 24.04 as supported guests on Windows Server 2022 and 2025. Give it memory for the three containers, the API and the worker at 1 GB each, and for PostgreSQL and the system.
-
In the VM, install Docker Engine with the Compose plugin as Docker documents it for Ubuntu, then follow the install page.
-
Start the VM with the server, and shut it down cleanly with it:
Terminal window Set-VM -Name contactmesh -AutomaticStartAction Start -AutomaticStopAction ShutDownDocker starts with Ubuntu, and the containers start with Docker.
The VM is a Linux host like any other: the reverse proxy and its certificate go in it, and only its HTTPS port is opened, in its own firewall, as Deploying describes.
WSL 2 with Docker Engine
Section titled “WSL 2 with Docker Engine”For Windows Server 2022 and 2025. Microsoft builds WSL for development, and says it can be challenging in production, so take it for a small or trial installation that somebody looks after.
-
Install WSL, in PowerShell as an administrator, then restart. It enables what WSL needs and installs Ubuntu, with systemd on.
Terminal window wsl.exe --install -
In Ubuntu, install Docker Engine with the Compose plugin as on any Ubuntu host, and put the installation in Ubuntu’s own filesystem, such as
/opt/contactmesh. Windows drives under/mntdo not keep Linux permissions, so.envthere cannot be made readable by its owner only. -
Follow the install page in Ubuntu.
At boot. Docker starts when Ubuntu starts, and the containers with Docker, but Ubuntu starts only when something on Windows starts it, and WSL stops it again once nothing on Windows uses it: a running service does not count. Microsoft documents no way to start it at boot with nobody signed in. The usual way is a scheduled task that runs at startup, as the account that installed Ubuntu, and keeps it in use:
wsl.exe -d Ubuntu --exec sleep infinityRestart the server and see the dashboard come back before you rely on it, and check Microsoft’s current documentation, since this changes with WSL.
Ports and firewall. WSL forwards Ubuntu’s localhost to Windows, so on the server itself the
dashboard answers at http://localhost:5080; other machines cannot reach it. Put the HTTPS reverse
proxy on Windows, pointing at that address, and open only its port in Windows Defender Firewall:
New-NetFirewallRule -DisplayName "ContactMesh HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action AllowA proxy inside Ubuntu instead needs the port forwarded from Windows with netsh interface portproxy, to
Ubuntu’s address, which changes when WSL restarts. WSL’s mirrored networking would avoid that, and
Microsoft documents it for Windows 11; check Microsoft’s current documentation for your Windows Server.
Where the operator tool runs
Section titled “Where the operator tool runs”Where Docker and compose.yaml are: in the VM, or in Ubuntu under WSL, as the Linux build,
./contactmesh. From Windows, that is SSH into the VM, or for WSL:
wsl.exe -d Ubuntu -- /opt/contactmesh/contactmesh statusThe shell commands elsewhere in this manual are for that Linux shell too. In Windows PowerShell 5.1, a
pg_dump redirected into a file with > is written as text, and the dump is broken;
contactmesh backup copies a dump out of its container byte for byte.
The Windows build, contactmesh.cmd beside contactmesh-win-x64.exe, is for a Windows machine whose
own docker runs the containers and sees the installation’s files, such as a Windows 10 or 11
workstation with Docker Desktop. Neither setup on this page is one. See
The operator tool.
Not supported
Section titled “Not supported”- Docker Desktop on Windows Server. Docker does not support Docker Desktop on server versions of Windows.
- Windows containers. They run Windows images only, and ContactMesh’s images are Linux images. Docker’s experimental Linux containers on Windows (LCOW) were deprecated in Docker 20.10 and removed in 23.0.
- A native install, the API and the worker as Windows services against PostgreSQL for Windows. ContactMesh ships as images.
Licensing
Section titled “Licensing”Running on Windows Server changes nothing about ContactMesh’s licence, which does not depend on the operating system. Docker Engine, installed in the VM or in Ubuntu as above, is open source under the Apache License 2.0, at no cost whatever the size of the company. Docker Desktop is the one to watch: Docker’s terms make it free only for personal use, education, non-commercial open source and companies under 250 employees and USD 10 million in annual revenue; other commercial use, and any government use, needs a paid subscription. Check Docker’s current terms before you use it.