WSL systemd not running — enable it for Docker, GPU, and multi-service workflows
WSL2 defaults to a non-systemd init for speed. For Docker, NVIDIA Container Toolkit, and multi-service AI stacks, you need systemd enabled. Here's how to turn it on and verify it's running.
Diagnostic order — most likely first
systemd not enabled in wsl.conf (default WSL behavior)
`systemctl status` returns 'System has not been booted with systemd as init system.' `ps -p 1` shows `/init` (not `/lib/systemd/systemd`). systemd is disabled by default in WSL2 for faster boot times.
Edit `/etc/wsl.conf` inside your distro. Add: ``` [boot] systemd=true ``` Exit the distro. In PowerShell: `wsl --shutdown`. Restart your distro. Verify: `ps -p 1` should now show `/lib/systemd/systemd`. Note: this requires WSL2, not WSL1, and a recent WSL version (2.0+). Run `wsl --version` in PowerShell to check.
WSL version too old for systemd support
`wsl --version` in PowerShell shows WSL version < 2.0. systemd support was added in WSL 2.0 (shipped with Windows 11 22H2+). Older WSL versions (1.x) don't support systemd regardless of wsl.conf settings.
Update WSL: run `wsl --update` in PowerShell as admin. If that fails, install the latest WSL from the Microsoft Store (search 'Windows Subsystem for Linux') or via `wsl --install --web-download` to force the web installer (bypasses Store issues). After update, `wsl --version` should show 2.0+. Then enable systemd in wsl.conf as above.
Docker Desktop needs systemd for the NVIDIA Container Toolkit service
`sudo systemctl status docker` shows docker.socket over systemd. When systemd isn't running, Docker installed via `apt` can't start as a service. The NVIDIA Container Toolkit configures its runtime via a systemd hook that requires the Docker service to be systemd-managed.
Enable systemd (see cause 0). Then install Docker Engine natively inside WSL (not Docker Desktop's WSL backend): `sudo apt install docker.io` or follow Docker's official Ubuntu install guide. The NVIDIA Container Toolkit (`sudo apt install nvidia-container-toolkit`) registers with the systemd-managed Docker daemon. Docker Desktop's WSL backend works without systemd inside WSL — if you hit this issue, you're running Docker Engine directly inside the distro.
wsl.conf syntax error silently disabling systemd
You added `[boot] systemd=true` to `/etc/wsl.conf` but systemd still doesn't start. The file may have a syntax error (missing newline at end, BOM character from a Windows editor, or CRLF line endings). WSL's parser for wsl.conf is strict.
Recreate the file with explicit line endings: `printf '[boot] systemd=true ' | sudo tee /etc/wsl.conf`. Verify the file is correct: `cat -A /etc/wsl.conf` — should show `[boot]$ systemd=true$` (no `^M` CR characters). Then `wsl --shutdown` and restart.
Frequently asked questions
Does enabling systemd slow down WSL boot time?
Yes, by 2-5 seconds on a modern NVMe SSD. Without systemd, WSL boots almost instantly (~1 second). With systemd enabled, the init process starts ~20-40 services depending on your distro. For a daily driver, the difference is negligible. For scripted/automated workflows where boot time matters, you can leave systemd off and start services manually: `sudo service docker start` for Docker, `sudo nvidia-persistenced` for GPU persistence.
Can I run Docker inside WSL without systemd?
Yes, two options: (1) Use Docker Desktop's WSL2 backend — this runs Docker Engine in Docker Desktop's own VM, not in your distro. It doesn't need systemd inside your WSL distro. (2) Start Docker manually: `sudo dockerd &` runs the daemon in the foreground. For production-style workflows (multiple services, auto-restart), systemd is cleaner; for dev workflows, Docker Desktop's WSL backend is simpler.
What else needs systemd inside WSL besides Docker?
Any service you'd normally manage with `systemctl`: PostgreSQL, Redis, Node.js daemons, local web servers, the NVIDIA persistence daemon (`nvidia-persistenced`), SSH server, and any systemd timer or socket-activated service. If your AI stack involves multiple long-running services (Ollama + a custom inference server + a database), systemd is the way to manage them all with `systemctl start/stop/status`.
How do I check if systemd is active before running a service that depends on it?
`systemctl is-active systemd-resolved` returns `active` if systemd is running. Or `ps -p 1 -o comm=` — should return `systemd`. Add this check to scripts that need systemd: `if [ "$(ps -p 1 -o comm=)" != "systemd" ]; then echo 'systemd not running — enable in /etc/wsl.conf'; exit 1; fi`.
Related troubleshooting
WSL2 doesn't pass the GPU through unless the host driver is right and the kernel is current. Here's the install order that actually works in 2026, and how to confirm passthrough is live before you waste an afternoon.
Docker doesn't expose the host GPU by default. The NVIDIA Container Toolkit is the bridge. Here's the install + the runtime config + the four common symptoms that mean it's misconfigured.
WSL2 inherits a fraction of host RAM by default and won't let processes exceed it. Edit .wslconfig to set `memory=32GB` (or whatever you need) and restart WSL. Then verify with `free -h` inside the distro.
When the fix is hardware
A surprising fraction of troubleshooting tickets resolve to: this card doesn't have enough VRAM for what you're asking it to do. If you're hitting OOM after every reasonable fix, or your GPU genuinely can't fit the model you need, it's upgrade time: