Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Convinator uses a two part configuration system: environment variables for sensitive secrets, and a TOML config file for less sensitive variables.


Environment Variables

All Convinator environment variables start with CONVI_. This section only includes variables that are not documented elsewhere.

CONVI_CONFIG_FILE

Location for the convinator.toml file. Defaults to ./convinator.toml.

CONVI_DATABASE_URL

Convinator supports postgres, mysql and sqlite databases. This variable should be set to the connection string for the database. For example:

  • postgres://convinator:supersecretpassword@localhost:5342/convinator
  • mysql://convinator:supersecretpassword@localhost:3306/convinator
  • sqlite://convinator.db?mode=rwc

Defaults to sqlite://convinator.db?mode=rwc.

CONVI_JWT_SECRET

Used for encoding authentication JWTs. Generate one using: openssl rand -hex 32. Although this variable is not required, it is HIGHLY recommended to set it. If not, a random string will be generated on every server startup. This means that users will have to reauthenticate every time the server restarts.


convinator.toml

This TOML file is used to configure Convinator.

Complete Example

If you just want to quickly set up your instance, copying this config should get you a long way. You can find more about each configuration option below.

[storage]
endpoint = "http://garage:3900"
# access_key = ""
# secret_key = ""
region = "garage"
bucket_name = "convinator"

[link_embeds]
enabled = true
allowed_urls = ["https://*"]

[storage]

Configuration for S3 compatible storage. Used for uploading files, like message attachments or profile pictures.

endpoint

Endpoint for your S3 provider. If not set, Convinator will attempt to use the CONVI_STORAGE_ENDPOINT environment variable.

access_key

S3 access key. If not set, Convinator will attempt to use the CONVI_STORAGE_ACCESS_KEY environment variable.

secret_key

S3 secret key. If not set, Convinator will attempt to use the CONVI_STORAGE_SECRET_KEY environment variable.

region

Bucket region. If using garage this should be garage. If not set, Convinator will attempt to use the CONVI_STORAGE_REGION environment variable.

bucket_name

Bucket name, defaults to convinator. If not set, Convinator will attempt to use the CONVI_STORAGE_BUCKET environment variable.

Storage Example

[storage]
endpoint = "http://localhost:3900"
access_key = "GKf82ad4401d11c2d15a95646d"
secret_key = "0330fa367bfc497f054071a5700f57874f02b0958f831710f9be2132b4d9075f"
region = "garage"
bucket_name = "convinator"

Configure fetching of metadata from shared urls, and rendering them in a card in the chat.

enabled

Boolean to enable or disable embeds. Defaults to enabled (true).

allowed_urls

Array of globs which match urls that are fetched and embedded. This feature uses the globset crate and detailed usage can be found there. A good example of a glob that you might want to use is: "https://*" to only match urls that support HTTPS.

[link_embeds]
enabled = true
allowed_urls = ["https://*"]