Setting Up Audiobookshelf With Docker Compose: Ports, Library Folders and the Phone Apps

Felix Braun

Felix Braun

November 23, 2026

Setting Up Audiobookshelf With Docker Compose: Ports, Library Folders and the Phone Apps

You have a folder of audiobooks, maybe a few podcasts you want to keep after the feed drops old episodes, and a machine that already runs Docker. Audiobookshelf turns that folder into a server with progress sync, chapters and phone apps, but the first hour decides whether it stays pleasant: which port the container really listens on, which folders must live on local disk, how your files need to be named, and what the iOS and Android apps can and cannot do right now. This guide walks through the official Docker Compose setup step by step, using the project’s documentation at audiobookshelf.org and the GitHub repository as the reference.

What you are installing and which version is current

Audiobookshelf is an open-source, self-hosted server for audiobooks and podcasts, licensed under GPL-3.0 according to its GitHub repository. At the time of writing, the latest stable server release on GitHub is v2.38.0, published on November 17, 2026. The release notes for that version also ask for testers for Audiobookshelf version 3, which is available under a separate v3 Docker image tag with a new React-based web client. That is a test build, not the one to put your family’s listening progress on.

The project publishes its image on the GitHub Container Registry as ghcr.io/advplyr/audiobookshelf. The Docker documentation lists three kinds of tags:

  • :latest is the most recent stable release.
  • :edge is rebuilt for every commit to the master branch, usually within 15 minutes. The docs describe it as generally safe but intended for helping test new features.
  • :#.#.# pins a specific release, for example :2.38.0.

:latest is the documented default; pin a version number if you prefer to upgrade deliberately.

Step 1: Lay out the four folders before writing any YAML

Audiobookshelf needs two folders for its own data and at least one for your media. The documentation is specific about what goes where, and getting this wrong is the most common way to end up with a slow or corrupted install.

Container path What it holds Where to keep it on the host
/config The SQLite database and database migration scripts Local disk on the machine running the container, never a network share
/metadata Book metadata, cover and author images, cache, logs and backups Anywhere you like; local SSD is fastest
/audiobooks Your audiobook files Local disk or a NAS mount
/podcasts Downloaded podcast episodes Local disk or a NAS mount

The warning about /config is worth repeating. The docs state that the database must be accessible directly on the same machine as the server and not accessed over the network, such as from a different NAS. The server may appear to work, but performance suffers and you will eventually hit database corruption. Media folders can sit on a network mount; the database cannot.

Two more rules from the docs: each mount point should be a separate directory that is not nested inside another mount point, and you are not limited to two media folders. Most people mount one for audiobooks and one for podcasts, but you can add as many as you need, for example a separate mount for ebooks or a second drive.

Step 2: Write the compose file and pick the port

The official minimal compose example from the Docker installation page contains these pieces:

  • image: ghcr.io/advplyr/audiobookshelf:latest
  • ports: with the mapping - 13378:80
  • volumes: with - /path/to/config:/config, - /path/to/metadata:/metadata, - /path/to/audiobooks:/audiobooks and - /path/to/podcasts:/podcasts
  • environment: with - TZ=America/Toronto as the example time zone
  • restart: unless-stopped
  • An optional, commented-out user: 1000:1000 line

Put those under a services: block with a service named audiobookshelf, replace the host paths with your real ones, and set TZ to your own zone.

The Audiobookshelf port question

People searching for the Audiobookshelf default port usually find two numbers, and both are correct. Inside the container, the server listens on port 80. On the host, the documented convention is 13378. The compose comment says it plainly: if you want a different port, change only the external number, the one left of the colon. So 8080:80 works; 13378:13378 does not, because nothing inside the container listens on 13378.

The advanced configuration docs also list PORT and HOST variables, but with Docker the simpler route is to leave the internal port alone and remap on the host side.

Running as your own user

