Sign inSign up

zeratax/matrix-registration

By zeratax

Updated about 5 years ago

a token based matrix registration api

Image
1

500K+

zeratax/matrix-registration repository overview

Build Status Coverage Status Docker Image Version (latest semver) Matrix

matrix-registration

a simple python application to have a token based matrix registration

if you like me encountered the situation where you want to invite your friends to your homeserver, but neither wanted to open up public registration nor create accounts for every individual user yourself, this project should be the solution.

with this project you can just quickly generate tokens on the fly and share them with your friends to allow them to register to your homeserver.

installation

  1. pull the image
docker pull zeratax/matrix-registration:${TAG}
  1. create a config.yaml based on config.sample.yaml in a directory called data

you'll need to modify the host setting to listen on every interface, port should continue to be 5000:

host: '0.0.0.0'
port: 5000

furthermore every file based operation needs the prefix /data:

db: 'sqlite:////data/db.sqlite3'
filename: /data/m_reg.log

usage

  • running registration server/api
docker run -d -p ${PORT}:5000/tcp -v $(pwd):/data docker.io/zeratax/matrix-registration:${TAG} serve
  • generating tokens
docker run --rm -v $(pwd):/data matrix-registration:${TAG} generate -o

after you've started the api server and generated a token you can register an account with a simple post request, e.g.:

curl -X POST \
     -F 'username=test' \
     -F 'password=verysecure' \
     -F 'confirm=verysecure' \
     -F 'token=DoubleWizardSki' \
     http://localhost:5000/register

or by visiting http://localhost:5000/register?token=DoubleWizardSki

For more info check the wiki

Tag summary

Content type

Image

Digest

Size

49.9 MB

Last updated

about 5 years ago

docker pull zeratax/matrix-registration:v0.9.2.dev2