Skip to main content

PostgreSQL

PostgreSQL is the recommended database for production deployments.

Configuration​

Environment Variables​

VariableDescriptionDefaultRequired
DATABASE__POSTGRES__HOSTPostgreSQL host-✅
DATABASE__POSTGRES__PORTPostgreSQL port5432❌
DATABASE__POSTGRES__USERDatabase username-✅
DATABASE__POSTGRES__PASSWORDDatabase password-✅
DATABASE__POSTGRES__NAMEDatabase name-✅
DATABASE__POSTGRES__SSLMODESSL connection mode-❌
DATABASE__TYPE=postgres
DATABASE__POSTGRES__HOST=localhost
DATABASE__POSTGRES__PORT=5432
DATABASE__POSTGRES__USER=safebucket-user
DATABASE__POSTGRES__PASSWORD=safebucket-password
DATABASE__POSTGRES__NAME=safebucket
DATABASE__POSTGRES__SSLMODE=disable

YAML Configuration​

database:
type: postgres
postgres:
host: localhost
port: 5432
user: safebucket-user
password: safebucket-password
name: safebucket
sslmode: disable

SSL Modes​

PostgreSQL supports several SSL modes for securing the database connection:

ModeDescription
disableNo SSL, unencrypted connection
requireEncrypt the connection but don't verify the server certificate
verify-caEncrypt and verify the server certificate is signed by a trusted CA
verify-fullEncrypt, verify the CA, and verify the server hostname matches the certificate
warning

Only use disable in development environments. For production, use require or stricter modes.