Store backends
Thestore.connection object selects one of three backends.
PostgreSQL
Recommended for production for its robustness, concurrent access, and backup support.SQLite
Suitable for single-instance deployments and local development. Stores all data in one file.Memory
Keeps all data in RAM. Useful for testing, not for production.Backups and recovery
The store database holds user sessions, networks and IDPs (seeded from bootstrap, then modifiable at runtime), wallet configurations and party mappings, and in-flight transactions. If the database is lost and cannot be restored:- All sessions are invalidated (users must log in again).
- Networks and IDPs are re-seeded from bootstrap, but runtime changes are lost.
- In-flight transactions are lost and may need manual intervention.
- Wallets referencing lost networks may need reconfiguration.
- PostgreSQL: use
pg_dumpor an automated solution (pgBackRest, WAL-E). - SQLite: copy the database file regularly, with no writes during the copy.
- Schedule automated daily backups with a retention policy, and test restores.
Signing store security
The optionalsigningStore uses the same connection options as store and is only needed for
the internal signing provider. When it holds keys:
- Store the file in a secure location with restricted access.
- Use strict filesystem permissions (for example
chmod 600for SQLite files). - For PostgreSQL, use separate credentials with minimal privileges.
- Consider encrypting the database at rest.
- Back it up regularly if it holds production keys.
- Never commit signing store files to version control.
Secrets and environments
Maintain separate configuration files per environment (for exampleconfig.dev.json,
config.staging.json, config.prod.json) to isolate settings and credentials.
Never commit secrets. Override sensitive values with environment variables using the Env
suffix on the field, for example clientSecretEnv:
- Network and IDP configurations (excluding secrets) are visible to users with ledger access.
- Anyone with read access to a shared config repository can see non-secret configuration.
- Use environment variables or a secret manager (HashiCorp Vault, AWS Secrets Manager) for sensitive values.
adminAuthcredentials are sensitive: store them securely, rotate them regularly, and use them only where truly needed.