Bibliotheca

Bibliotheca is a Docker-based book management system running outside of Kubernetes. It provides book discovery, download, categorization, text-to-speech conversion, and full-text search.

Overview

PropertyValue
PlatformDocker Compose (not K3s)
Accesslocalhost:8080 (qBittorrent UI), localhost:8088 (nginx)
Location/home/lucas/bibliotheca/
GPUYes (TTS container uses NVIDIA GPU)

Container Inventory

ContainerImageStatusPortsPurpose
bibliotheca-webcustomRunning (2+ weeks)-Web UI for book management
bibliotheca-torrentlinuxserver/qbittorrentRunning (37h)8080BitTorrent download client
bibliotheca-vpnqmcgaw/gluetunRunning (37h, healthy)6881VPN tunnel for torrent traffic
bibliotheca-ttscustom (NVIDIA GPU)Running (2+ weeks)-GPU-accelerated text-to-speech
bibliotheca-nginxnginxRunning (2+ weeks)8088Reverse proxy for services
bibliotheca-discoverycustomRunning (2+ weeks)-Book discovery and metadata
bibliotheca-categorizercustomRESTARTING-Book categorization (broken)

Known Issue: bibliotheca-categorizer is continuously restarting. See Current Issues.

Architecture

┌──────────────────────────────────────────────────────┐
│                   Bibliotheca Stack                    │
│                  (Docker Compose)                      │
│                                                      │
│  ┌──────────────┐     ┌────────────────────────────┐ │
│  │  nginx :8088 │────>│  bibliotheca-web           │ │
│  │  (reverse    │     │  Book management UI        │ │
│  │   proxy)     │     └────────────────────────────┘ │
│  └──────────────┘                                    │
│                                                      │
│  ┌──────────────────────────────────────────────────┐│
│  │  bibliotheca-discovery                           ││
│  │  Finds books, fetches metadata                   ││
│  └───────────────────────┬──────────────────────────┘│
│                          │                           │
│                          v                           │
│  ┌──────────────────────────────────────────────────┐│
│  │  bibliotheca-vpn (Gluetun)                       ││
│  │  ┌────────────────────────────────────────────┐  ││
│  │  │  bibliotheca-torrent (qBittorrent) :8080   │  ││
│  │  │  Downloads via VPN tunnel                   │  ││
│  │  └────────────────────────────────────────────┘  ││
│  └──────────────────────────────────────────────────┘│
│                                                      │
│  ┌──────────────────┐  ┌──────────────────────────┐  │
│  │ bibliotheca-tts  │  │ bibliotheca-categorizer  │  │
│  │ Text-to-Speech   │  │ Book categorization      │  │
│  │ (NVIDIA GPU)     │  │ STATUS: RESTARTING       │  │
│  └──────────────────┘  └──────────────────────────┘  │
│                                                      │
│  External: Meilisearch :7700 (full-text search)      │
└──────────────────────────────────────────────────────┘

Network Topology

The torrent container runs inside the Gluetun VPN container's network namespace, ensuring all download traffic is routed through the VPN:

Internet <──> Gluetun VPN <──> qBittorrent
                  │
                  └── Port 6881 (torrent)
                  └── Port 8080 (qBittorrent web UI)

Services

qBittorrent (Torrent Client)

  • Web UI: http://localhost:8080
  • Image: linuxserver/qbittorrent
  • Runs inside Gluetun VPN network for privacy
  • Port 6881 for BitTorrent protocol

Gluetun (VPN)

  • Image: qmcgaw/gluetun
  • Health-checked container
  • Provides VPN network namespace for qBittorrent
  • Status: Healthy

Text-to-Speech (TTS)

  • Custom image with NVIDIA GPU support
  • Converts ebooks to audio format
  • Uses RTX 3090 for accelerated inference
  • Running for 2+ weeks
  • Port: 7700
  • Image: getmeili/meilisearch
  • Full-text search engine for book metadata and content
  • Running for 4 weeks

Discovery

  • Custom service for finding and fetching book metadata
  • Running for 2+ weeks

Categorizer

  • Automatically categorizes books by genre/topic
  • Currently broken -- continuously restarting

Management

# Check container status
docker ps --filter "name=bibliotheca"

# View logs for the failing categorizer
docker logs bibliotheca-categorizer --tail=50

# Restart the entire stack
cd /home/lucas/bibliotheca/ && docker compose restart

# Restart a specific container
docker restart bibliotheca-torrent

# Access qBittorrent UI
# Open http://localhost:8080 in browser

# Check Gluetun VPN health
docker inspect bibliotheca-vpn | jq '.[0].State.Health'