Skip to content
Latchkey

act "permission denied /var/run/docker.sock" running Actions locally

The Docker daemon is running, but the socket file is owned by root or the docker group and your user is not a member. act connects to the socket to launch the job container and is refused.

What this error means

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

act
Got permission denied while trying to connect to the Docker daemon socket at
unix:///var/run/docker.sock: Post "http://.../containers/create": dial unix
/var/run/docker.sock: connect: permission denied

Common causes

The user is not in the docker group

On Linux the socket is group-owned by docker; a user outside that group has no access even when the daemon is up.

A rootless or restricted socket path

Rootless Docker or Podman exposes a socket under your home directory, and the default root socket is not readable.

How to fix it

Add your user to the docker group

  1. Add the user with sudo usermod -aG docker $USER.
  2. Log out and back in (or run newgrp docker) so the group takes effect.
  3. Verify with docker info, then re-run act.
Terminal
sudo usermod -aG docker $USER
newgrp docker
docker info

Use the rootless socket

For rootless Docker, point act at your user socket instead of the root one.

Terminal
export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/docker.sock"
act -j build

How to prevent it

  • Add developers to the docker group during machine setup.
  • Prefer rootless Docker or Podman for least-privilege local runs.
  • Avoid running act with sudo just to reach the socket.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →