OpenClaw: Fixing the "Systemctl Unavailable" Error in Docker & WSL

Run services the right way in containers and WSL

If you see System has not been booted with systemd as init system, you’re calling a service manager in an environment that doesn’t support it. Here’s how to fix it—correctly—based on your setup.

Containers manage processes directly; WSL2 can run native systemd if enabled. Use Docker Compose in Docker, enable systemd in WSL, and apply advanced flags in LXC/Proxmox environments.

1) The Docker Solution: Use Docker Compose

In Docker, you should never use systemctl. Docker manages processes via its engine—not via systemd inside the container. Use the official OpenClaw Docker workflow:

# Clone the repository
git clone https://github.com/openclaw/openclaw.2.

# Run setup
./docker-setup.sh

# Manage lifecycle with Compose
docker compose up -d       # Start
docker compose down        # Stop
docker compose ps          # Status

# Interact with OpenClaw (examples)
docker compose exec openclaw-gateway node dist/index.js devices approve [ID]

Compose files define services, health checks, volumes, and networks—the right way to run OpenClaw in Docker.

2) The WSL2 Solution: Enable Native systemd

If you run OpenClaw directly inside a WSL2 distro (Ubuntu/Debian) and want system services, enable systemd support.

Requirement: Latest WSL (check in PowerShell: wsl --version should be 0.67.6+).

# Inside WSL (Ubuntu/Debian)
sudo nano /etc/wsl.conf

# Add:
[boot]
systemd=true

# Save and exit (Ctrl+O, Enter, Ctrl+X)

# Critical step: Restart WSL from PowerShell
wsl --shutdown

# Re-open your terminal and verify
systemctl list-unit-files --type=service

After enabling, system services become available and the error disappears.

3) Proxmox / LXC / Advanced Fix

In unprivileged containers or environments where systemd cannot be enabled at the kernel level, use OpenClaw’s bypass flags or a mock.

# Bypass user-level systemd requirements
openclaw daemon install --system

# If a script strictly requires `systemctl`, use a replacement
# (mocks the command without an actual daemon)
# docker-systemctl-replacement

Use these options when systemd is not available due to container constraints.

Summary: Which Fix Should I Use?

Docker / Docker Desktop

Stop using systemctl. Use docker compose for lifecycle management.

WSL2 (Ubuntu/Debian)

Enable systemd=true in /etc/wsl.conf and restart WSL.

Proxmox LXC

Use --system (or --force) flags in the CLI to bypass checks.

VPS / Dedicated Server

Ensure you’re using a user/session with systemd permissions and a compatible init system.

Need help with docker-compose.yml?

I can help you configure Compose for OpenClaw plugins and gateway.

Back to Troubleshooting Overview

How to Enable Systemd in WSL (Video)