If you are used to LinuxServer-style images, note that Audiobookshelf does not read PUID or PGID variables. The docs say to use Compose’s user: directive instead, set to the UID and GID that own your media folders. Uncomment the line and adjust the numbers; running id on the host shows yours.

When the file is ready, start it from the same directory:

  • docker compose up -d

The docs advise against adding a health check unless you have external monitoring, since the restart policy already handles crashes. If you add one anyway, the image includes wget but not curl.

A car interior at dusk with a phone mount on the dashboard

Step 3: Create the root account and the first library

Open http://your-server-ip:13378 in a browser. On a fresh install, Audiobookshelf asks you to create the first account. That account becomes the root user, which the user management docs describe as the original admin account: it has the same powers as an admin, but other admins cannot edit it. Pick a strong password, because this account can change every server setting.

After logging in, go to the settings and add a library. You choose a library type, books or podcasts, and then point it at one or more folders as the container sees them, so /audiobooks or /podcasts, not the host paths. A library can include more than one folder, which is how you combine two drives into one view.

Then create an account for each listener. The docs say account sharing is not supported, and two people on one login will run into progress conflicts. Users can be limited to specific libraries or tags.

Step 4: Name your audiobook folders the way the scanner expects

The scanner treats each book as a folder. Single-file books, such as one .m4b, can sit at the library root, but anything with multiple files needs its own folder. If you rely on the folder structure for metadata, the documented formats are Author/Series/Book or Author/Book.

The book folder name itself can carry extra details, following the rules on the library structure page:

  • Series sequence: 1 - Title or 1. Title, or later in the name as Title - Vol. 1 with Vol, Volume or Book.
  • Publish year: first in the name, or right after the sequence, separated by a spaced dash, as in 1994 - Title.
  • Narrator: in curly braces, such as {Sam Tsoutsouvas}.
  • Discs: subfolders named Disc, CD or Disk followed by a number.
  • ASIN: in square brackets to help Audible matching. The docs point out that the Audible ASIN is not the same as the Amazon one.

Author folders can be First Last or Last, First, and multiple authors can be separated with commas, semicolons, an ampersand or “and”. The scanner is not punctuation-aware, so J.R.R. Tolkien and J. R. R. Tolkien become two different authors.

The mistake the docs single out is a loose audio file sitting in an author folder next to book subfolders. The scanner then groups everything into one book. Fixing it means removing the item in the web interface and rescanning, which loses listening progress for the affected books, so it pays to tidy files before the first scan rather than after.

Embedded ID3 tags are read too (composer becomes the narrator, for example), as are desc.txt, reader.txt and OPF or NFO files in the book folder.

Podcast folders are flat

Podcast libraries are simpler and stricter: one folder per podcast, every audio file is an episode, and there are no season subfolders. You can add shows by searching, pasting an RSS URL or importing OPML, and scheduled episode checks are off by default. If you host a podcast on your own LAN, Audiobookshelf blocks local-address feeds as server-side request forgery protection; the docs say to set DISABLE_SSRF_REQUEST_FILTER=1 if you need it.

Step 5: Put it behind a reverse proxy without breaking websockets

The phone apps and the web player both need to reach the server, and from outside your house that usually means HTTPS through a reverse proxy. Every reverse proxy page in the Audiobookshelf docs carries the same warning: the server requires a websocket connection. A proxy that serves the login page but drops the websocket upgrade will give you a half-working app.

The documented NGINX config uses a location / block with these directives:

  • proxy_set_header Upgrade $http_upgrade; and proxy_set_header Connection "upgrade"; for the websocket
  • proxy_http_version 1.1;
  • proxy_set_header Host $http_host;, X-Forwarded-For and X-Forwarded-Proto
  • proxy_pass http://<URL_to_forward_to>; pointing at your server and host port
  • proxy_redirect http:// https://;
  • client_max_body_size 10240M; so large uploads do not fail with a 413 error

