Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
The docker CLI can’t talk to the Docker engine — it isn’t running, or your user can’t access the socket.
Meaning
The docker command is just a client; the daemon does the work. On Linux the socket is root-owned unless you’re in the docker group. On macOS/Windows, Docker Desktop must be running.
Common causes
- Docker daemon/Desktop not started
- User not in
dockergroup (permission denied on docker.sock) - DOCKER_HOST / context pointing elsewhere
- Rootless Docker uses a different socket path
⚡ Quick fix
- Start Docker:
sudo systemctl start dockeror open Docker Desktop - Add yourself to the group:
sudo usermod -aG docker $USERthen log out/in - Check
docker context lsandecho $DOCKER_HOST
Detailed fix by platform
Linux
- Enable and verify:bash
sudo systemctl enable --now docker sudo usermod -aG docker $USER && newgrp docker docker info
How to diagnose
- Daemon — Is it running?
- Permission — “permission denied” on docker.sock?
- Context — Which context/host is the CLI using?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026