Table of Contents

Audiobookshelf

FIXME description

Install

docker-compose:

### docker-compose.yml ###
services:
  audiobookshelf:
    container_name: audiobookshelf
    image: ghcr.io/advplyr/audiobookshelf:latest
    environment:
      - AUDIOBOOKSHELF_UID=99
      - AUDIOBOOKSHELF_GID=100
    ports:
      - 8076:80
    volumes:
      - /mnt/nfs/books/_audiobookshelf/audiobooks:/audiobooks
      - /mnt/nfs/books/_audiobookshelf/podcasts:/podcasts
      - /mnt/docker/custom_config/audiobookshelf:/config
      - /mnt/nfs/books/_audiobookshelf/metadata:/metadata
    networks:
      - internal
    restart: unless-stopped
      
networks:
  internal:
    external:
      name: internal

DNS: Created local DNS record on pihole:

audibol.garlondindustries.com 10.0.0.55

This allows users in LAN using public FQDN to reach the service, while traffic stays in LAN.

Reverse proxy: Created letsencrypt cert for audibol.garlondindustries.com.

In Audiobookshelf, got error “Socket Failed to Connect” - fixed by enabling WebSocket support on reverse proxy.

Config

Authelia

FIXME: oicd client and abs config

WebSockets support when using Authelia

Authelia's nginx snippets can break websockets connections - in the case of ABS a banner is shown in the browser “coult not connect socket”. The service seems to work fine otherwise, but the banner blocks the player's play/paus button.

To fix this, added proxy headers to NGINX config for audibol to upgrade the connection to websockets:

include /snippets/authelia-location.conf;

location / {
    include /snippets/proxy.conf;
    include /snippets/authelia-authrequest.conf;
    proxy_pass $forward_scheme://$server:$port;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

To verify, look for “http 101” responses to requests to /socket.io/*, indicating a protocol switch from HTTPS to WebSockets.

Download And Convert Audible audiobooks

Can use e.g. OpenAudible to connect to Audible and download owned books. Books are stored along with cover and metadata in .aax format. Files are still encrypted and DRM protected though. Need paid license for OpenAudible to decrypt and convert. License is about $15. OpenAudible apparently was open source at one point, but stopped publishing source code when paid license was introduced.

Solution:

Tried AaxAudioConverter: Needs Audible activation code to do anything. Used to rely on some official Audible Manager to get that code, but that tools does not seem to be around anymore. Instead, AaxAudioConverter can run next to BookLibConnect (see below) to get the code and do its thing.

FIXME screenshots

…then BookLibConnect: Depencies section is a litte vague being all like “aah just…dotnet 64 someth….” - need dotNet Desktop Runtime x64 v5.0.16 (see #39).

FIXME screenshots

This can be set to export in AAX so it can be converted by AaxAudioConverter into M4A (no DRM, no bookmarks), but it also creates M4B files (DRM, bookmarks).

Findings:

Workflow:

So: M4B files: might still have DRM but did play in 3rd party media player.