
Deploy SpiceDB relationship authorization
Durable relationship-based authorization with PostgreSQL.
Storage
Postgres
Just deployed
/var/lib/postgresql/data
API
SpiceDB Gateway
Just deployed
Just deployed
Deploy and Host SpiceDB on Railway
About Hosting SpiceDB
SpiceDB is an Apache-2.0 permissions database inspired by Google Zanzibar. This template runs the official non-root 1.56.0 debug image because Railway pre-deploy migrations require its shell, with PostgreSQL, generated API authentication, Watch support, and a public REST gateway with dependency-aware health checks.
Why Deploy SpiceDB on Railway
One click creates a durable authorization service while keeping its gRPC, metrics, and database listeners private. Applications can model relationships and evaluate permissions through the authenticated public HTTP API without operating a Kubernetes cluster.
Common Use Cases
- Centralize fine-grained permissions across application services.
- Model organization, document, repository, and project relationships.
- Replace scattered role checks with consistent permission queries.
Dependencies for SpiceDB Hosting
The template uses immutable SpiceDB, PostgreSQL, and Caddy images. SpiceDB runs datastore migrations before each deployment and PostgreSQL enables commit timestamps for Watch clients.
Deployment Dependencies
- SpiceDB stores relationships and evaluates permissions.
- PostgreSQL persists schemas, relationships, revisions, and migrations.
- Caddy exposes the HTTP API and performs the database-aware health probe.
- Railway provides private networking, generated secrets, deployment health checks, and persistent storage.
Template Content
SpiceDB Gateway
caddy:2.11.4-alpineSPICEDB_TELEMETRY_ENDPOINT
Empty by default to disable upstream telemetry.
Postgres
postgres:16-alpine
