Governate
Sign in Start a trial

Databases

Two stores are used: one for records and one for file keys. Each has its own address, so they can be the same database server, different ones, or one of each kind.

Choices

KindAddressNotes
SQLitesqlite:/path/to/file.dbBuilt in; nothing to install. The file must be on the server's own machine. The default.
PostgreSQLpostgres://user:password@host:5432/name?sslmode=verify-fullCan be on another machine.
GOVERNATE_DB='postgres://governate:[email protected]:5432/governate?sslmode=verify-full'
GOVERNATE_KEYS_DB='postgres://keys:[email protected]:5432/keys?sslmode=verify-full'

With no setting, both are SQLite files in the data folder: governate.db and keys.db.

Encrypted connections

A PostgreSQL server on another machine must be reached over an encrypted connection: the address needs sslmode=verify-full, verify-ca or require. The server refuses to start otherwise. A database on the same machine is exempt.

Tables

The server creates and updates its own tables at start-up. Give its database user the right to create tables in its own database, and nothing more.

What is in each

Neither database holds a readable file key or any file content.

Backups

Back up both databases, the protected files, and the root key (see Keys). All four are needed to restore. The records and keys databases should be backed up at the same moment as each other.