Database Configuration
Configure a fresh installation
Database configuration is only intended for fresh installations. Do not reconfigure the database on an existing installation, as it is likely to cause system instability or break functionality.
MariaDB is the default database. The installation wizard configures it automatically for package installations, and Docker ships with a pre-configured MariaDB container. No additional database configuration is required for MariaDB.
To configure a fresh installation with PostgreSQL instead, see the PostgreSQL configuration guide.
Update database credentials
To update database credentials on an existing installation, select your installation method:
- Package Installation
- Docker
Open /etc/passbolt/passbolt.php and edit the Datasources block:
[...]
// Database configuration.
'Datasources' => [
'default' => [
'host' => '127.0.0.1',
'port' => '3306',
'username' => 'YOUR_DATABASE_USER_USERNAME',
'password' => 'YOUR_DATABASE_USER_PASSWORD',
'database' => 'YOUR_PASSBOLT_DATABASE_NAME',
],
],
[...]
Save and quit. No restart is needed to apply these changes.
Database credentials are set in environment variables. Edit them for each container:
For the MariaDB container:
MYSQL_DATABASE: "passboltdb"
MYSQL_USER: "passbolt"
MYSQL_PASSWORD: "very-strong-password"
For the passbolt container:
DATASOURCES_DEFAULT_DATABASE: "passboltdb"
DATASOURCES_DEFAULT_USERNAME: "passbolt"
DATASOURCES_DEFAULT_PASSWORD: "very-strong-password"