Skip to content

docs(rootless): setuptool needs a pam_systemd session - #25874

Open
locker95 wants to merge 1 commit into
docker:mainfrom
locker95:docs/rootless-setuptool-session
Open

docs(rootless): setuptool needs a pam_systemd session#25874
locker95 wants to merge 1 commit into
docker:mainfrom
locker95:docs/rootless-setuptool-session

Conversation

@locker95

Copy link
Copy Markdown
Contributor

If you sudo su in and $XDG_RUNTIME_DIR is empty (or the ~/.docker/run fallback the script prints), it says systemd isn't there even on a systemd box. systemctl --user needs /run/user/$UID.

Called that out on the install page and in the existing troubleshoot section.

@netlify /engine/security/rootless/

Fixes #14491

Signed-off-by: Dean Chen <862469039@qq.com>
@locker95
locker95 requested a review from dvdksn as a code owner August 17, 2026 17:46
@github-actions github-actions Bot added area/engine Issue affects Docker engine/daemon area/security labels Aug 17, 2026
`machinectl shell $USER@`). `$XDG_RUNTIME_DIR` must be `/run/user/$(id -u)`.
If it is empty or something like `~/.docker/run`, the script cannot see
systemd and tells you to start `dockerd-rootless.sh` by hand. See
[Troubleshooting](./troubleshoot.md#unable-to-install-with-systemd-when-systemd-is-present-on-the-system).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is lengthy and decreases readability.

"The installer will fail if $XDG_RUNTIME_DIR is not set. See Troubleshooting.` should be enough.

Where `myuser@` is your desired username and @ signifies this machine.

The same "systemd not detected" message appears when `$XDG_RUNTIME_DIR` is
missing or is a fallback such as `~/.docker/run`. On a systemd host it must

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The same" is misleading, as "when $XDG_RUNTIME_DIR is
missing" typically happens when sudo is used

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine Issue affects Docker engine/daemon area/security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dockerd-rootless-setuptool.sh install fails to detect systemd unless $XDG_RUNTIME_DIR is set first

2 participants