[Bug]: RSS is generated without custom port #2922

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

Originally created by @andrelam on GitHub (Jul 28, 2025).

What happened?

I'm running the latest docker version (2.26.3) behind nginx reverse proxy accessible on a custom port (neither 80 nor 443). Everything is working as expected, with the exception of the RSS Feed generated by audiobookshelf, because it doesn't contain the custom port.

For example, assume I run the server behind a reverse proxy on address abs.com and port 1443. Everything runs fine when accessing https://abs.com:1443, either locally or outside my home network as I expose port 1443 on my router. However, the RSS feed is generated with the base address without the custom port (I've redacted some data for privacy and I'm not inserting the whole file as it's over 2MB):

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0">
<channel><title><![CDATA[NerdCast]]></title><description><![CDATA[O mundo vira piada no Jovem Nerd]]></description><link>https://abs.com/audiobookshelf/item/9da79f...
</link><image><url>https://abs.com/audiobookshelf/feed/9da79f.../cover.jpg
</url><title>NerdCast</title><link>https://abs.com.br/audiobookshelf/item/9da79f...
</link></image><generator>Audiobookshelf</generator><lastBuildDate>Sun, 27 Jul 2025 23:58:49 GMT</lastBuildDate><atom:link href="https://abs.com/audiobookshelf/feed/9da79f...
" rel="self" type="application/rss+xml"/> (... etc)

I've tried my best to edit the markup in order for it to be readable with the relevant links clearly visible.

Without the port, as port 443 and 80 are not open in my setup (due to my ISP restrictions), the RSS feed is completely unusable.

My docker Compose file:

services:
  audiobookshelf:
    container_name: audiobookshelf
    restart: unless-stopped
    image: ghcr.io/advplyr/audiobookshelf:latest
    ports:
      - 13378:1443
    volumes:
      - /mnt/media/audio/audiobooks:/audiobooks
      - /mnt/media/audio/podcasts:/podcasts
      - /etc/audiobookshelf:/config
      - /mnt/media/audio/metadata:/metadata
    environment:
      - TZ=America/Sao_Paulo
      - PORT=1443

What did you expect to happen?

The RSS feed should've been generated with the custom port I'm using to access audiobookshelf (in the case, :1443):

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0">
<channel><title><![CDATA[NerdCast]]></title><description><![CDATA[O mundo vira piada no Jovem Nerd]]></description><link>https://abs.com:1443/audiobookshelf/item/9da79f...
</link><image><url>https://abs.com:1443/audiobookshelf/feed/9da79f.../cover.jpg
</url><title>NerdCast</title><link>https://abs.com.br:1443/audiobookshelf/item/9da79f...
</link></image><generator>Audiobookshelf</generator><lastBuildDate>Sun, 27 Jul 2025 23:58:49 GMT</lastBuildDate><atom:link href="https://abs.com:1443/audiobookshelf/feed/9da79f...
" rel="self" type="application/rss+xml"/> (... etc)

Steps to reproduce the issue

  1. Configure a different custom port on the reverse proxy (in my case, nginx)
  2. Access Audiobookshelf via the custom address with custom port
  3. Access a Podcast on Audiobookshelf and open a RSS Feed
  4. Open the RSS on a browser or file editor
  5. The custom port is not present on any links, which makes the RSS feed unusable, as neither port 443 nor 80 is not open

Audiobookshelf version

v2.26.3

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

I have tried setting port 1443 on docker compose so that internally it's using my custom port, without success.

