···11-# =============================================================================
22-# Server
33-# =============================================================================
44-SERVER_HOST=127.0.0.1
55-SERVER_PORT=3000
66-# The public-facing hostname of the PDS (used in DID documents, JWTs, etc.)
77-PDS_HOSTNAME=localhost:3000
88-# =============================================================================
99-# Database
1010-# =============================================================================
1111-DATABASE_URL=postgres://postgres:postgres@localhost:5432/pds
1212-# Connection pool settings (defaults are good for most deployments)
1313-# DATABASE_MAX_CONNECTIONS=100
1414-# DATABASE_MIN_CONNECTIONS=10
1515-# DATABASE_ACQUIRE_TIMEOUT_SECS=30
1616-# =============================================================================
1717-# Blob Storage
1818-# =============================================================================
1919-# Backend: "filesystem" (default) or "s3"
2020-# BLOB_STORAGE_BACKEND=filesystem
2121-# For filesystem backend:
2222-BLOB_STORAGE_PATH=/var/lib/tranquil/blobs
2323-# For S3 backend:
2424-# S3_ENDPOINT=http://localhost:9000
2525-# AWS_REGION=us-east-1
2626-# S3_BUCKET=pds-blobs
2727-# AWS_ACCESS_KEY_ID=minioadmin
2828-# AWS_SECRET_ACCESS_KEY=minioadmin
2929-# =============================================================================
3030-# Backups
3131-# =============================================================================
3232-# Enable/disable automatic repo backups
3333-# BACKUP_ENABLED=true
3434-# Backend: "filesystem" (default) or "s3"
3535-# BACKUP_STORAGE_BACKEND=filesystem
3636-# For filesystem backend:
3737-BACKUP_STORAGE_PATH=/var/lib/tranquil/backups
3838-# For S3 backend:
3939-# BACKUP_S3_BUCKET=pds-backups
4040-# Backup schedule and retention
4141-# BACKUP_RETENTION_COUNT=7
4242-# BACKUP_INTERVAL_SECS=86400
4343-# =============================================================================
4444-# Cache & Rate Limiting
4545-# =============================================================================
4646-# Ripple (in-process CRDT cache) is the default. No config needed for single-node.
4747-# Set VALKEY_URL to use valkey instead (disables ripple).
4848-# VALKEY_URL=redis://localhost:6379
4949-#
5050-# Ripple multi-node settings (only needed when clustering):
5151-# RIPPLE_BIND=0.0.0.0:7890
5252-# RIPPLE_PEERS=10.0.0.2:7890,10.0.0.3:7890
5353-# RIPPLE_MACHINE_ID=1
5454-# RIPPLE_GOSSIP_INTERVAL_MS=200
5555-# RIPPLE_CACHE_MAX_MB=256
5656-# =============================================================================
5757-# Security Secrets
5858-# =============================================================================
5959-# These MUST be set in production (minimum 32 characters each)
6060-# In development, set TRANQUIL_PDS_ALLOW_INSECURE_SECRETS=1 to use defaults
6161-# Server-wide secret for OAuth token signing (HS256)
6262-# JWT_SECRET=your-secure-random-string-at-least-32-chars
6363-# Secret for DPoP proof validation
6464-# DPOP_SECRET=your-secure-random-string-at-least-32-chars
6565-# Key for encrypting user signing keys at rest (AES-256-GCM)
6666-# MASTER_KEY=your-secure-random-string-at-least-32-chars
6767-# Set this ONLY in development to allow default/weak secrets
6868-# TRANQUIL_PDS_ALLOW_INSECURE_SECRETS=1
6969-# =============================================================================
7070-# PLC Directory
7171-# =============================================================================
7272-# PLC_DIRECTORY_URL=https://plc.directory
7373-# PLC_TIMEOUT_SECS=10
7474-# PLC_CONNECT_TIMEOUT_SECS=5
7575-# Optional: rotation key for PLC operations (defaults to user's key)
7676-# PLC_ROTATION_KEY=did:key:...
7777-# =============================================================================
7878-# DID Resolution
7979-# =============================================================================
8080-# Cache TTL for resolved DID documents (default: 300 seconds)
8181-# DID_CACHE_TTL_SECS=300
8282-# =============================================================================
8383-# Relays
8484-# =============================================================================
8585-# Comma-separated list of relay URLs to notify via requestCrawl
8686-# CRAWLERS=https://bsky.network,https://relay.upcloud.world
8787-# =============================================================================
8888-# Firehose (subscribeRepos WebSocket)
8989-# =============================================================================
9090-# Buffer size for firehose broadcast channel
9191-# FIREHOSE_BUFFER_SIZE=10000
9292-# Disconnect slow consumers after this many events of lag
9393-# FIREHOSE_MAX_LAG=5000
9494-# =============================================================================
9595-# Notification Service
9696-# =============================================================================
9797-# Queue processing settings
9898-# NOTIFICATION_BATCH_SIZE=100
9999-# NOTIFICATION_POLL_INTERVAL_MS=1000
100100-# Email notifications (via sendmail/msmtp)
101101-# MAIL_FROM_ADDRESS=noreply@example.com
102102-# MAIL_FROM_NAME=My PDS
103103-# SENDMAIL_PATH=/usr/sbin/sendmail
104104-# Discord notifications (via bot DM)
105105-# DISCORD_BOT_TOKEN=bot-token
106106-# Telegram notifications (via bot)
107107-# TELEGRAM_BOT_TOKEN=bot-token
108108-# TELEGRAM_WEBHOOK_SECRET=random-secret
109109-# Signal notifications (via signal-cli)
110110-# SIGNAL_CLI_PATH=/usr/local/bin/signal-cli
111111-# SIGNAL_SENDER_NUMBER=+1234567890
112112-# =============================================================================
113113-# Upload Limits
114114-# =============================================================================
115115-# Maximum blob/body size in bytes (default: 10GB)
116116-# This controls both the Axum body limit and blob upload limits.
117117-# Make sure your nginx client_max_body_size matches or exceeds this value.
118118-# MAX_BLOB_SIZE=10737418240
119119-# =============================================================================
120120-# Repository Import
121121-# =============================================================================
122122-# Set to "true" to accept repository imports
123123-# ACCEPTING_REPO_IMPORTS=false
124124-# Maximum import size in bytes (default: 100MB)
125125-# MAX_IMPORT_SIZE=104857600
126126-# Maximum blocks per import (default: 100000)
127127-# MAX_IMPORT_BLOCKS=100000
128128-# Skip verification during import (testing only)
129129-# SKIP_IMPORT_VERIFICATION=false
130130-# =============================================================================
131131-# Account Registration
132132-# =============================================================================
133133-# Require invite codes for registration
134134-# INVITE_CODE_REQUIRED=true
135135-# Comma-separated list of available user domains
136136-# AVAILABLE_USER_DOMAINS=example.com
137137-# Enable self-hosted did:web identities (default: true)
138138-# Hosting did:web requires a long-term commitment to serve DID documents.
139139-# Set to false if you don't want to offer this option.
140140-# ENABLE_PDS_HOSTED_DID_WEB=false
141141-# =============================================================================
142142-# Server Metadata (returned by describeServer)
143143-# =============================================================================
144144-# Privacy policy URL (optional)
145145-# PRIVACY_POLICY_URL=https://example.com/privacy
146146-# Terms of service URL (optional)
147147-# TERMS_OF_SERVICE_URL=https://example.com/terms
148148-# Contact email address (optional)
149149-# CONTACT_EMAIL=admin@example.com
150150-# =============================================================================
151151-# Rate Limiting
152152-# =============================================================================
153153-# Disable all rate limiting (testing only, NEVER in production)
154154-# DISABLE_RATE_LIMITING=1
155155-# =============================================================================
156156-# Account Deletion
157157-# =============================================================================
158158-# How often to check for scheduled account deletions (default: 3600 = 1 hour)
159159-# SCHEDULED_DELETE_CHECK_INTERVAL_SECS=3600
160160-# =============================================================================
161161-# Moderation / Report Service
162162-# =============================================================================
163163-# If configured, moderation reports will be proxied to this service
164164-# instead of being stored locally. The service should implement the
165165-# com.atproto.moderation.createReport endpoint (eg., Bluesky's Ozone).
166166-# Both URL and DID must be set for proxying to be enabled.
167167-# REPORT_SERVICE_URL=https://mod.bsky.app
168168-# REPORT_SERVICE_DID=did:plc:ar7c4by46qjdydhdevvrndac
169169-# =============================================================================
170170-# Age Assurance Override
171171-# =============================================================================
172172-# Enable this if you have separately assured the ages of your users
173173-# (eg., through your own age verification process). When enabled, the PDS
174174-# will return "assured" status for age assurance checks instead of proxying
175175-# to the appview. This helps migrated users avoid the age assurance
176176-# catch-22 on bsky.app.
177177-# PDS_AGE_ASSURANCE_OVERRIDE=1
178178-# =============================================================================
179179-# Miscellaneous
180180-# =============================================================================
181181-# Allow HTTP for proxy requests (development only)
182182-# ALLOW_HTTP_PROXY=1
183183-# =============================================================================
184184-# SSO / Social Login
185185-# =============================================================================
186186-# Each provider requires ENABLED=true plus CLIENT_ID and CLIENT_SECRET.
187187-# Register your PDS as an OAuth application with each provider to get credentials.
188188-189189-# GitHub
190190-# SSO_GITHUB_ENABLED=true
191191-# SSO_GITHUB_CLIENT_ID=
192192-# SSO_GITHUB_CLIENT_SECRET=
193193-194194-# Discord
195195-# SSO_DISCORD_ENABLED=true
196196-# SSO_DISCORD_CLIENT_ID=
197197-# SSO_DISCORD_CLIENT_SECRET=
198198-199199-# Google
200200-# SSO_GOOGLE_ENABLED=true
201201-# SSO_GOOGLE_CLIENT_ID=
202202-# SSO_GOOGLE_CLIENT_SECRET=
203203-204204-# GitLab (set ISSUER for self-hosted instances)
205205-# SSO_GITLAB_ENABLED=false
206206-# SSO_GITLAB_CLIENT_ID=
207207-# SSO_GITLAB_CLIENT_SECRET=
208208-# SSO_GITLAB_ISSUER=https://gitlab.com
209209-210210-# Generic OIDC
211211-# SSO_OIDC_ENABLED=false
212212-# SSO_OIDC_CLIENT_ID=
213213-# SSO_OIDC_CLIENT_SECRET=
214214-# SSO_OIDC_ISSUER=https://your-identity-provider.com
215215-# SSO_OIDC_NAME=Custom Provider
216216-217217-# Apple Sign-in
218218-# SSO_APPLE_ENABLED=true
219219-# SSO_APPLE_CLIENT_ID=com.example.signin # Services ID from Apple Developer Portal
220220-# SSO_APPLE_TEAM_ID=XXXXXXXXXX # 10-character Team ID
221221-# SSO_APPLE_KEY_ID=XXXXXXXXXX # Key ID from portal
222222-# SSO_APPLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
223223-CARGO_MOMMYS_LITTLE=mister
224224-CARGO_MOMMYS_PRONOUNS=his
225225-CARGO_MOMMYS_ROLES=daddy
226226-CARGO_MOMMYS_EMOTES="🚛/🧱/🚜/🔩/🦺"
227227-CARGO_MOMMYS_MOODS=ominous
+4-4
README.md
···1717## Quick Start
18181919```bash
2020-cp .env.example .env
2020+cp example.toml config.toml
2121podman compose up db -d
2222just run
2323```
···2727See `example.toml` for all configuration options.
28282929> [!NOTE]
3030-> The order of configuration precendence is: environment variables, than a config file passed via `--config`, than `/etc/tranquil-pds/config.toml`, than the built-in defaults. So you can use environment variables, or a config file, or both.
3030+> The order of configuration precedence is: environment variables, then a config file passed via `--config`, then `/etc/tranquil-pds/config.toml`, then the built-in defaults. So you can use environment variables, or a config file, or both.
31313232## Development
3333···42424343### Quick Deploy (Docker/Podman Compose)
44444545-Edit `.env` with your values. Generate secrets with `openssl rand -base64 48`.
4545+Edit `config.toml` with your values. Generate secrets with `openssl rand -base64 48`.
46464747```bash
4848-cp .env.example .env
4848+cp example.toml config.toml
4949podman-compose -f docker-compose.prod.yaml up -d
5050```
5151
···27272828 env = {
2929 RUST_SRC_PATH = rustPlatform.rustLibSrc;
3030- }
3131- # isabel if this is like a horrible way to do this forgive me for my sins ig
3232- # if you can make this better go do it and tell me how or something :3
3333- // builtins.fromTOML (
3434- (s: if s == "" then s else s + "\"") (lib.replaceStrings [ "\n" "=" "\"" ] [ "\"\n" "=\"" "\\\"" ]
3535- (lib.concatStringsSep "\n"
3636- (lib.filter (line: !lib.hasPrefix "#" line && line != "")
3737- (lib.splitString "\n"
3838- (if lib.pathIsRegularFile ./.env
3939- then (lib.readFile ./.env)
4040- else ""
4141- )
4242- )
4343- )
4444- )
4545- )
4646- );
3030+ };
47314832 packages = [
4933 just