sedi-relay/docs/configuration.md

141 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

2022-05-06 07:04:51 +00:00
# Configuration
2022-11-27 01:53:06 +00:00
## General
### Listener
2022-05-06 07:04:51 +00:00
The address and port the relay will listen on. If the reverse proxy (nginx, apache, caddy, etc)
is running on the same host, it is recommended to change `listen` to `localhost`
listen: 0.0.0.0
port: 8080
2022-12-20 13:00:18 +00:00
### Host
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
The domain your relay will use to identify itself.
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
host: relay.example.com
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
## Database
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
### Type
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
The type of SQL database to use. Options:
2022-11-27 01:53:06 +00:00
2022-12-20 13:00:18 +00:00
* sqlite (default)
* postgresql
* mysql
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
type: sqlite
2022-05-06 07:04:51 +00:00
2022-11-27 01:53:06 +00:00
2022-12-20 13:00:18 +00:00
### Minimum Connections
2022-11-27 01:53:06 +00:00
2022-12-20 13:00:18 +00:00
The minimum number of database connections to keep open (does nothing at the moment)
2022-11-27 01:53:06 +00:00
2022-12-20 13:00:18 +00:00
min_connections: 0
2022-11-27 01:53:06 +00:00
2022-12-20 13:00:18 +00:00
### Maximum Connections
2022-11-27 01:53:06 +00:00
2022-12-20 13:00:18 +00:00
The maximum number of database connections to open (does nothing at the moment)
2022-11-27 01:53:06 +00:00
2022-12-20 13:00:18 +00:00
max_connections: 10
2022-11-27 01:53:06 +00:00
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
## Sqlite
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
### Database
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
The path to the database file.
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
database: relay.sqlite3
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
If the path is relative, it will be relative to the directory the config file is located. For
instance, if the config is located at `/home/izalia/.config/activityrelay/config.yaml`, the
following:
relay.sqlite3
will resolve to:
/home/izalia/.config/activityrelay/relay.sqlite3
## PostgreSQL
### Database
Name of the database to use.
database: activityrelay
### Hostname
The address to use when connecting to the database. A value of `null` will use the default of
`/var/run/postgresql`
hostname: null
### Port
The port to use when connecting to the database. A value of `null` will use the default of `5432`
port: null
### Username
The user to use when connecting to the database. A value of `null` will use the current system
username.
username: null
### Password
The password for the database user.
password: null
## MySQL
### Database
Name of the database to use.
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
database: activityrelay
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
### Hostname
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
The address to use when connecting to the database. A value of `null` will use the default of
`/var/run/mysqld/mysqld.sock`
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
### Port
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
The port to use when connecting to the database. A value of `null` will use the default of `3306`
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
port: null
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
### Username
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
The user to use when connecting to the database. A value of `null` will use the current system
username.
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
username: null
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
### Password
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
The password for the database user.
2022-05-06 07:04:51 +00:00
2022-12-20 13:00:18 +00:00
password: null