Skip to content

feat: run the container as an unprivileged user - #45

Merged
nielsrowinbik merged 2 commits into
mainfrom
feat/rootless-container
Aug 24, 2026
Merged

feat: run the container as an unprivileged user#45
nielsrowinbik merged 2 commits into
mainfrom
feat/rootless-container

Conversation

@nielsrowinbik

@nielsrowinbik nielsrowinbik commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The image ran as root with no way to change that: nginx bound privileged port 80, the entrypoint wrote /etc/nginx/conf.d, and the refresh service assumed it could write root-owned volumes. docker run --user failed on all three counts.

Moves the listener to 8080, relocates nginx's pid file out of /run, and grants the runtime write paths by directory mode rather than ownership, so any --user works rather than only the default one. Chosen over the LinuxServer PUID/PGID convention, which exists to work around images that genuinely must start as root; once the port is unprivileged this one does not, and --user is already the Docker-native way to say it.

The Home Assistant wrapper re-asserts USER root: the Supervisor bind-mounts a root-owned /data that run.sh creates directories in.

BREAKING CHANGE: the container now listens on 8080 instead of 80. Published ports must be remapped, e.g. -p 8090:8080. Existing volumes were created root-owned and are unwritable to the unprivileged container; it refuses to start and prints the one-off chown to run.

BREAKING CHANGE: the add-on's optional direct port is now 8080/tcp, not 80/tcp. The Supervisor stores the mapping against the old number, so anyone running an e-ink panel on it must re-open the new port once after updating.

The image ran as root with no way to change that: nginx bound privileged
port
80, the entrypoint wrote /etc/nginx/conf.d, and the refresh service
assumed it
could write root-owned volumes. `docker run --user` failed on all three
counts.

Moves the listener to 8080, relocates nginx's pid file out of /run, and
grants
the runtime write paths by directory mode rather than ownership, so any
`--user` works rather than only the default one. Chosen over the
LinuxServer
PUID/PGID convention, which exists to work around images that genuinely
must
start as root; once the port is unprivileged this one does not, and
`--user` is
already the Docker-native way to say it.

The Home Assistant wrapper re-asserts USER root: the Supervisor
bind-mounts a
root-owned /data that run.sh creates directories in.

BREAKING CHANGE: the container now listens on 8080 instead of 80.
Published
ports must be remapped, e.g. `-p 8090:8080`. Existing volumes were
created
root-owned and are unwritable to the unprivileged container; it refuses
to
start and prints the one-off `chown` to run.

BREAKING CHANGE: the add-on's optional direct port is now 8080/tcp, not
80/tcp. The Supervisor stores the mapping against the old number, so
anyone
running an e-ink panel on it must re-open the new port once after
updating.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
saezuri 7880967 Commit Preview URL

Branch Preview URL
Aug 23 2026, 07:36 PM

@nielsrowinbik
nielsrowinbik merged commit a3a46ec into main Aug 24, 2026
3 checks passed
@nielsrowinbik
nielsrowinbik deleted the feat/rootless-container branch August 24, 2026 08:19
@nielsrowinbik

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant