Frequently Asked Question
Adding Users
Last Updated 3 days ago
Adding users to Synapse
(a very good Matrix Server)If you've dockerised synapse, then enter the container with
docker exec -it synapse-synapse-1 /bin/bash
Be sure to use the name of your container here.
Now use the command line options to create a user:
# register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008 New user localpart [root]: GEN Password: Confirm password: Make admin [no]: yes Sending registration request... Success!
Remember to specify the location of your homeserver.yaml file and the correct IP/Port for your server. If you want to obtain the access token for any existing user then use:
# curl -XPOST "http://localhost:8008/_matrix/client/r0/login" \ -H "Content-Type: application/json" \ -d '{ "type": "m.login.password", "user": "GEN", "password": "qy35q35yq35yq35yq35y" }' {"user_id":"@gen:im.somewhere.uk","access_token":"qh345q5hq45hq4h5q345hehtdsfhsrh","home_server":"im.somewhere.uk","device_id":"MIBJGERGGEA"} Again, change your user and password as needed.