# How to Self-Host Audiobookshelf With Docker or One Click (2026)

> Audiobookshelf Docker setup, step by step: server size, a Compose file with NGINX and SSL, the one-click way on xCloud, and what backups must cover.

**Audiobookshelf Docker** is the standard way to self-host Audiobookshelf: you run the official `ghcr.io/advplyr/audiobookshelf` container with four folders for config, metadata, audiobooks and podcasts, then put a reverse proxy with HTTPS in front. You can build that yourself on any Ubuntu server, or let xCloud's one-click app run the same container for you.

The container starts in seconds. The real work is around it: a domain, a certificate, WebSockets through the proxy, a way to get large audio files onto the server, and a backup that actually contains your books.

This guide covers both paths. First the **Docker Compose** way, step by step, then the one-click way on xCloud, with what each one leaves on your plate. If you also run a video library, our guide to [**self-hosting Jellyfin**](/self-host-jellyfin/) follows the same pattern.

![Who does each job when you self-host Audiobookshelf: Docker Compose on your own vs one-click on xCloud](/_landing/blog/self-host-audiobookshelf-image-1.png)

## TL;DR

- **Audiobookshelf** is a free, GPL-3.0 server for your own audiobooks and podcasts, with progress synced per user across devices.
- **Server size:** xCloud's template lists at least 1 GB of RAM, 1 CPU core and 10 GB of disk. Plan the disk around your library, not the minimum.
- **Manual path:** Docker Compose with the official image, NGINX in front with WebSocket headers, and a free Let's Encrypt certificate.
- **One-click path:** pick **Audiobookshelf** in xCloud's [**One Click Apps**](/one-click-apps/), choose a server and a domain, and xCloud runs Audiobookshelf behind HTTPS, at the version shown on the app page.
- **Backups:** Audiobookshelf's own backup skips your audio files. Back up the audiobooks and podcasts folders separately, or back up all four volumes together.
- **Not in the one-click template:** browser uploads over 100 MB per file and network shares for your media folders.

## The Backup Gap Most Audiobookshelf Guides Skip

