How to Install Audiobookshelf Server on Ubuntu: Complete Step-by-Step Guide

Running Audiobookshelf on Ubuntu turns an ordinary server, mini PC, VPS, or old laptop into a polished self-hosted audiobook and podcast library. Instead of scattering MP3, M4B, and podcast files across devices, you get a web interface, user accounts, listening progress sync, metadata tools, and mobile app support. This guide walks through a practical Docker-based installation on Ubuntu, which is currently one of the cleanest and easiest ways to keep Audiobookshelf organized and simple to update.

TLDR: Install Docker on Ubuntu, create folders for Audiobookshelf’s library, config, and metadata, then run the server using Docker Compose. After starting the container, open Audiobookshelf in your browser at http://your-server-ip:13378 and create the first admin account. For a production-style setup, add firewall rules, backups, and optionally place it behind a reverse proxy with HTTPS.

Contents

What You Need Before Starting

Before installing Audiobookshelf Server, make sure your Ubuntu machine is ready. This guide assumes you are using Ubuntu 22.04 or 24.04, although the same process is similar on many Debian-based systems.

  • An Ubuntu server or desktop with terminal access
  • A user with sudo privileges
  • A stable local IP address for the server
  • Enough storage for your audiobook and podcast collection
  • Basic comfort with terminal commands

If your audiobook collection is large, consider storing it on a dedicated drive, NAS mount, or external disk. Audiobookshelf can handle sizeable libraries, but good folder organization makes scanning, matching, and browsing much easier later.

Step 1: Update Ubuntu

Start by refreshing your package list and installing available updates. This keeps your base system secure and reduces the chance of dependency problems.

sudo apt update
sudo apt upgrade -y

If the upgrade includes a new kernel, reboot before continuing:

sudo reboot

Reconnect to your server after the reboot using SSH or your local terminal.

Step 2: Install Docker and Docker Compose

Docker keeps Audiobookshelf isolated from the rest of your system. It also makes updates simple because the application, its runtime, and dependencies are packaged together.

Install Docker and the Compose plugin:

sudo apt install -y docker.io docker-compose-plugin

Enable Docker so it starts automatically at boot:

sudo systemctl enable docker
sudo systemctl start docker

Check that Docker is running:

sudo systemctl status docker

Optional but convenient: add your current user to the Docker group so you do not need to type sudo before every Docker command.

sudo usermod -aG docker $USER

Log out and back in for the group change to take effect. If you are connected over SSH, disconnect and reconnect.

Step 3: Create Audiobookshelf Folders

Now create a clean directory structure for the server. In this example, the main application data lives under /opt/audiobookshelf, while media files are stored under /srv/media.

sudo mkdir -p /opt/audiobookshelf/config
sudo mkdir -p /opt/audiobookshelf/metadata
sudo mkdir -p /srv/media/audiobooks
sudo mkdir -p /srv/media/podcasts

Give your user ownership of these folders so you can easily copy files and edit configuration:

sudo chown -R $USER:$USER /opt/audiobookshelf
sudo chown -R $USER:$USER /srv/media

The folders have different jobs:

  • config: stores Audiobookshelf settings and database files
  • metadata: stores covers, cached metadata, and related assets
  • audiobooks: contains your audiobook files
  • podcasts: contains downloaded or imported podcast files

For best results, organize audiobooks like this:

/srv/media/audiobooks/Author Name/Book Title/book.m4b

Good organization is not mandatory, but it dramatically improves library scanning and metadata matching.

Step 4: Create the Docker Compose File

Move into the Audiobookshelf directory:

cd /opt/audiobookshelf

Create a Compose file:

nano docker-compose.yml

Paste the following configuration:

services:
  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:latest
    container_name: audiobookshelf
    ports:
      - "13378:80"
    volumes:
      - /srv/media/audiobooks:/audiobooks
      - /srv/media/podcasts:/podcasts
      - /opt/audiobookshelf/config:/config
      - /opt/audiobookshelf/metadata:/metadata
    environment:
      - TZ=UTC
    restart: unless-stopped

