Skip to content

Creating user accounts

Create accounts with the create-account tool or the shared secret registration endpoint.

Building Zendrite puts the create-account tool in the bin folder. The tool reads zendrite.yaml to connect to a running Zendrite instance. It needs shared secret registration enabled.

Create a normal account:

./bin/create-account -config /path/to/zendrite.yaml -username USERNAME

The tool prompts you for the new account’s password.

Add the -admin flag to create an admin account:

./bin/create-account -config /path/to/zendrite.yaml -username USERNAME -admin

create-account connects to http://localhost:8008 by default. Set a different address with the -url flag:

./bin/create-account -config /path/to/zendrite.yaml -username USERNAME -url https://localhost:8448

In Docker, find the CONTAINERNAME with docker ps, then run the tool inside the container:

docker exec -it CONTAINERNAME /usr/bin/create-account -config /path/to/zendrite.yaml -username USERNAME
docker exec -it CONTAINERNAME /usr/bin/create-account -config /path/to/zendrite.yaml -username USERNAME -admin

Zendrite supports the Synapse-compatible shared secret registration endpoint.

Enable it by setting a secret in the registration_shared_secret field of the client_api section in zendrite.yaml:

client_api:
  # ...
  registration_shared_secret: ""

Then call the /_synapse/admin/v1/register endpoint as described in the Synapse documentation.

The endpoint stays disabled until you set a secret. Remove the secret from the config to disable it again.