Ditch Audible: Build a Pro-Grade Audiobook & E-book Server with Audiobookshelf and Docker

HomeLab tutorial - IT technology blog
HomeLab tutorial - IT technology blog

The Messy Reality of Manual Book Management

You probably started your digital library by dumping EPUB and M4B files into a “Books” folder on a Synology NAS or a generic Google Drive. It works for storage, but the experience is miserable when you actually want to read or listen. Commercial platforms like Audible and Kindle provide a polished experience.

They remember your page, fetch cover art, and make searching easy. However, these services cost roughly $15 a month and trap you with DRM (Digital Rights Management). You’re essentially renting books you’ve already paid for.

Generic media servers are the problem. Tools like Jellyfin or Plex are excellent for 4K movies, but they treat a 20-hour audiobook like a very long song and an e-book like a random PDF. They lack the structure for book series, narrators, or specific publishing dates. Audiobookshelf was built specifically to solve this for the HomeLab community.

I’ve found that manual file management breaks down once you pass the 100-title mark. If you want to escape big-tech ecosystems without losing the premium features you enjoy, building a dedicated book server is the best move you can make.

Why Audiobookshelf Wins

Audiobookshelf is an open-source powerhouse. Unlike generic servers, it understands the nuances of literature. It automatically pulls data from Audible, Google Books, and Open Library to organize your files into a clean, professional interface.

Syncing progress is where the software really shines. You can pause a chapter on your desktop at 10:15 AM and resume at the exact second on your phone during a 5:30 PM commute. It also manages podcasts, turning your server into a centralized station for all spoken-word media. Running this on Docker keeps the app isolated and makes migrating to new hardware as simple as moving a folder.

Deploying Audiobookshelf with Docker Compose

Docker Compose is the most reliable way to handle this setup. It defines your network and storage in one file, making your deployment repeatable and easy to troubleshoot.

1. Setting Up the Folders

Don’t mix your configuration files with your media. Create a dedicated directory structure on your host machine to keep things tidy.

mkdir -p ~/homelab/audiobookshelf/{config,metadata}
mkdir -p ~/homelab/data/{audiobooks,ebooks,podcasts}

2. The Docker Compose File

Create a docker-compose.yml file inside your audiobookshelf folder. This configuration uses the official image and maps the volumes to the directories we just created.

version: "3.7"
services:
  audiobookshelf:
    container_name: audiobookshelf
    image: ghcr.io/advplyr/audiobookshelf:latest
    ports:
      - 1337:80
    volumes:
      - ./config:/config
      - ./metadata:/metadata
      - ~/homelab/data/audiobooks:/audiobooks
      - ~/homelab/data/ebooks:/ebooks
      - ~/homelab/data/podcasts:/podcasts
    environment:
      - AUDIOBOOKSHELF_UID=1000
      - AUDIOBOOKSHELF_GID=1000
    restart: unless-stopped

In this config, I’ve mapped internal port 80 to host port 1337. The UID and GID variables (usually 1000 for the primary Linux user) ensure the container has the right permissions to write cover art and metadata to your drive.

3. Fire Up the Container

With the file saved, launch the service in the background with one command:

docker-compose up -d

Initial Setup and Library Organization

Access the web dashboard by visiting http://your-server-ip:1337. Your first task is creating an admin account. Use a strong password; this server will eventually hold your entire intellectual collection.

Configuring Your First Library

Audiobookshelf categorizes content by type. You don’t just point it at a drive; you define what is inside each folder. To add your books:

  • Open “Libraries” in the sidebar and click “Add Library”.
  • Choose “Audiobooks” or “E-books”.
  • Select the /audiobooks or /ebooks path (the internal container path).
  • Name the library and save.

Automated Metadata

The server will scan your files immediately. If your naming convention is even remotely clear (like Author - Title.m4b), it will match them with online databases. If a match fails, click the “Match” button. The Audible provider usually offers the highest resolution cover art and the most accurate chapter data.

Verification and Remote Access

A server is only useful if it’s reachable. You need to verify that your data is safe and accessible when you’re away from your home Wi-Fi.

Going Mobile

The mobile apps for Android and iOS are excellent. To sync progress, point the app to your server’s IP. To access your library from a coffee shop or on the road, I recommend using a VPN like Tailscale or a reverse proxy like Nginx Proxy Manager. Test the sync by playing a book on your phone, hitting pause, and checking the web interface on your laptop. It should update within 2 to 3 seconds.

Maintenance and Performance

If covers fail to load, check the container logs for permission errors:

docker logs -f audiobookshelf

Watch your metadata folder. If your library grows to 1,000+ books, this folder can easily swell to several gigabytes because it stores high-res images and database backups. You can monitor resource hits using:

docker stats audiobookshelf

You’ve successfully traded a messy pile of files for a private, professional media ecosystem. You own your data, your progress stays in sync, and you’re no longer tethered to a monthly bill just to hear a story.

Share: