Package: matrix-registration
matrix-registrationA simple Python application enabling token-based registration for matrix servers.You may have, like me, encountered the situation where you want to invite your friends to create an account on your homeserver, but neither want to open up public registration nor create accounts for every individual user yourself. This project aims to solve this problem.With matrix-registration, you can quickly generate tokens on the fly and share them with your friends to allow them to register on your homeserver.SetupInstall using pip:pip3installmatrix-registrationor check thedocker guideFirst startTo start, executematrix-registration.A configuration file should be generated for you on first start.If this fails...you can create a configuration for your matrix homeserver by copyingconfig.sample.yamlto your server and editing it:wgethttps://raw.githubusercontent.com/ZerataX/matrix-registration/master/config.sample.yaml
cpconfig.sample.yamlconfig.yaml
nanoconfig.yamlThen pass the path to this configuration to the application on startup using--config-path /path/to/config.yaml.INFO:This only asks you for the most important options.
You should definitely take a look at the actual configuration file. The path to the file will be printed bymatrix-registrationthe first time it runs.Usage$matrix-registration-h
Usage:matrix-registration[OPTIONS]COMMAND[ARGS]...atokenbasedmatrixregistrationapp

Options:--config-pathTEXTspecifiestheconfigfiletobeused--versionShowtheflaskversion-h,--helpShowthismessageandexit.

Commands:generategeneratenewtokenservestartapiserverstatusviewstatusordisableAfter you've started the API server andgenerated a tokenyou can register an account either:with a simple post request, e.g.:curl-XPOST\-F'username=test'\-F'password=verysecure'\-F'confirm=verysecure'\-F'token=DoubleWizardSki'\http://localhost:5000/registeror by visitinghttp://localhost:5000/register?token=DoubleWizardSkiFurther ResourcesNginx reverse-proxyIf you'd like to run matrix-registration behind a reverse-proxy, here is an example nginx setup:location~^/(static|register){proxy_set_headerX-Forwarded-For$remote_addr;proxy_passhttp://localhost:5000;}Custom registration pageIf you want to write your own registration page, you can take a look at the sample inresources/example.htmlThe html page looks for the query paramatertokenand sets the token input field to it's value. this would allow you to directly share links with the token included, e.g.:https://homeserver.tld/register.html?token=DoubleWizardSkiIf you already have a website and want to use your own register page, thewikidescribes a more advanced nginx setup.botif you're looking for a bot to interface with matrix-registration and manage your tokens, take a look at:maubot-inviteSimilar projectsmatrix-invitelive athttps://librepush.net/matrix/registration/matrix-register-botusing a bot to review accounts before sending out invite linksMatrixRegistrationsimilar java project using my webuiFor more info check thewikiArtwork attributionThe valley cover photo on the registration page is photo byJesús Ronceroused under the terms ofCC-BY-SA 4.0. No warranties are given.The font used on the registration page isNunitowhich is licensed underSIL Open Font License, Version 1.1.