
Deploy SpiceDB relationship authorization
Durable relationship-based authorization with PostgreSQL.
Storage
Just deployed
/var/lib/postgresql/data
API
SpiceDB Gateway
Just deployed
SpiceDB
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 distroless SpiceDB 1.57.1 image as a non-root user with no shell, backed by PostgreSQL over TLS, with generated API authentication, Watch support, and a public HTTP gateway that holds no credentials.
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, using Railway's TLS-enabled image.
- Caddy exposes the HTTP API and forwards SpiceDB's health check.
- Railway provides private networking, generated secrets, deployment health checks, and persistent storage.
Template Content
SpiceDB Gateway
caddy:2.11.9-alpineSpiceDB
authzed/spicedb:v1.57.1SPICEDB_TELEMETRY_ENDPOINT
Empty by default to disable upstream telemetry.

