feat: run the container as an unprivileged user - #45
Merged
Conversation
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.
Deploying with
|
| 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 |
Contributor
Author
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 --userfailed 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
--userworks 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--useris 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-offchownto 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.