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 deniedCommon 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
- Add the user with
sudo usermod -aG docker $USER. - Log out and back in (or run
newgrp docker) so the group takes effect. - Verify with
docker info, then re-run act.
Terminal
sudo usermod -aG docker $USER
newgrp docker
docker infoUse 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 buildHow to prevent it
- Add developers to the
dockergroup 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
act "Cannot connect to the Docker daemon" running Actions locallyFix act "Cannot connect to the Docker daemon at unix:///var/run/docker.sock" - act runs every job inside a co…
act "OCI runtime exec format error" running Actions locallyFix act "OCI runtime create failed: ... exec format error" - a binary in the container was built for a differ…
act container "exited with code 137" (OOM) running Actions locallyFix act job container "exited with code 137" - the container was killed (SIGKILL), usually because Docker Des…