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

Category: Matrix & Synapse

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

Create a user but skip if they already exist

The --exists-ok flag turns a duplicate registration into a no-op instead of an error, which makes provisioning scripts idempotent. If the user exists, their password and admin status are left untouched. Combine with --password-file for safe bulk onboarding. Without the flag, an existing user aborts the script.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.