[Bug]: Podman - When running in Pod together with Reverse Proxy Caddy, need to specify PORT Environment Variable #3311

Open
opened 2026-04-25 00:14:52 +02:00 by adam · 2 comments
Owner

Originally created by @luckylinux on GitHub (Apr 22, 2026).

What happened?

When running inside a Pod, all Containers share the same Network Namespace.

Therefore only one Container can listen to any given Port.

By default audiobookshelf attempts to listen to TCP Port 80 and therefore crashes at startup, since caddy is already listening to TCP Port 80 (HTTP).

The Solution is to specify the PORT Environment Variable, which I could find "documented" in:

https://github.com/advplyr/audiobookshelf/blob/master/prod.js#L22C42-L22C46

What did you expect to happen?

audiobookshelf listening on TCP Port 13378.

Steps to reproduce the issue

  1. Write the Quadlets Files: one for the Pod, one for Caddy, one for Audiobookshelf
  2. Attempt to start the Pod: systemctl --user daemon-reload && systemctl --user restart audiobookshelf-pod

Audiobookshelf version

2.33.1

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

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

None

Logs


Additional Notes

No response

Originally created by @luckylinux on GitHub (Apr 22, 2026). ### What happened? When running inside a Pod, all Containers share the same Network Namespace. Therefore only one Container can listen to any given Port. By default `audiobookshelf` attempts to listen to TCP Port 80 and therefore crashes at startup, since `caddy` is already listening to TCP Port 80 (HTTP). The Solution is to specify the `PORT` Environment Variable, which I could find "documented" in: https://github.com/advplyr/audiobookshelf/blob/master/prod.js#L22C42-L22C46 ### What did you expect to happen? `audiobookshelf` listening on TCP Port 13378. ### Steps to reproduce the issue 1. Write the Quadlets Files: one for the Pod, one for Caddy, one for Audiobookshelf 2. Attempt to start the Pod: `systemctl --user daemon-reload && systemctl --user restart audiobookshelf-pod` ### Audiobookshelf version 2.33.1 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:14:52 +02:00
Author
Owner

@Vito0912 commented on GitHub (Apr 22, 2026):

The container listens on port 80 by default. You can use the PORT (as you mentioned) env to set the variable. This is not a bug.
This ENV (and others) is also documented in the docs here: https://www.audiobookshelf.org/docs#network

This is specified in https://github.com/advplyr/audiobookshelf/blob/master/Dockerfile#L64C1-L64C12
Changing that would also break most setups.

@Vito0912 commented on GitHub (Apr 22, 2026): The container listens on port 80 by default. You can use the `PORT` (as you mentioned) env to set the variable. This is not a bug. This ENV (and others) is also documented in the docs here: https://www.audiobookshelf.org/docs#network This is specified in https://github.com/advplyr/audiobookshelf/blob/master/Dockerfile#L64C1-L64C12 Changing that would also break most setups.
Author
Owner

@luckylinux commented on GitHub (Apr 22, 2026):

Maybe, but IMHO it would have been useful to have it at least included in the Example docker-compose.yml File, possibly commented-out:

https://github.com/advplyr/audiobookshelf/blob/master/docker-compose.yml

@luckylinux commented on GitHub (Apr 22, 2026): Maybe, but IMHO it would have been useful to have it at least included in the Example `docker-compose.yml` File, possibly commented-out: https://github.com/advplyr/audiobookshelf/blob/master/docker-compose.yml
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3311