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.
Jump to Fix
What the Error Looks Like
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:
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
Option A: winget (Recommended)
winget install Docker.DockerDesktop
After installation, start Docker Desktop from the Start Menu. It requires WSL 2:
wsl --install
Option B: Manual Download
Download from docker.com/products/docker-desktop. Run the installer and restart your computer.
Install Docker: macOS
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
# 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.
# macOS/Linux which docker # Windows where docker
Docker Desktop not running
Docker Desktop must be running for the docker CLI to work. Open it from your Applications/Start Menu.
PATH not updated
Close and reopen your terminal after installing Docker. On Windows, you may need a full restart.
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
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?
Seeing Other Errors Too?
Docker issues often come with these related problems:
Did this guide solve your problem?