LinuxCommandLibrary

register_new_matrix_user

Create users on Matrix homeserver

TLDR

Create a user interactively
$ register_new_matrix_user --config path/to/homeserver.yaml
copy
Create an admin user interactively
$ register_new_matrix_user --config path/to/homeserver.yaml --admin
copy
Create admin user non-interactively
$ register_new_matrix_user --config path/to/homeserver.yaml --user [username] --password [password] --admin
copy
Create user on a remote homeserver
$ register_new_matrix_user --config path/to/homeserver.yaml --user [username] --password [password] --no-admin [https://matrix.example.com]
copy

SYNOPSIS

register_new_matrix_user [options]

DESCRIPTION

register_new_matrix_user registers new users on a Matrix homeserver when open registration has been disabled. It reads the shared secret from the homeserver configuration to authorize user creation.
This is the official way to create users on a Synapse server with closed registration.

PARAMETERS

--config file

Path to Synapse homeserver.yaml configuration
--user name
Username for the new account
--password password
Password for the new account
--admin
Create an administrator account
--no-admin
Do not make the new user an admin (default)
-k secret, --shared-secret secret
Shared secret (alternative to providing via config file)
-t type, --user-type type
User type as specified in synapse.api.constants.UserTypes
server_url
Homeserver URL (default: https://localhost:8448)

CONFIGURATION

homeserver.yaml

Synapse homeserver configuration file containing the registration_shared_secret used to authorize user creation. Path specified with --config.

CAVEATS

Requires access to the homeserver.yaml configuration file. Non-interactive mode exposes passwords in shell history; use interactive mode for security.

HISTORY

Part of Synapse, the reference Matrix homeserver implementation. Provides administrative user management.

SEE ALSO

synctl(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard