Files
DoTheEvo 2ab0d4f46e update
2025-01-28 19:52:02 +01:00
..
2025-01-28 19:52:02 +01:00

Audiobookshelf

guide-by-example

logo

Purpose & Overview

WORK IN PROGRESS
WORK IN PROGRESS
WORK IN PROGRESS

Selfhosted audiobook library.

Opensource. Able to download the books localy. Written in javascript.

Client apps

Files and directory structure

/mnt/
└── bigdisk/
    └── audiobooks/
/home/
└── ~/
    └── docker/
        └── audiobookshelf/
            ├── config/
            ├── metadata/
            ├── .env
            └── compose.yml
  • /mnt/bigdisk/... - a mounted media storage share
  • config/ - persistent configuration
  • metadata/ - metadata
  • .env - a file containing environment variables for docker compose
  • compose.yml - a docker compose file, telling docker how to run the containers

You only need to provide the two files.
The directories are created by docker compose on the first run.

compose

Port is only exposed, meaning it's just documentation to know that it's running on port 80. Reverse proxy is expected so thats why not really needed opening ports.

compose.yml

services:

  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf
    container_name: audiobookshelf
    hostname: audiobookshelf
    restart: unless-stopped
    env_file: .env
    volumes:
      - ./config:/config
      - ./metadata:/metadata
      - /mnt/bigdisk/audiobooks:/mnt/audiobooks
    expose:
      - "80"

networks:
  default:
    name: $DOCKER_MY_NETWORK
    external: true

.env

# GENERAL
DOCKER_MY_NETWORK=caddy_net
TZ=Europe/Bratislava
PUID=1000
PGID=1000

All containers must be on the same network.
Which is named in the .env file.
If one does not exist yet: docker network create caddy_net

Reverse proxy

Caddy is used, details here.

Caddyfile

books.{$MY_DOMAIN} {
    reverse_proxy audiobookshelf:80
}

First run

...

Library organization

Troubleshooting

Update

Manual image update:

  • docker-compose pull
  • docker-compose up -d
  • docker image prune

Backup and restore

Backup

Using borg that makes daily snapshot of the entire directory.

Restore

  • down the bookstack containers docker-compose down
  • delete the entire bookstack directory
  • from the backup copy back the bookstack directory
  • start the containers docker-compose up -d