This tutorial was written with AI assistance from the project's official documentation. Verification status is stated at the end of the article.
What Audiobookshelf does and what it needs
Audiobookshelf is a self-hosted audiobook and podcast server. It streams audio on the fly, tracks per-user progress across devices, auto-detects library changes, and supports multi-user permissions. It also handles podcast subscriptions with auto-download, metadata fetching, chapter editing, and basic ebook support. The official Docker image is ghcr.io/advplyr/audiobookshelf:latest and listens on port 80 inside the container.
The project does not publish a minimum RAM figure. Actual usage depends on workload: idle streaming is light, while concurrent transcoding, large library scans, and metadata embedding jobs push CPU and memory higher. Plan for headroom if you expect many simultaneous users or frequent library updates.
Audiobookshelf needs four persistent paths: /config (server settings and database), /metadata (covers, cached images, backups), /audiobooks, and /podcasts. The config directory must live on the same physical machine as the container. Media directories can be bind mounts or named volumes, but bind mounts are easier to manage when your library already exists on disk.
Prerequisites, ports, and volume constraints
- Docker Engine 20.10+ and Docker Compose v2.
- A host directory for config, metadata, and media. The official compose uses
./config,./metadata,./audiobooks, and./podcastsrelative to the compose file. - Port
13378on the host maps to port80in the container. Do not change the internal port. - A reverse proxy (Caddy or Nginx) on the same VPS if you want HTTPS. Audiobookshelf requires WebSocket support; the proxy must forward upgrade headers.
- The
user:directive is optional but recommended. Set it to your host UID/GID so files created by the container are readable by your user. Runid -uandid -gto find yours.
If you are testing without a domain, bind the published port to 127.0.0.1 and use an SSH tunnel: ssh -L 13378:127.0.0.1:13378 user@your-vps. Then open http://localhost:13378 locally. Do not expose port 13378 directly to the public internet without TLS.
Production Docker Compose setup
Create the project directory and the compose file:
mkdir -p ~/audiobookshelf && cd ~/audiobookshelf mkdir -p config metadata audiobooks podcasts Write compose.yml:
services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf:latest container_name: audiobookshelf ports: - "13378:80" volumes: - abs_config:/config - abs_metadata:/metadata - abs_audiobooks:/audiobooks - abs_podcasts:/podcasts environment: - TZ=${TZ:-UTC} restart: unless-stopped volumes: abs_config: abs_metadata: abs_audiobooks: abs_podcasts: Create .env with your timezone and user IDs. Generate a strong value for any secret you add later; Audiobookshelf itself does not require a secret in this compose, but keep the pattern for future integrations:
cat <<'EOF' > .env TZ=UTC PUID=1000 PGID=1000 EOF Start the stack:
docker compose up -d docker compose logs -f audiobookshelf Open http://127.0.0.1:13378 (via SSH tunnel if remote) and complete the first-run setup. Create the admin account immediately; Audiobookshelf does not ship a default password, but an unclaimed instance is open to anyone who can reach it.
Reverse proxy, HTTPS, and first-run hardening
Audiobookshelf needs WebSocket support. With Caddy, a minimal Caddyfile looks like this:
abs.example.com { reverse_proxy 127.0.0.1:13378 } Caddy handles WebSocket upgrades automatically. For Nginx, add the upgrade headers explicitly:
location / { proxy_pass http://127.0.0.1:13378; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; client_max_body_size 0; } client_max_body_size 0 disables upload limits, which matters for bulk audiobook uploads. If you prefer a cap, set it high enough for your largest files.
Audiobookshelf supports subfolder hosting only at /audiobookshelf; the path is not configurable. If you use a subfolder, point the proxy at that path and keep the internal port unchanged.
After the proxy is live, log in as the admin and:
- Disable open registration unless you need it. Create users manually.
- Set a strong admin password and enable two-factor authentication if available in your version.
- Configure library folders to match the container paths (
/audiobooks,/podcasts). - Verify WebSocket connectivity by opening the web client and watching for live progress updates.
Updating, backups, and common pitfalls
Update the image and restart:
docker compose pull docker compose up -d Back up the config and metadata directories. These contain the database, user progress, and cached assets:
tar -czf audiobookshelf-backup-$(date +%F).tar.gz config metadata Media directories can be backed up separately; they are usually large and change less often. Store backups off the host.
Two operational pitfalls from the docs:
- WebSocket failures behind a proxy. If the web client shows stale progress or fails to connect, your proxy is not forwarding upgrade headers. Caddy handles this by default; Nginx needs the
UpgradeandConnectionlines shown above. - Config directory on a different machine. The official compose notes that
/configmust be on the same physical machine as Audiobookshelf. Do not put it on a network share or a different host; the database and file locking will break.
Also watch file ownership. If you set user: in compose, ensure the host directories are writable by that UID/GID. Mismatched ownership causes silent failures when Audiobookshelf tries to write metadata or backups.
Measured in our sandbox run: total memory 75.3 MB (sum of per-container peaks over a 30s idle window after startup) across 1 container; largest container 75.3 MB; published port(s) 13378; HTTP probe returned 200. The run took 38.0s with the image already cached; a fresh server also has to download it.
Verification: we ran this docker-compose stack in a disposable Docker environment and recorded the measurements above. They describe that run, not a guarantee for your host.
Originally published with full interactive benchmark metrics and server sizing notes at https://vpsfolio.pages.dev/self-host-audiobookshelf-docker/.
