SpiceDB Documentation
Concepts
Datastores

Datastores

In order to reduce operational complexity, SpiceDB leverages existing, popular systems for persisting data.

AuthZed has standardized our managed services on CockroachDB, but we give self-hosted customers the option to pick the datastore that best suits their operational requirements.

  • CockroachDB - Recomended for self hosted deployments with high throughput and/or multi-region requirements
  • Cloud Spanner - Recommended for self-hosted Google Cloud deployments
  • PostgreSQL - Recommended for self-hosted single-region deployments
  • MySQL - Not recommended; only use if you cannot use PostgreSQL
  • memdb - Recommended for local development and integration testing against applications

Migrations

Before a datastore can be used by SpiceDB or before running a new version of SpiceDB, you must execute all available migrations.

The only exception is the memdb datastore because it does not persist any data.

In order to migrate a datastore, run the following command with your desired values:

spicedb migrate head \
    --datastore-engine $DESIRED_ENGINE \
    --datastore-conn-uri $CONNECTION_STRING

For more information, refer to the Datastore Migration documentation.

© 2025 AuthZed.