You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automated provisioning for BB Ansible share & appbox nodes on Hetzner.
Inspired by Saltbox β curl, configure, install.
Node Architecture (The 3 Classes)
BB Ansible is a distributed, multi-tenant ecosystem. It does not run on a single monolithic server. Instead, roles are mathematically split across three distinct classes of nodes, all tied together by a central Ceph storage fabric.
1. The Service Node (node_type: service)
The Brain of the Cluster: This is your primary control plane. You typically only need one service node in your entire cluster.
What it runs: Single Sign-On (Authentik), Global Reverse Proxy (Traefik), AI/LLM interfaces (Open WebUI), secure file drop mechanisms (Enclosed), and central monitoring agents (Beszel Hub).
Storage Access: Needs access to the global Ceph filesystem (/bbfs) strictly for database backups.
Hardware Tier: Low/Medium (4 Cores, 8GB RAM). Highly dependent on Authentik load and whether you run AI models locally.
2. The Feeder Node (node_type: feeder)
The Ingestion Engine: This node is responsible for finding, downloading, unpacking, and organizing media. It does the heavy lifting of pirating content.
What it runs: The entire *Arr ecosystem (Sonarr, Radarr, Prowlarr, etc.), download clients (qBittorrent, SABnzbd, Cross-Seed), and ecosystem managers (Autoscan).
Storage Access: Needs massive, high-speed read/write access to the Ceph /data and /media mounts to dump newly acquired files.
Hardware Tier: Medium/High (8 Cores, 16GB+ RAM, fast local NVMe cache).
3. The Media Node (node_type: share or appbox)
The Delivery Edge: This is what your users connect to. You can horizontally scale these infinitely (e.g., user01-appbox, public-share-03).
What it runs: Media servers (Plex, Emby, Jellyfin), VPN tunnels (Gluetun), and edge-based Autoscan targets.
Storage Access: Strictly Read-Only access to the Ceph /media mount. This insulates your core library from users accidentally deleting files via an Emby client bug. It gets read/write access to its own isolated application folder on the array.
Hardware Tier: High (8+ Cores, QuickSync/GPU for transcoding, 10Gbps networking).
Step-by-Step Cluster Deployment
When building a fresh BB cluster from scratch, you must provision the nodes in a specific mathematical order so the identity matrix bootstraps cleanly.
Step 1: Pre-Flight Credentials
Because BB is designed for zero-touch deployments, you must define your cluster's identities and API keys in a .env file before executing the installer. The installer will automatically detect it and inject these into the cluster.
Log in as root on your first node and install nano (fresh Hetzner servers don't have it):
Fill in the required variables. (Do NOT use quotes around your values in the .env file.)
BB_NODE_TYPE=service(Required: Set this to service for the first node)
BB_ADMIN_PASSWORD=your_secure_password(Required: The master password you want for your cluster dashboard)
BB_CF_EMAIL=you@example.com(Required: Cloudflare email for SSL certs)
BB_CF_API_TOKEN=your_token(Required: Cloudflare API Token for Traefik DNS-01 validation. Create this in the Cloudflare Dashboard under My Profile -> API Tokens -> Custom Token -> Permissions: Zone / DNS / Edit)
BB_CEPH_DASHBOARD_URL=https://ceph:8443(Required: The URL of your centralized Ceph dashboard)
(Fill in any other optional API keys you have, such as Discord webhooks or Media APIs. See accounts.yml.default for explanations).
Save and exit (Ctrl+O, Enter, Ctrl+X).
(Note: Keep this .env file handy. You will securely copy it to the other nodes before you bootstrap them.)
Step 2: Provision the Service Node
You must establish the identity core (Authentik) first, as all other nodes will eventually route their subdomains to it.
Install a fresh OS (Debian/Arch) on your Service hardware.
Ensure your properly configured .env file is present in your current directory.
Run the bootstrap installer as root:
# Must be run as root (fresh Hetzner servers don't have sudo)
curl -sL https://raw.githubusercontent.com/LunarVigilante/bb_ansible/main/install.sh | bash
Execute the deployment:
cd /srv/git/blackbeard
bb install node
Log into your new Authentik dashboard (e.g. https://sso.yourdomain.com) using the auto-generated Postgres and JWT passwords outputted by the log (or defined in your .env), and establish your core user identity.
Step 3: Provision the Feeder Node
Now that SSO is online, spin up the download engine.
Boot the Feeder hardware.
Securely copy your .env file from the Service node over to this node's root directory.
The system will automatically acquire its Ceph keyring, mount the unified /data arrays, deploy the *Arr stack, and hook its web dashboards into the Traefik router on the Service node.
Step 4: Provision Media Nodes (Appboxes/Shares)
Finally, generate edge nodes for users to consume the media.
Boot the Media hardware (preferably with a GPU/QuickSync).
Securely copy your .env file from the Service node over to this node's root directory.
Edit the .env file to set the edge parameters:
nano .env
# Change to: BB_NODE_TYPE=appbox (or share)# Change to: BB_MEDIA_SERVICE=plex (or emby, jellyfin)
The media node will mount the Ceph /media array strictly as Read-Only to protect your library, dynamically request an ingress certificate from Cloudflare, and spin up the designated streaming container.
Security
Data Flow β Request Journey Through the Security Stack