Make distrobox work on Omarchy, where Docker is not usable without sudo
Running docker info as the unprivileged user on this 4.0.4-1 machine prints exactly permission denied while trying to connect to the docker API at unix:///var/run/docker.sock, and the user is not in the docker group. quattro install/config/docker.sh documents the deliberate omission, migration 1787580187.sh removes existing users from the group, and omarchy-setup-security-sudoless-docker / omarchy-remove-security-sudoless-docker exist locally with menu entries Setup > Security > Sudoless Docker in omarchy-menu.jsonc. distrobox-create at tag 1.8.2.5 autodetects podman, podman-launcher, docker, lilipod in that order, and the Arch sync DB has distrobox 1.8.2.5-1 and podman 6.1.1-1. The Arch Distrobox wiki recommends Podman over Docker and --root over sudo distrobox, and distrobox.it/compatibility requires rootless podman or docker without sudo. /etc/subuid has a 100000:65536 range for the user here, and the cross-referenced slug podman-rootless-missing-subuid exists in the corpus. Podman was not installed and no box was created.
The docker group and --root both mean that anything running in the box, or as your user, can take over the host as root.
Symptom
distrobox create -n arch -i archlinux:latest (or distrobox enter) fails straight away with:
permission denied while trying to connect to the docker API at unix:///var/run/docker.sock
Docker itself works fine with sudo docker .... podman is not installed, so the Toolbox advice I find does not apply either.
Cause
Distrobox needs a container manager it can drive as your user. Its documentation requires either rootless Podman or Docker configured without sudo. Distrobox 1.8.2.5 (the Arch package) autodetects in the order podman, then podman-launcher, then docker. Omarchy 4 installs Docker but not Podman, and deliberately leaves your user out of the docker group (install/config/docker.sh) because that group is equivalent to passwordless root. Autodetect therefore picks docker, runs it as you, and the root-owned socket refuses the connection. sudo distrobox is discouraged upstream, and a rootful Docker distrobox means root inside the box is root on the host.
Fix
**Recommended: give distrobox rootless Podman.** The Arch wiki's Distrobox page prefers Podman over Docker for exactly this reason.
sudo pacman -S podman
cat /etc/subuid /etc/subgid # expect a line for your user, e.g. you:100000:65536
podman info --format '{{.Host.Security.Rootless}}' # true
Omarchy's installer creates the account with useradd, which allocates the subordinate ID range. If your user has no line, see podman-rootless-missing-subuid.
Autodetect now finds podman first. To make the choice explicit:
mkdir -p ~/.config/distrobox
echo 'container_manager="podman"' >> ~/.config/distrobox/distrobox.conf
distrobox create -n arch -i docker.io/library/archlinux:latest
distrobox enter arch
Boxes created earlier under Docker do not show up in distrobox list once Podman is the manager. Recreate them, or reach them with DBX_CONTAINER_MANAGER=docker distrobox enter --root <name>.
**Alternatives, both root-equivalent:**
distrobox create --root ...anddistrobox enter --root ...run Docker throughsudo. You will set a password inside the box on first entry.omarchy-setup-security-sudoless-docker(Setup > Security > Sudoless Docker) adds you to thedockergroup after a warning and a reboot. Undo it withomarchy-remove-security-sudoless-docker.
On plain Arch the same rule holds: install Podman, or add yourself to docker knowing it is root-equivalent.
Verify
distrobox list shows the container with the Podman backend, distrobox enter arch -- cat /etc/os-release prints the guest distribution, and id -u inside the box matches your host UID.
Sources
- https://wiki.archlinux.org/title/Distrobox
- https://wiki.archlinux.org/title/Toolbox
- https://distrobox.it/compatibility/
- https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-create.md
- https://github.com/omacom/omarchy/blob/quattro/install/config/docker.sh
- https://github.com/omacom/omarchy/blob/quattro/bin/omarchy-setup-security-sudoless-docker