Our Personal Data Server from scratch! tranquil.farm
oauth atproto pds rust postgresql objectstorage fun
at main 44 lines 1.6 kB view raw view rendered
1# Tranquil PDS on kubernetes 2 3If you're reaching for kubernetes for this app, you're experienced enough to know how to spin up: 4 5- cloudnativepg (or your preferred postgres operator) 6- a PersistentVolume for blob storage 7- the app itself (it's just a container with some env vars) 8 9You'll need a wildcard TLS certificate for `*.your-pds-hostname.example.com`. User handles are served as subdomains. 10 11The container image expects: 12- A TOML config file mounted at `/etc/tranquil-pds/config.toml` (or passed via `--config`) 13- `DATABASE_URL` - postgres connection string 14- `BLOB_STORAGE_PATH` - path to blob storage (mount a PV here) 15- `BACKUP_STORAGE_PATH` - path for repo backups (optional but recommended) 16- `PDS_HOSTNAME` - your PDS hostname (without protocol) 17- `JWT_SECRET`, `DPOP_SECRET`, `MASTER_KEY` - generate with `openssl rand -base64 48` 18- `CRAWLERS` - typically `https://bsky.network` 19 20and more, check the example.toml for all options. Environment variables can override any TOML value. 21You can also point to a config file via the `TRANQUIL_PDS_CONFIG` env var. 22 23Health check: `GET /xrpc/_health` 24 25## Custom homepage 26 27Mount a ConfigMap with your `homepage.html` into the container's frontend directory and it becomes your landing page. Go nuts with it. Account dashboard is at `/app/` so you won't break anything. 28 29```yaml 30apiVersion: v1 31kind: ConfigMap 32metadata: 33 name: pds-homepage 34data: 35 homepage.html: | 36 <!DOCTYPE html> 37 <html> 38 <head><title>Welcome to my PDS</title></head> 39 <body> 40 <h1>Welcome to my little evil secret lab!!!</h1> 41 <p><a href="/app/">Sign in</a></p> 42 </body> 43 </html> 44```