From 1551fbd78c7e6750e838dc4dd81f40a3c55256c9 Mon Sep 17 00:00:00 2001 From: crypt0rr <57799908+crypt0rr@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:33:05 +0100 Subject: [PATCH 1/2] Added Audiobookshelf --- README.md | 21 ++++---- services/audiobookshelf/.env | 8 +++ services/audiobookshelf/README.md | 11 +++++ services/audiobookshelf/config/serve.json | 16 ++++++ services/audiobookshelf/docker-compose.yml | 57 ++++++++++++++++++++++ 5 files changed, 103 insertions(+), 10 deletions(-) create mode 100644 services/audiobookshelf/.env create mode 100644 services/audiobookshelf/README.md create mode 100644 services/audiobookshelf/config/serve.json create mode 100644 services/audiobookshelf/docker-compose.yml diff --git a/README.md b/README.md index dc50545..269e997 100644 --- a/README.md +++ b/README.md @@ -21,16 +21,17 @@ If you would like to add your own config, you can use the [service-template](tem ### Media and Entertainment -| πŸŽ₯ Service | πŸ“ Description | πŸ”— Link | -| ------------------ | ------------------------------------------------------------------------------------------ | ------------------------------- | -| 🎬 **Plex** | A media server that organizes video, music, and photos from personal media libraries. | [Details](services/plex) | -| πŸ“Ί **Jellyfin** | An open-source media system that puts you in control of managing and streaming your media. | [Details](services/jellyfin) | -| 🎞️ **Radarr** | A movie collection manager for Usenet and BitTorrent users. | [Details](services/radarr) | -| πŸ“‘ **Sonarr** | A PVR for Usenet and BitTorrent users to manage TV series. | [Details](services/sonarr) | -| πŸŽ₯ **Bazarr** | A companion tool to Radarr and Sonarr for managing subtitles. | [Details](services/bazarr) | -| πŸ“Š **Tautulli** | A monitoring and tracking tool for Plex Media Server. | [Details](services/tautulli) | -| πŸ“₯ **qBittorrent** | An open-source BitTorrent client. | [Details](services/qbittorrent) | -| πŸ”— **Slink** | A fast, self-hosted alternative to ShareDrop for secure local file sharing. | [Details](services/slink) | +| πŸŽ₯ Service | πŸ“ Description | πŸ”— Link | +| --------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------- | +| 🎬 **Plex** | A media server that organizes video, music, and photos from personal media libraries. | [Details](services/plex) | +| πŸ“Ί **Jellyfin** | An open-source media system that puts you in control of managing and streaming your media. | [Details](services/jellyfin) | +| 🎞️ **Radarr** | A movie collection manager for Usenet and BitTorrent users. | [Details](services/radarr) | +| πŸ“‘ **Sonarr** | A PVR for Usenet and BitTorrent users to manage TV series. | [Details](services/sonarr) | +| πŸŽ₯ **Bazarr** | A companion tool to Radarr and Sonarr for managing subtitles. | [Details](services/bazarr) | +| πŸ“Š **Tautulli** | A monitoring and tracking tool for Plex Media Server. | [Details](services/tautulli) | +| πŸ“₯ **qBittorrent** | An open-source BitTorrent client. | [Details](services/qbittorrent) | +| πŸ”— **Slink** | A fast, self-hosted alternative to ShareDrop for secure local file sharing. | [Details](services/slink) | +| 🎧 **Audiobookshelf** | A self-hosted audiobook and podcast server with multi-user support and playback syncing. | [Details](services/audiobookshelf) | ### Productivity and Collaboration diff --git a/services/audiobookshelf/.env b/services/audiobookshelf/.env new file mode 100644 index 0000000..01f2abc --- /dev/null +++ b/services/audiobookshelf/.env @@ -0,0 +1,8 @@ +#version=1.0 +#url=https://github.com/2Tiny2Scale/tailscale-docker-sidecar-configs +#COMPOSE_PROJECT_NAME= // only use in multiple deployments on the same infra +SERVICE=audiobookshelf +IMAGE_URL=ghcr.io/advplyr/audiobookshelf +SERVICEPORT=13378 +TS_AUTHKEY= //Insert Tailscale key here from the Admin Portal +DNS_SERVER=1.1.1.1 diff --git a/services/audiobookshelf/README.md b/services/audiobookshelf/README.md new file mode 100644 index 0000000..677fc8d --- /dev/null +++ b/services/audiobookshelf/README.md @@ -0,0 +1,11 @@ +# Audiobookshelf with Tailscale Sidecar Configuration + +This Docker Compose configuration sets up [Audiobookshelf](https://github.com/advplyr/audiobookshelf) with Tailscale as a sidecar container to securely access and manage your audiobook and podcast library over a private Tailscale network. By integrating Tailscale, you can ensure that your Audiobookshelf instance remains private and accessible only to devices within your Tailscale network. + +## Audiobookshelf + +[Audiobookshelf](https://github.com/advplyr/audiobookshelf) is an open-source self-hosted application for managing and streaming audiobooks and podcasts. It offers features like multi-user support, playback progress sync, a web player, and mobile app integrations, making it easy to organize and enjoy your audiobook and podcast collection from anywhere. By adding Tailscale, you can protect your library from unauthorized access while maintaining seamless and secure connectivity for all your devices. + +## Configuration Overview + +In this setup, the `tailscale-audiobookshelf` service runs Tailscale, which manages secure networking for the Audiobookshelf service. The `audiobookshelf` service uses the Tailscale network stack via Docker's `network_mode: service:` configuration. This ensures that Audiobookshelf’s web interface and streaming capabilities are only accessible through the Tailscale network (or locally, if preferred), providing an extra layer of security and privacy for your personal audiobook and podcast collection. diff --git a/services/audiobookshelf/config/serve.json b/services/audiobookshelf/config/serve.json new file mode 100644 index 0000000..7b7bed2 --- /dev/null +++ b/services/audiobookshelf/config/serve.json @@ -0,0 +1,16 @@ +{ + "TCP": { + "443": { + "HTTPS": true + } + }, + "Web": { + "${TS_CERT_DOMAIN}:443": { + "Handlers": { + "/": { + "Proxy": "http://127.0.0.1:13378" + } + } + } + } +} diff --git a/services/audiobookshelf/docker-compose.yml b/services/audiobookshelf/docker-compose.yml new file mode 100644 index 0000000..dd8718a --- /dev/null +++ b/services/audiobookshelf/docker-compose.yml @@ -0,0 +1,57 @@ +services: +# Make sure you have updated/checked the .env file with the correct variables. +# All the ${ xx } need to be defined there. + # Tailscale Sidecar Configuration + tailscale: + image: tailscale/tailscale:latest # Image to be used + container_name: ${SERVICE} # Name for local container management + hostname: ${SERVICE} # Name used within your Tailscale environment + environment: + - TS_AUTHKEY=${TS_AUTHKEY} + - TS_STATE_DIR=/var/lib/tailscale + - TS_SERVE_CONFIG=/config/serve.json # Tailsacale Serve configuration to expose the web interface on your local Tailnet - remove this line if not required + - TS_USERSPACE=false + - TS_ENABLE_HEALTH_CHECK=true # Enable healthcheck endpoint: "/healthz" + - TS_LOCAL_ADDR_PORT=127.0.0.1:41234 # The : for the healthz endpoint + volumes: + - ${PWD}/config:/config # Config folder used to store Tailscale files - you may need to change the path + - ${PWD}/${SERVICE}/ts/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path + devices: + - /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work + cap_add: + - net_admin # Tailscale requirement + - sys_module # Tailscale requirement + #ports: + # - 0.0.0.0:${SERVICEPORT}:${SERVICEPORT} # Binding port ${SERVICE}PORT to the local network - may be removed if only exposure to your Tailnet is required + # If any DNS issues arise, use your preferred DNS provider by uncommenting the config below + # dns: + # - ${DNS_SERVER} + healthcheck: + test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:41234/healthz"] # Check Tailscale has a Tailnet IP and is operational + interval: 1m # How often to perform the check + timeout: 10s # Time to wait for the check to succeed + retries: 3 # Number of retries before marking as unhealthy + start_period: 10s # Time to wait before starting health checks + restart: always + + # ${SERVICE} + application: + image: ${IMAGE_URL} # Image to be used + network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale + container_name: app-${SERVICE} # Name for local container management + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Amsterdam + volumes: + - ${PWD}/${SERVICE}-data/app/config:/config + depends_on: + tailscale: + condition: service_healthy + healthcheck: + test: ["CMD", "pgrep", "-f", "${SERVICE}"] # Check if ${SERVICE} process is running + interval: 1m # How often to perform the check + timeout: 10s # Time to wait for the check to succeed + retries: 3 # Number of retries before marking as unhealthy + start_period: 30s # Time to wait before starting health checks + restart: always From 70797156570e695c26d5d4255671c157d55cf6ae Mon Sep 17 00:00:00 2001 From: crypt0rr <57799908+crypt0rr@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:06:04 +0100 Subject: [PATCH 2/2] Fix --- services/audiobookshelf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/audiobookshelf/.env b/services/audiobookshelf/.env index 01f2abc..bcaf4eb 100644 --- a/services/audiobookshelf/.env +++ b/services/audiobookshelf/.env @@ -4,5 +4,5 @@ SERVICE=audiobookshelf IMAGE_URL=ghcr.io/advplyr/audiobookshelf SERVICEPORT=13378 -TS_AUTHKEY= //Insert Tailscale key here from the Admin Portal +TS_AUTHKEY= DNS_SERVER=1.1.1.1