Single-instance deployment #
Requires Bun. For a local integration test: install dependencies, copy .env.example
to .env, configure supported platform credentials, then run bun start.
Use bun test, bun run typecheck, and bun run build before deployment.
Configuration #
PUBLIC_BASE_URL: permanent HTTPS resolver origin; defaults tohttps://pod.place. Do not change it after publishing enclosures.PLATFORM_CREDENTIALS: JSON array of{platform, token}, for example[{"platform":"maincasts.com","token":"<random secret>"}]. Generate a random token of at least 32 characters withopenssl rand -hex 32. The platform identifier is a name, not a publisher DID or proof of domain ownership; the token authenticates the platform. Only onboard trusted hosts, which must authorize their users before making registry writes. A credential works for any publisher without adding show URIs to configuration. Keep it on the host's backend, never in browser code. Multiple tokens for the same platform can coexist during rotation. Recreate the container after changing credentials; revocation is platform-wide, not per publisher.SLINGSHOT_URL: trusted HTTPS read origin. This service checks returned AT-URIs, CIDs, lexicon content, and requested record visibility. It does not independently verify signed AT repo commits. Review that trust dependency before public launch.- Media hosts are not configured. Platforms choose public HTTPS storage/CDN URLs. URL/address/DNS validation remains a basic safety check, not provider approval. DNS checks run on registration/reconciliation, not on every listener request, and cannot guarantee future DNS behavior or downstream media-host redirects.
DATABASE_PATH: persistent SQLite path. Its parent directory is created at startup.MAPPING_FRESHNESS_SECONDS/MAPPING_MAX_AGE_SECONDS: defaults 300 / 21600.ANALYTICS_SECRET: optional random secret of at least 32 characters. Empty disables ingestion even if a show opts in. Show-scoped pseudonyms rotate daily. Changing the secret also changes pseudonyms; keep it stable between ordinary restarts.ANALYTICS_RETENTION_DAYS: event retention, default 7.TRUSTED_PROXY_IPS: explicit literal addresses of trusted proxies, not arbitrary networks. Forwarded headers are ignored from other peers. Trusted proxies must append/overwriteX-Forwarded-Forcorrectly. Do not enable this without checking the actual proxy behavior.
Container #
docker compose up --build -d starts one instance with a persistent named data
volume. The port is bound to localhost; put a TLS reverse proxy in front. The
Dockerfile runs as the unprivileged Bun user. Pin BUN_VERSION to the tested version
or an image digest in your production build pipeline.
Route /e/*, /v1/*, and optionally /health to this app. Other paths can continue
serving the static website from its existing deployment. Bunny can remain part of
that frontend, but no Bunny edge-script adapter or mapping distribution is shipped.
Disable CDN/proxy caching on resolver and API routes, including any forced cache
rules that override response headers. Do not put /e/* behind a media pull zone
that skips the application on cache hits. Use edge rate limiting/WAF for public
abuse protection; the app includes only basic bounded write rate limiting.
Persistence and operations #
- Keep one writable instance initially. No Redis is required. Move to a shared database when replicas are needed instead of giving each replica a divergent SQLite file.
- Back up SQLite with its online backup mechanism or a clean shutdown. Copying only the main file during active WAL writes is not a safe backup.
/healthverifies database availability. Monitor 503 responses, failed refreshes, storage capacity, reconciliation lag, and analytics losses. Buffered metrics are best-effort; they can be lost before flush or when storage is unavailable.- Shutdown drains HTTP work, finishes reconciliation, flushes metrics, and closes SQLite.
- Prototype
resolver_mappings/record_keystables, if present, are preserved but not served. Register canonical records under the new media/identity contract.
Before public launch #
- Integrate a publisher's real PDS write and registration workflow.
- Confirm playback, HEAD, range probes, replacement audio, and host migration using real clients.
- Verify the trusted read source's freshness, outage behavior, and acceptable query volume.
- Configure TLS, path routing, supported platform credentials, backups, and abuse controls.
- Publish analytics/privacy limitations. No raw listener IPs should appear in proxy/access logs either.
Updating an older deployment #
Replace PUBLISHER_CREDENTIALS with PLATFORM_CREDENTIALS and remove the old
showUris lists. Delete MEDIA_HOSTS; it is no longer read or enforced. Reuse a
service token only if it is still appropriate to grant that platform broad registry
write access. No database migration or new episode registration is required.
docker compose up --build -d --force-recreate
Shared-service considerations #
One service resolves many publishers; it is not one instance per publisher. The initial single VPS/SQLite deployment is a shared availability dependency. Monitor it independently, back up data, and plan redundancy/shared storage as traffic grows. A supported platform's token has broad control-plane access, including withdrawal; AT-backed refreshes prevent arbitrary destination overrides, but cannot validate whether that platform has authorized a withdrawal with the publisher. Protect and rotate tokens, and add write auditing/stronger withdrawal proof before opening onboarding to less-trusted platforms. Keep rate limits per platform and analytics identities scoped to each show. A global media-host allowlist is not required.
Public uptime with Poduptime #
Poduptime is suitable for the resolver's public redirect availability. It sends HEAD requests every minute from three AWS regions. For redirect/prefix services, it expects a redirect to the configured destination and does not follow it, isolating resolver availability from the media host.
Once the resolver is live, create a dedicated registered canary episode with a
stable delivery URL and analytics disabled. Contact poduptime@spreaker.com or
open an issue on its project to request a listing. Supply the service name, canary
https://pod.place/e/{id}, and expected redirect destination. Inclusion is managed
by Poduptime, not automatically enabled by deploying this service.
Its public service page can be linked from the website, or its documented API can supply a separately hosted status view. Show missing data as unknown, not healthy. The monitoring bot's HEAD requests must not be counted as downloads.
Also monitor /health, authenticated registration/refresh, reconciliation lag,
and storage failures separately. Poduptime's redirect check does not test these
control-plane operations, and /health currently checks only database availability.