PlainError

Home / Coding

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Last checked 2026-10-17 · 3 fixes · reviewed answer

TL;DRThis error means the Docker command line tool cannot reach the background Docker service that actually runs containers. The service is either stopped, not installed correctly, or the user lacks permission to talk to it.

Likely causes

  1. The Docker daemon service is not running on this machinemost likely
  2. The current user does not have permission to access the Docker socketpossible
  3. Docker was installed but the service failed to start due to a configuration problemless likely

How to fix it

Safest first: SafeChanges settingsDangerous
  1. Check if the Docker service is activeSafe

    Run the following command to see the current status of the Docker service.

    systemctl status docker
  2. Start the Docker serviceChanges settings

    If the service is not running, start it with this command. This changes the running state of the service.

    sudo systemctl start docker
  3. Enable Docker to start automaticallyChanges settings

    Make sure Docker starts on every boot so the error does not return after a restart.

    sudo systemctl enable docker

If that didn't fix it

Docker commands will continue to fail and you will not be able to run or manage any containers.

When to see a technician

Consult a technician if the Docker service fails to start after the commands above or if you see additional error messages about permissions or missing files.

Did this fix it? Report a problem

Related errors