Change TZ=UTC to your local time zone if desired, such as America/New_York, Europe/London, or Asia/Singapore. Save the file and exit. In Nano, press Ctrl + O, press Enter, then press Ctrl + X.

Step 5: Start Audiobookshelf

Start the container in the background:

docker compose up -d

Docker will download the Audiobookshelf image and launch the server. Check that it is running:

docker ps

You should see a container named audiobookshelf. To view logs, use:

docker logs -f audiobookshelf

If there are no critical errors, the web interface should now be available.

Step 6: Open the Web Interface

From a browser on the same network, visit:

http://SERVER_IP_ADDRESS:13378

Replace SERVER_IP_ADDRESS with your Ubuntu server’s IP address. You can find it with:

hostname -I

The first time you open Audiobookshelf, you will be asked to create an administrator account. Choose a strong password, especially if you plan to expose the service outside your home network.

Once logged in, go to the library settings and add your audiobook folder. Inside the container, the path is:

/audiobooks

For podcasts, use:

/podcasts

Start a scan, and Audiobookshelf will begin indexing your files. Depending on your collection size and storage speed, this may take a few minutes or much longer.

Step 7: Configure the Firewall

If you use Ubuntu’s built-in firewall, allow access to port 13378:

sudo ufw allow 13378/tcp

If UFW is not enabled yet and you want to use it, allow SSH first so you do not lock yourself out:

sudo ufw allow OpenSSH
sudo ufw enable

Then confirm the rules:

sudo ufw status

For home use, you may only need access from your local network. For remote access, it is better to use a VPN, a secure tunnel, or a reverse proxy with HTTPS rather than simply forwarding the Audiobookshelf port directly to the internet.

Step 8: Optional Reverse Proxy with HTTPS

If you have a domain name, you can put Audiobookshelf behind Nginx Proxy Manager, Caddy, Traefik, or standard Nginx. This lets you access it using a clean address like https://books.example.com and secure it with an SSL certificate.

A basic reverse proxy should forward traffic to:

http://127.0.0.1:13378

Make sure WebSocket support is enabled if your proxy tool provides that option. Also confirm the external hostname is set correctly inside Audiobookshelf’s settings if you use sharing features, mobile apps, or remote access.

Step 9: Updating Audiobookshelf

One of the best reasons to use Docker is painless updates. To update Audiobookshelf, run:

cd /opt/audiobookshelf
docker compose pull
docker compose up -d

Docker downloads the newest image and recreates the container while keeping your configuration, metadata, and media files intact because they are stored in mounted folders.

Step 10: Back Up Your Server

Your audiobook files may already be backed up elsewhere, but do not forget the Audiobookshelf configuration and metadata folders. At minimum, back up:

  • /opt/audiobookshelf/config
  • /opt/audiobookshelf/metadata
  • Your audiobook and podcast media folders, if they are not backed up already

A simple backup can be made with rsync to another drive or server:

rsync -av /opt/audiobookshelf/ /backup/audiobookshelf/

For a more robust setup, schedule automated backups with cron, BorgBackup, Restic, or your preferred backup tool.

Troubleshooting Tips

  • Page will not load: confirm the container is running with docker ps and check firewall rules.
  • Permission errors: verify ownership of your media and application folders with ls -la.
  • Library is empty: make sure you added /audiobooks inside Audiobookshelf, not the host path.
  • Metadata looks wrong: improve folder names and file tags, then rescan or rematch items.

Final Thoughts

Installing Audiobookshelf Server on Ubuntu is a rewarding upgrade for anyone who collects audiobooks or podcasts. With Docker Compose, the setup stays tidy, updates are straightforward, and your library remains easy to move or back up. Once installed, you can stream from a browser, manage multiple users, track progress across devices, and build a private audiobook service that feels far more personal than a commercial platform.