Audiobookshelf has a handy built-in backup under its server settings. Its [**backups page**](https://www.audiobookshelf.org/docs/documentation/server-management/backups) is blunt about what that backup holds: only the database and the cover images in the `metadata` folder. Its own warning says backups **do not contain any media files**.

That is the finding worth acting on. A server that "has backups" can still lose every audiobook if the disk dies, because the files you care most about sit in a different folder.

| Folder | What lives there | In Audiobookshelf's built-in backup? |
|---|---|---|
| `/config` | The SQLite database: users, libraries, listening progress | Yes (the database) |
| `/metadata` | Cover images and, by default, the built-in backups | Yes (cover images) |
| `/audiobooks` | Your audiobook and ebook files | **No** |
| `/podcasts` | Downloaded and uploaded podcast episodes | **No** |

On a manual install, plan one backup for the app (its built-in backup, or a copy of `/config` and `/metadata`) and one for the media. On xCloud, a Docker app backup saves all four named volumes together, so both are covered in one job. The cost is size: that backup is as large as your collection.

## What xCloud's One-Click Audiobookshelf Actually Runs

We read xCloud's own Audiobookshelf template (its Compose file and manifest). Here is exactly what it installs, as of 30 November 2026:

| Part | What the template sets up |
|---|---|
| **Image** | Audiobookshelf's official image (`ghcr.io/advplyr/audiobookshelf`) at the version shown on the app page, locked to one exact build, so it never changes on its own |
| **Port** | Container port **80**, only reachable through your domain over HTTPS, not by server IP and port |
| **Database** | Audiobookshelf's built-in SQLite, inside the config volume; no separate database server |
| **Volumes** | `audiobookshelf_config` at `/config`, `audiobookshelf_metadata` at `/metadata`, `audiobookshelf_audiobooks` at `/audiobooks`, `audiobookshelf_podcasts` at `/podcasts` |
| **Health check** | The template's Compose file checks Audiobookshelf's health page every 15 seconds and sets the container to restart if it stops |
| **Server size** | The template lists at least 1 GB RAM, 1 CPU core and 10 GB disk, on an NGINX server with Docker |
| **Install form** | No app fields and no default password; you create the root user in Audiobookshelf's first-run screen |
| **Upload limit** | Browser uploads are capped at **100 MB per file** |
| **Left out on purpose** | Network shares for the media folders |

![What xCloud's one-click Audiobookshelf runs: NGINX with HTTPS, the Audiobookshelf container on port 80 and four named volumes](/_landing/blog/self-host-audiobookshelf-image-2.png)

Two lines matter later. The 100 MB cap changes how you load a big library, which we cover in [Option 2](#option-2-one-click-audiobookshelf-on-xcloud). The locked version means you choose when to update.

## What You Need to Self-Host Audiobookshelf

Audiobookshelf is light on memory and heavy on disk. The table mixes Audiobookshelf's [**Docker install page**](https://www.audiobookshelf.org/docs/documentation/install/docker/) with the minimums in xCloud's template. We checked both on 30 November 2026.

| Item | What you need |
|---|---|
| **RAM and CPU** | At least 1 GB of RAM and 1 CPU core (xCloud's template minimum) |
| **Disk** | 10 GB to start, plus your whole collection, covers, metadata and backups |
| **Config folder** | On a disk inside the same machine; Audiobookshelf says `/config` holds the database and must not sit on a network share |
| **Ports** | Container port 80 (mapped to 13378 in the official example); 80 and 443 open for your reverse proxy |
| **Domain** | An A record pointing at the server, for HTTPS and the mobile apps |

Size the disk for the library you will have in a year, then add room for one full backup if it stays on the same server.

## Option 1: Self-Host Audiobookshelf With Docker Compose

This path follows Audiobookshelf's official Docker and NGINX pages on a fresh Ubuntu server. Check each step against those pages for the version you install.

We built the Compose file and NGINX block below from Audiobookshelf's official examples and did not run them on a test server. Test them on your server before you rely on them.

### Step 1: Prepare the server and domain

Point an A record for your domain (for example `books.example.com`) at `SERVER_IP`. Install Docker using its official instructions for Ubuntu. Open only ports 22, 80 and 443 in your firewall; our [**VPS security guide**](/maximize-your-vps-security/) covers SSH keys and firewall basics.

Create the folders Audiobookshelf will use:

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

Keep them as separate folders. Audiobookshelf's Docker page says no mount point may sit inside another one.

### Step 2: Write the Compose file

Create `/opt/audiobookshelf/docker-compose.yml`. It is based on Audiobookshelf's official example, with these changes:

- A fixed version tag (`2.38.0`) instead of `latest`, so an update happens only when you choose.
- The port bound to `127.0.0.1` so only NGINX can reach it.
- Real folder paths and your own time zone in place of the example's placeholders.

```yaml
services:
  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:2.38.0
    container_name: audiobookshelf
    restart: unless-stopped
    ports:
      - "127.0.0.1:13378:80"
    environment:
      - TZ=Europe/London
    volumes:
      - /opt/audiobookshelf/config:/config
      - /opt/audiobookshelf/metadata:/metadata
      - /srv/audiobooks:/audiobooks
      - /srv/podcasts:/podcasts
```

The `2.38.0` tag was the latest release on Audiobookshelf's GitHub releases page as of November 2026; use the newest release when you install. Start it with `docker compose up -d` from `/opt/audiobookshelf`, then check `docker compose logs -f` for errors.

### Step 3: Put NGINX and SSL in front

Install NGINX and Certbot, then create `/etc/nginx/sites-available/audiobookshelf`. This is Audiobookshelf's [**official NGINX example**](https://www.audiobookshelf.org/docs/documentation/install/reverse-proxy/nginx), trimmed to a port 80 block so Certbot can add HTTPS. The `Upgrade` and `Connection` lines matter: Audiobookshelf's docs say it **requires a WebSocket connection**.

```nginx
server {
    listen 80;
    server_name books.example.com;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_http_version 1.1;
        proxy_pass http://127.0.0.1:13378;
        client_max_body_size 10240M;
    }
}
```

The `client_max_body_size` line comes from the official example and stops large uploads failing with a 413 error. Link the file into `sites-enabled`, run `sudo nginx -t`, reload NGINX, then run `sudo certbot --nginx -d books.example.com`.

### Step 4: Create the root user and a library

Open `https://books.example.com` straight away. Audiobookshelf asks you to create the **root user** first, and until you do, anyone who finds the address can claim it.

Then add a library that points to `/audiobooks` (the container path, not `/srv/audiobooks`). Audiobookshelf's [**book library structure guide**](https://www.audiobookshelf.org/docs/documentation/libraries/book-library/directory-structure) says every book needs its own folder (a single-file book may sit at the library root), and it can read author and series from an `Author/Series/Book` or `Author/Book` layout:

```text
/srv/audiobooks/
  Terry Pratchett/
    Discworld/
      Vol 1 - Guards! Guards!/
        Guards Guards.m4b
  Andy Weir/
    Project Hail Mary/
      Part 1.mp3
      Part 2.mp3
```

The same guide shows a loose audio file inside an author folder as a problem, so fix the layout before the first scan.

## Option 2: One-Click Audiobookshelf on xCloud

The one-click path gives you the stack from the template table without writing any of it. For every screen, see 👉 [**how to deploy Audiobookshelf with xCloud One Click Apps**](/docs/deploy-audiobookshelf-with-xcloud/). The general walkthrough for any template is 👉 [**how to use One-Click App templates in xCloud**](/docs/how-to-use-one-click-app-templates-in-xcloud/).

### Step 1: Pick Audiobookshelf in the catalog

Go to **Sites → New Site**, type **Audiobookshelf** in **Search apps…** and click its card. The page shows **Runs on Nginx, Docker** and the version it installs.

### Step 2: Choose where it runs

Under **Where should it run?**, pick an NGINX server or **Deploy on a new server**, then click **Continue**. If Docker is not installed yet, xCloud installs it during setup, as described in [**enabling Docker on an NGINX server**](/docs/enable-docker-on-an-nginx-server-in-xcloud/). OpenLiteSpeed servers cannot run Docker apps.

### Step 3: Fill in the form and click Next

Enter a **Site Title**, then choose **Demo Site** to try it on a test address or **Go Live** to use your own domain. There are no other fields. Click **Next** and wait while xCloud sets up the app, then SSL, HTTPS and NGINX.

### Step 4: Create the root user and load your books

On **Site Overview**, the **Audiobookshelf Credentials** card shows the site **URL**. Open it right away and create the root user under **Create Root User**.

Add a library with `/audiobooks` as its folder (or `/podcasts` for podcasts), then use Audiobookshelf's **Upload** page. Each browser upload is capped at **100 MB per file**, so a long single-file `.m4b` book can fail. Split those into parts, and add podcasts by their feed so Audiobookshelf downloads episodes on the server itself.

## After Install: Updates, Backups and Security

These three jobs are the same on both paths, and they decide whether your library still works next year.

### Updates

Audiobookshelf's Docker page says to update by pulling the new image and restarting the container. On a manual install, take a backup, change the tag in `docker-compose.yml`, then run `docker compose pull` and `docker compose up -d`.

On xCloud, **App Actions → Redeploy** pulls the images named in the app's Compose file. Because the template locks Audiobookshelf to one exact build, Redeploy pulls that same version again. When a newer version is available, it appears on the site's **App Updates** page and you choose when to apply it. xCloud backs up your data first, puts the old version back if the new one doesn't start, and lets you undo the update for 7 days. 👉 [**How app updates work**](/update-one-click-apps-with-backup-and-undo/)

To move sooner, take a backup and change the image line on the **Compose** page, as described in 👉 [**how to update a One-Click App and edit its Docker Compose**](/docs/update-a-one-click-app-and-edit-its-docker-compose-in-xcloud/). Keep the four volume names exactly as they are. If you edit the Compose file yourself, App Updates stops offering one-click updates for this app.

### Backups

On a manual install, turn on Audiobookshelf's built-in backup for the database and covers. It stores them in `/metadata/backups` by default, so copy that folder off the server too. Back up `/srv/audiobooks` and `/srv/podcasts` with your own tool.

On xCloud, open the site and go to **Backup → Previous Backups** for **Backup Now**, or schedule backups in **Backup → Backup Settings**. xCloud's guide says a Docker app backup "captures named volumes, eligible bind mounts, `docker-compose.yml` and the app's `.env` file", so all four Audiobookshelf volumes go into one snapshot. 👉 See [**how to back up and restore Docker apps**](/docs/backup-and-restore-docker-apps/). Check the free disk first: a local backup of a 50 GB library needs roughly another 50 GB, so a remote destination is often the better choice.

### Security

Keep Audiobookshelf reachable only through NGINX on your domain, which both paths do. Give each listener their own account instead of sharing the root user, and remove accounts you no longer need.

On xCloud, the server's own updates are handled by [**automatic Ubuntu security updates**](/docs/how-automated-security-updates-and-auto-reboot-work-in-xcloud/). The Audiobookshelf account settings, single sign-on and email setup stay inside Audiobookshelf.

## What the One-Click Template Does Not Do

Here is the honest list, read from the same template:

- **No browser uploads over 100 MB per file.** Split big books into parts under 100 MB.
- **No network shares for your media.** The template does not publish the audiobook or podcast folders as SMB or NFS shares.
- **No automatic Audiobookshelf upgrades.** The image is locked, so you choose when to move up.
- **No audiobooks included.** You bring files you own.
- **It needs an NGINX server.** OpenLiteSpeed servers cannot run Docker apps.

To undo the install, delete the site from xCloud. Take a backup first if you want to keep your users, progress and files.

## Docker Compose vs One-Click: Which to Choose

Audiobookshelf itself is free either way. What differs is how much of the plumbing you own.

| | Docker Compose on your own | One-click on xCloud |
|---|---|---|
| **Audiobookshelf cost** | Free (GPL-3.0) | Free (GPL-3.0) |
| **Setup work** | Docker, Compose file, NGINX, Certbot, firewall | Catalog, server, domain |
| **HTTPS and WebSockets** | You write and renew it | Set up for you |
| **Large uploads** | Up to the limit you set in NGINX | 100 MB per file in the browser |
| **Media folders** | Any disk or share you mount | Docker volumes on the server |
| **Backups** | Two jobs: app and media | One scheduled job for all four volumes |
| **Upgrades** | You change the tag | You apply it from App Updates |
| **Server security updates** | You | Automatic Ubuntu security updates |

✅ **Choose Docker Compose if** your audiobooks already sit on a home NAS, you want to mount network storage, or you upload many single-file books over 100 MB.

✅ **Choose one-click if** you want a cloud server your household can reach from anywhere over HTTPS, with backups you schedule from a dashboard. Our guide to [**self-managed vs managed hosting**](/self-managed-vs-managed-hosting/) goes deeper on that trade-off.

## Get Your Audiobook Server Running This Week

If you like owning every layer, the Compose file above is a solid start: pin the version, keep the port on `127.0.0.1`, pass WebSockets through NGINX, create the root user at once, and back up the media folders separately from Audiobookshelf's own backup.

If you would rather skip the plumbing, deploy from [**xCloud Audiobookshelf hosting**](/audiobookshelf-hosting/) and spend that hour sorting your library instead. Compare server sizes on the [**pricing page**](/pricing/) or browse other container apps on [**Docker hosting**](/docker-hosting/). [**Navidrome**](/navidrome-hosting/) fits a music library from the same catalog, and our guide to [**self-hosting Immich**](/self-host-immich/) does the same for photos.

If you have found this blog helpful, feel free to [**subscribe to our blogs**](https://xcloud.host/blog/) for valuable tutorials, guides, knowledge, and tips on web hosting and server management. You can also join our [**Facebook community**](https://www.facebook.com/groups/xcloud.community) to share insights and engage in discussions.

## Frequently Asked Questions

### Is Docker the best way to run Audiobookshelf?

On a Linux server, it is the way Audiobookshelf documents first. The project publishes its own image at ghcr.io/advplyr/audiobookshelf, with a Compose example that mounts four folders: config, metadata, audiobooks and podcasts.

### Which port does Audiobookshelf use in Docker?

The container listens on port 80. Audiobookshelf's own example maps it to port 13378 on the host. On a public server, keep that port closed to the internet and send visitors through a reverse proxy on ports 80 and 443 instead.

### How much server does Audiobookshelf need?

xCloud's template lists at least 1 GB of RAM, 1 CPU core and 10 GB of disk. Disk is what runs out first, because audiobooks are large files and backups add more, so size the server for your whole collection.

### Does the Audiobookshelf backup include my audiobooks?

No. Audiobookshelf's built-in backup saves only its database and the cover images in the metadata folder, and its docs say media files are not included. You need a second backup for the audio files, such as a backup of the whole Docker volume.

### Why does a large audiobook fail to upload on xCloud?

Browser uploads to an Audiobookshelf site on xCloud are capped at 100 MB per file. Split large single-file books into parts, or add podcasts by their feed so Audiobookshelf downloads the episodes on the server itself.

### Does xCloud update Audiobookshelf for me?

Not on its own. The template locks Audiobookshelf to one exact build, so Redeploy pulls that same version again. When a newer version is available, it appears on the site's App Updates page and you choose when to apply it, with a backup first and a 7-day undo.