Caddy is shorter, since it handles websockets automatically. The documented Caddyfile is a site block for your subdomain containing encode gzip zstd and reverse_proxy <LOCAL_IP>:<PORT>. The docs also have pages for Apache, HAProxy, Traefik, Nginx Proxy Manager, SWAG and Synology. If you are deciding between proxies, the trade-offs in Caddy vs Nginx Proxy Manager for a homelab apply directly.

Subpaths are supported with one catch: the path must be /audiobookshelf, and the docs state this cannot be changed. If you want example.com/books, use a subdomain instead.

If only your household needs access, a private network such as Tailscale lets the apps reach the server without opening a port; this comparison of reverse proxies, Cloudflare Tunnel and Tailscale explains the options.

A man listening with headphones on a sofa

Where the iOS and Android apps stand in late 2026

The official mobile apps are still labeled beta. The app repository describes Android as beta and iOS as early beta. The latest app release on GitHub is v0.14.2-beta, published September 27, 2026, with both an APK and an IPA attached.

  • Android: available through the Google Play Store as a beta. Google Play betas have no tester limit, so anyone can install it.
  • iOS: distributed through Apple’s TestFlight, which caps a beta at 10,000 testers. The repository notes the beta is currently full.

Per the app beta FAQ, spots open when a TestFlight build expires after 90 days and usually fill again within days. It also states there is no expected date for the apps to leave beta, and that Android currently has more features than iOS, though all features are planned for both.

If you are on an iPhone and the TestFlight is full, the FAQ lists four alternatives:

  1. Use the web client in Safari or save it as a Progressive Web App. This does not work offline.
  2. Sideload the official IPA from the GitHub releases with AltStore or SideStore, updating manually.
  3. Use a third-party app that integrates with Audiobookshelf. The project encourages these but does not support them.
  4. Download files from the web client into a standalone player, accepting that progress will not sync.

The app FAQ also says the first-party apps are for using the server, not managing it; libraries, users and settings stay in the browser. If you are still choosing between servers, Audiobookshelf vs Jellyfin for audiobooks compares the app situation on both.

Backups: what the built-in ones cover and what they skip

Audiobookshelf has a backups page in its settings. Per the backup documentation, these backups contain the database and cover images stored in the metadata directory. They do not include media files or covers stored alongside your books. By default they are written to /metadata/backups; you can change that in the interface, or with the BACKUP_PATH environment variable, which then locks the setting in the web UI. You can also set how many backups to keep and a maximum size, where 0 means unlimited.

Two limits are worth knowing before you need a restore. Backups cannot move between installation methods without losing progress and metadata, and Windows backups restore only on Windows, Linux backups only on Linux. Restoring works through the Restore button, or manually: stop the container, unzip the newest .audiobookshelf file from metadata/backups, copy audiobookshelf.sqlite into the config folder, copy metadata-authors and metadata-items back into metadata/authors and metadata/items, then start the container.

Because the built-in backups live inside /metadata on the same machine, copy them somewhere else as well, together with your media folders. A copy of the live SQLite file taken while the server is writing is not reliable; the built-in backup zip is safer to ship off-box. Docker Compose backup strategies for beginners covers how to copy volumes and prove the restore works.

Updating the container without losing anything

The documented upgrade is three commands, run from the folder with your compose file:

  • docker compose pull
  • docker compose down
  • docker compose up --detach

If you pinned a version tag, edit it first or the pull will fetch the same image. A manual backup from the settings page right before a major update gives you a clean rollback point.

The docs warn that some container managers, including Synology’s Container Manager and Portainer, can cache the old image, which shows up as a startup error like Cannot find module '/index.js'. Resetting or recreating the container fixes it and is safe when all data lives in mounted volumes.

Read the release notes before each update. The v2.38.0 notes still link to a discussion about the new authentication system added in v2.26.0, a reminder that server changes can affect older clients, and they list several access-control fixes that are a good reason not to fall far behind. With the folders laid out correctly, the database on local disk and a proxy that passes websockets, upgrades are routine.

More articles for you