← Back to Troubleshoot

Docker Socket Permission Denied

Error: permission denied while trying to connect to Docker daemon socket / Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

OpenClaw troubleshooting · Updated 2026

Error Message

Error: permission denied while trying to connect to Docker daemon socket / Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

What Causes This

The OpenClaw process can't access the Docker socket, which is needed for sandbox mode. This happens when the user running OpenClaw isn't in the docker group, or on macOS when Docker Desktop resets socket permissions after restart.

How to Fix It

Fix Docker socket permissions:

# Linux: add your user to the docker group
sudo usermod -aG docker $USER
# Log out and back in (or: newgrp docker)

# macOS: Docker Desktop resets /var/run/docker.sock permissions
# on every restart. Fix temporarily:
sudo chmod 666 /var/run/docker.sock

# Permanent fix on macOS: create a LaunchDaemon
# that auto-fixes permissions after Docker starts
# See the OpenClaw sandbox guide for the full plist

If OpenClaw runs as a different user (e.g., a service account), that user specifically needs docker group membership. On macOS with a two-account setup, ensure the service account can traverse ~/.openclaw (permissions 755, not 700).

See Also