[Bug]: Running with nonroot user crashes due to inability to bind port #2679

Closed
opened 2026-04-25 00:09:33 +02:00 by adam · 2 comments
Owner

Originally created by @Royal2000H on GitHub (Mar 21, 2025).

What happened?

When using the user configuration in docker, the following error arises on starting the container:

ERROR: listen EACCES: permission denied 0.0.0.0:80

Clearly the container needs higher permissions to bind the port. If the user line is removed from the docker compose, the container starts just fine.

Perhaps a method like linuxserver's PUID/PGID would allow the server to bind but the rest run without root.

What did you expect to happen?

Start and bind the port appropriately.

Steps to reproduce the issue

  1. Set a non-root user in docker compose
  2. Attempt to start the container.

Audiobookshelf version

v2.20.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Other (list in "Additional Notes" box)

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs


Additional Notes

Synology

Originally created by @Royal2000H on GitHub (Mar 21, 2025). ### What happened? When using the `user` configuration in docker, the following error arises on starting the container: >ERROR: listen EACCES: permission denied 0.0.0.0:80 Clearly the container needs higher permissions to bind the port. If the `user` line is removed from the docker compose, the container starts just fine. Perhaps a method like linuxserver's PUID/PGID would allow the server to bind but the rest run without root. ### What did you expect to happen? Start and bind the port appropriately. ### Steps to reproduce the issue 1. Set a non-root `user` in docker compose 2. Attempt to start the container. ### Audiobookshelf version v2.20.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Other (list in "Additional Notes" box) ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell ``` ### Additional Notes Synology
adam added the bug label 2026-04-25 00:09:33 +02:00
adam closed this issue 2026-04-25 00:09:33 +02:00
Author
Owner

@nichwall commented on GitHub (Mar 21, 2025):

Duplicate of https://github.com/advplyr/audiobookshelf/issues/3527

If you're not running as root, you can change the port ABS listens on using the PORT environment variable to not listen on a root port.

@nichwall commented on GitHub (Mar 21, 2025): Duplicate of https://github.com/advplyr/audiobookshelf/issues/3527 If you're not running as root, you can change the port ABS listens on using the `PORT` environment variable to not listen on a root port.
Author
Owner

@Royal2000H commented on GitHub (Mar 21, 2025):

I had searched and missed that entirely. Thank you.

@Royal2000H commented on GitHub (Mar 21, 2025): I had searched and missed that entirely. Thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2679