register_new_matrix_user -c homeserver.yaml -u alice -p 'secret' --admin

Category: Matrix & Synapse

register_new_matrix_user -c homeserver.yaml -u alice -p 'secret' --admin

Create an admin user non-interactively

Creates user alice with the given password and makes her a server admin, which grants access to the Admin API endpoints. The -u flag takes only the localpart, so the full ID becomes @alice:example.com. Passing passwords on the command line leaks them into shell history, so prefer --password-file in scripts. A server admin is not the same as a room admin.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.