docker-compose/conf/synapse
2025-05-05 10:26:45 -07:00
..
.gitkeep Remove redundant downloads temporarily. Return to oneshot install state 2025-02-05 15:50:05 -08:00
README.md Update README.md 2025-05-05 10:26:45 -07:00

Synapse

This directory will contain the generate configuration for Synapse.

homeserver.yaml is the configuration file for the Synapse homeserver, the back end for Matrix based chat. To view all available configuration options you can see the official documents.

Synapse & email

It is recommended to configure an email account for Synapse, which can be used for email validation, and password resets. To do so, edit homeserver.yaml using the options available in the official docs, and then reload Synapse.

Creating an admin user

To create an admin user use the command register_new_matrix_user within the compose-synapse Docker container. Example:

register_new_matrix_user -u dcomms-admin --admin -c /data/homeserver.yaml

User registration and registration tokens

By default, Synapse is configured to require registration tokens to sign up. Synapse servers with open registrations are strongly discouraged, as they can result in severe spam and abuse. To generate a registration token you can follow the official API docs to API access token, and then also to generate a registration token. Example from cli of the dComms host:

user@dcomms-demo:~/dcomms-docker-compose# curl -X POST --header "Authorization: Bearer syt_abc123" http://localhost:8008/_synapse/admin/v1/registration_tokens/new -d '{}'
{"token":"abc123","uses_allowed":null,"pending":0,"completed":0,"expiry_time":null}

Once you have generated a registration token, this can be handed out to users and they can sign-up.