Originally created by @andrelam on GitHub (Jul 28, 2025). ### What happened? I'm running the latest docker version (2.26.3) behind nginx reverse proxy accessible on a custom port (neither 80 nor 443). Everything is working as expected, with the exception of the RSS Feed generated by audiobookshelf, because it doesn't contain the custom port. For example, assume I run the server behind a reverse proxy on address abs.com and port 1443. Everything runs fine when accessing https://abs.com:1443, either locally or outside my home network as I expose port 1443 on my router. However, the RSS feed is generated with the base address without the custom port (I've redacted some data for privacy and I'm not inserting the whole file as it's over 2MB): `<?xml version="1.0" encoding="UTF-8"?>` `<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0">` `<channel><title><![CDATA[NerdCast]]></title><description><![CDATA[O mundo vira piada no Jovem Nerd]]></description><link>`https://abs.com/audiobookshelf/item/9da79f... `</link><image><url>`https://abs.com/audiobookshelf/feed/9da79f.../cover.jpg `</url><title>NerdCast</title><link>`https://abs.com.br/audiobookshelf/item/9da79f... `</link></image><generator>Audiobookshelf</generator><lastBuildDate>Sun, 27 Jul 2025 23:58:49 GMT</lastBuildDate><atom:link href="`https://abs.com/audiobookshelf/feed/9da79f... `" rel="self" type="application/rss+xml"/>` (... etc) I've tried my best to edit the markup in order for it to be readable with the relevant links clearly visible. Without the port, as port 443 and 80 are not open in my setup (due to my ISP restrictions), the RSS feed is completely unusable. My docker Compose file: ``` services: audiobookshelf: container_name: audiobookshelf restart: unless-stopped image: ghcr.io/advplyr/audiobookshelf:latest ports: - 13378:1443 volumes: - /mnt/media/audio/audiobooks:/audiobooks - /mnt/media/audio/podcasts:/podcasts - /etc/audiobookshelf:/config - /mnt/media/audio/metadata:/metadata environment: - TZ=America/Sao_Paulo - PORT=1443 ``` ### What did you expect to happen? The RSS feed should've been generated with the custom port I'm using to access audiobookshelf (in the case, :1443): `<?xml version="1.0" encoding="UTF-8"?>` `<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0">` `<channel><title><![CDATA[NerdCast]]></title><description><![CDATA[O mundo vira piada no Jovem Nerd]]></description><link>`https://abs.com:1443/audiobookshelf/item/9da79f... `</link><image><url>`https://abs.com:1443/audiobookshelf/feed/9da79f.../cover.jpg `</url><title>NerdCast</title><link>`https://abs.com.br:1443/audiobookshelf/item/9da79f... `</link></image><generator>Audiobookshelf</generator><lastBuildDate>Sun, 27 Jul 2025 23:58:49 GMT</lastBuildDate><atom:link href="`https://abs.com:1443/audiobookshelf/feed/9da79f... `" rel="self" type="application/rss+xml"/>` (... etc) ### Steps to reproduce the issue 1. Configure a different custom port on the reverse proxy (in my case, nginx) 2. Access Audiobookshelf via the custom address with custom port 3. Access a Podcast on Audiobookshelf and open a RSS Feed 4. Open the RSS on a browser or file editor 5. The custom port is not present on any links, which makes the RSS feed unusable, as neither port 443 nor 80 is not open ### Audiobookshelf version v2.26.3 ### 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 I have tried setting port 1443 on docker compose so that internally it's using my custom port, without success.
adam added the bug label 2026-04-25 00:11:52 +02:00
adam closed this issue 2026-04-25 00:11:52 +02:00
Author
Owner

@nichwall commented on GitHub (Jul 28, 2025):

Make sure your reverse proxy is set up to pass the port to ABS. For example, in nginx, you need to use the $http_host instead of just $host.

This is done as below and is included in the project readme:
proxy_set_header Host $http_host;

You will need to determine how to do this for your specific reverse proxy if you are not using nginx.

More information in https://github.com/advplyr/audiobookshelf/issues/3809

@nichwall commented on GitHub (Jul 28, 2025): Make sure your reverse proxy is set up to pass the port to ABS. For example, in nginx, you need to use the `$http_host` instead of just `$host`. This is done as below and is included in the project readme: `proxy_set_header Host $http_host;` You will need to determine how to do this for your specific reverse proxy if you are not using nginx. More information in https://github.com/advplyr/audiobookshelf/issues/3809
Author
Owner

@andrelam commented on GitHub (Jul 28, 2025):

Thanks, @nichwall . I've been looking on the issues for the past 3 hours and somehow the search results never showed me #3809 .

After configuring the Host header, everything's working.

@andrelam commented on GitHub (Jul 28, 2025): Thanks, @nichwall . I've been looking on the issues for the past 3 hours and somehow the search results never showed me #3809 . After configuring the Host header, everything's working.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2922