Audio Book Shelf
AudioBookShelf is a Self-hosted audiobook and podcast server.
Installation
It is possible to install ABS on bare-metal. They provide prebuilt packages for Debian, Redhat/CentOS and NixOS. But i am on Gentoo, so i decided against downloading a deb or an rpm package but go the containers way instead.
As usual, you need to create the audiobookshelf user but be careful to assign it to the media group so that it can access all the audiobooks and podcasts of your collection,:
useradd -d /data/daemons/audiobookshelf -m -g media audiobookshelf
Then, as user audiobookshelf, create the following docker compose yaml (see here):
- docker-compose.yml
version: "3.7" services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf:latest ports: - 13378:80 volumes: - /data/Audiobooks/:/audiobooks - /data/Podcasts:/podcasts - /data/daemons/audiobookshelf/config:/config - /data/Metadata:/metadata environment: - TZ=Europe/Rome
Set a proper port (13378)for your needs, one that is free from all your other services. Double check the various volumes to point to your media collection properly. Also set your TimeZone (TZ) appropriately.
Now ensure your folders do exist:
mkdir /data/Podcasts mkdir /data/Audiobooks mkdir /data/Metadata chown audiobookshelf:media -R /data/Podcasts /data/Audiobooks /data/Metadata su - audiobookshelf mkdir config
And then pull the images:
su - audiobookshelf
podman compose pull
Reverse Proxy
This page is a collection of reverse proxy setups for AudioBookShelf.
This is my recomended one for NGINX:
- audiobookshelf.conf
server { server_name podcast.gardiol.org; listen 8443 ssl; # external access listen 443 ssl; # internal access access_log /var/log/nginx/podcast.gardiol.org_access_log main; error_log /var/log/nginx/podcast.gardiol.org_error_log info; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $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; proxy_redirect http:// https://; } include org.certbot.conf; }
Unfortunately AudioBookShelf at this time does not support yet sub-paths, so you will need to host it on a subdomain.
Autostart
To start it, and set it up on boot, as usual follow my indications Using Containers on Gentoo, so link the user-containers init script:
ln -s /etc/init.d/user-containers /etc/init.d/user-containers.audiobookshelf
and create the following config file:
- /etc/conf.d/user-containers.audiobookshelf
USER=audiobookshelf DESCRIPTION="The audiobooks and podcast server"
Add the service to the default runlevel and start it now:
rc-update add user-containers.audiobookshelf default rc-service user-containers.audiobookshelf start
Upgrade
Since it's using pdoman, stop the service then, as user audiobookshelf, run:
podman compose pull
and restart the service.