ProjectStack
docker

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Docker can't reach the daemon at all — the daemon isn't running or isn't accessible at the expected location. This variant of the connection error appears when the socket file itself doesn't exist, typically because Docker was never started or was stopped.

Common causes

  • Docker Desktop was closed or hasn't been launched yet
  • The dockerd process crashed and wasn't restarted automatically
  • The machine was rebooted and Docker isn't configured to start at boot
  • Running in an environment where Docker isn't installed at all

How to fix it

  1. Start Docker Desktop (Mac/Windows) or run: sudo systemctl start docker (Linux)
  2. Configure Docker to start automatically: sudo systemctl enable docker
  3. Check if Docker is installed: which docker && docker --version
  4. On Linux, check the daemon logs for crash info: journalctl -u docker --since '5 minutes ago'

Example

$ docker build . Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Running a Docker build after rebooting a Linux server without enabling Docker to start at boot

Browse more errors

The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.