Matrix Registration Bot

This bot aims to create and manage registration tokens for a matrix server. It wants to help invitation based servers to maintain usability.
It does not create a user itself, but rather aims to make use of MSC3231.
The feature is still experimental. More information can be found in the Synapse Documentation.

Getting started


Server configuration

Your server should be configured to a token restricted registration. Add the following to your homeserver.yaml:

enable_registration: true
registration_requires_token: true

Create a bot account

Then you need to create an account for the bot on the server, like you would do with any other account.
A good username is registration-bot. Also note the access token of the bot. One way to get the token is to login as
the bot and got to Settings -> Help & About -> Access Token in Element.

Once you are finished you can start the installation of the bot.


Download the project from GitHub

$ cd matrix-registration-bot

then adjust the configuration by copying and editing the example config.

$ cp example_config.yml config.yml

You can then simply start the bot with



Open a Direct Message to the bot. The type one of the following commands.

Supported commands

  • !help: Shows this help
  • !list: Lists all registration token
  • !create: Creates a token that that is valid for one registration for seven days
  • !delete <token> Deletes the specified token
  • !delete-all Deletes all token


The bot in the current state is very unsafe (unchecked input is fed into requests).


Feel free to contribute or discuss this bot with me. You can reach me via The project is made possible by Simple-Matrix-Bot-Lib.

Code of Conduct


View Github