28 lines
1011 B
Markdown
28 lines
1011 B
Markdown
# `synapse` database configuration
|
|
|
|
Per default, the ansible role supplies a `sqlite`-database (file-based),
|
|
which is located in `/opt/synapse/data/homeserver.db` (`synapse_sqlite_database_file`).
|
|
|
|
## PostgresQL
|
|
|
|
To configure synapse for use with postgresql, set `synapse_config_database_name` to `psycopg2`.
|
|
|
|
Set your connection information in `synapse_config_database_args` like this:
|
|
```yaml
|
|
synapse_config_database_args:
|
|
user: my_synapse_db_user
|
|
password: my_synapse_db_password
|
|
host: my_database_host
|
|
port: my_database_port_to_connect_to
|
|
# connection pooling (cp) settings, min and max connections
|
|
cp_min: 5 | int
|
|
cp_max: 20 | int
|
|
```
|
|
|
|
Also see [the upstream documentation on the `database` config key](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#database-1).
|
|
|
|
## Transaction limits
|
|
|
|
The ansible role sets a default transaction limit of 10.000 concurrent transactions.
|
|
This configuration can be overridden in `synapse_config_database_txn_limit`.
|