ClawKit Logo
ClawKitReliability Toolkit

Fix "spawn docker ENOENT" Error

Docker Is Not Installed or Not in PATH

OpenClaw's sandbox mode tries to run agents inside Docker containers for security isolation. If Docker isn't installed, the gateway crashes with spawn docker ENOENT. You can either install Docker or disable sandboxing.

"ENOENT" means "Error NO ENTry" — the system can't find the docker executable. This happens when agents.defaults.sandbox.mode is set to "all" (or defaults to sandbox-enabled) but Docker Desktop or Docker Engine isn't installed.

What the Error Looks Like

Error: spawn docker ENOENT
⚠️ agent failed before reply: spawn docker ENOENT. logs: openclaw logs --follow
'docker' is not recognized as an internal or external command
Error: spawn docker ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)

Quick Fix: Disable Sandbox Mode

Instant Fix — No Docker Needed

If you don't need agent sandboxing (most personal setups don't), just turn it off:

# Disable sandbox mode
openclaw config set agents.defaults.sandbox.mode off
# Restart gateway
openclaw gateway restart

Agents will run directly on your host machine instead of inside Docker containers. This is safe for personal use on your own machine.

When You Should Keep Sandbox Enabled

Keep sandboxing on if you're running untrusted skills, multi-user environments, or production workloads. In these cases, install Docker instead of disabling sandbox.

Install Docker: Windows

Windows 10 / 11

Option A: winget (Recommended)

Windows
winget install Docker.DockerDesktop

After installation, start Docker Desktop from the Start Menu. It requires WSL 2:

Install WSL 2 if needed
wsl --install

Option B: Manual Download

Download from docker.com/products/docker-desktop. Run the installer and restart your computer.

Install Docker: macOS

macOS
Homebrew
brew install --cask docker

Then open Docker Desktop from Applications. Wait for the whale icon to appear in the menu bar before running OpenClaw.

Install Docker: Linux

Linux
Linux
# Official install script (Ubuntu, Debian, Fedora, etc.)
curl -fsSL https://get.docker.com | sh

# Add your user to the docker group (avoids needing sudo)
sudo usermod -aG docker $USER

# Log out and back in, then verify
docker --version

Docker Installed But Not Found

If Docker is installed but you still get ENOENT, the docker binary is not in your system PATH.

Check Docker location
# macOS/Linux
which docker

# Windows
where docker
1

Docker Desktop not running

Docker Desktop must be running for the docker CLI to work. Open it from your Applications/Start Menu.

2

PATH not updated

Close and reopen your terminal after installing Docker. On Windows, you may need a full restart.

3

Systemd service (Linux)

If running OpenClaw as a systemd service, ensure the service file includes the correct PATH. Add Environment="PATH=/usr/local/bin:/usr/bin" to the [Service] section.

Verify Docker Is Working

Verify & Retry
docker --version
# Expected: Docker version 2x.x.x

# Test a container
docker run --rm hello-world

# Restart OpenClaw gateway
openclaw gateway restart

Still Not Working?

Run the Doctor

npx clawkit-doctor@latest

Or use the web-based Error Doctor to paste the full error.

Did this guide solve your problem?

Need Help?

Try our automated tools to solve common issues instantly.