{"id":13557682,"url":"https://github.com/ZerataX/matrix-registration","last_synced_at":"2025-04-03T12:30:56.370Z","repository":{"id":34642149,"uuid":"130606977","full_name":"zeratax/matrix-registration","owner":"zeratax","description":"a token based matrix registration api","archived":false,"fork":false,"pushed_at":"2023-03-05T17:50:50.000Z","size":1110,"stargazers_count":224,"open_issues_count":16,"forks_count":42,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-07T02:20:27.115Z","etag":null,"topics":["api","friends","matrix","matrix-org","matrix-registration","pypi","python3","registration","token-authentication"],"latest_commit_sha":null,"homepage":"https://zeratax.github.io/matrix-registration/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeratax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-22T20:57:25.000Z","updated_at":"2024-04-05T11:48:04.000Z","dependencies_parsed_at":"2024-01-15T09:02:21.985Z","dependency_job_id":"552003c5-6b26-4188-95d8-687ae764a3ec","html_url":"https://github.com/zeratax/matrix-registration","commit_stats":{"total_commits":281,"total_committers":17,"mean_commits":"16.529411764705884","dds":0.1779359430604982,"last_synced_commit":"db7aab3dbfb5dbc3254b918a88d0e38c10582d46"},"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeratax%2Fmatrix-registration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeratax%2Fmatrix-registration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeratax%2Fmatrix-registration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeratax%2Fmatrix-registration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeratax","download_url":"https://codeload.github.com/zeratax/matrix-registration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247002170,"owners_count":20867415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","friends","matrix","matrix-org","matrix-registration","pypi","python3","registration","token-authentication"],"created_at":"2024-08-01T12:04:29.265Z","updated_at":"2025-04-03T12:30:55.476Z","avatar_url":"https://github.com/zeratax.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cimg src=\"resources/logo.png\" width=\"300\"\u003e\n\n[![Build Status](https://travis-ci.org/ZerataX/matrix-registration.svg?branch=master)](https://travis-ci.org/ZerataX/matrix-registration) [![Coverage Status](https://coveralls.io/repos/github/ZerataX/matrix-registration/badge.svg)](https://coveralls.io/github/ZerataX/matrix-registration) [![Translation status](https://l10n.dmnd.sh/widgets/matrix-registration/-/svg-badge.svg)](http://l10n.dmnd.sh/engage/matrix-registration/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/matrix-registration.svg) [![PyPI](https://img.shields.io/pypi/v/matrix-registration.svg)](https://pypi.org/project/matrix-registration/) [![Docker Pulls](https://img.shields.io/docker/pulls/zeratax/matrix-registration)](https://hub.docker.com/r/zeratax/matrix-registration) [![Matrix](https://img.shields.io/matrix/matrix-registration:dmnd.sh.svg?server_fqdn=matrix.org)](https://matrix.to/#/#matrix-registration:dmnd.sh)\n\n# matrix-registration\n\nA simple Python application enabling token-based registration for matrix servers.\n\nYou 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.\n\nWith matrix-registration, you can quickly generate tokens on the fly and share them with your friends to allow them to register on your homeserver.\n\n\u003cimg src=\"https://matrix.org/_matrix/media/v1/download/dmnd.sh/UKGgpbHRdFXzKywxjjbfHAsI\" width=\"500\"\u003e\n\n\n## Setup\nInstall using pip:\n\n```bash\npip3 install matrix-registration\n```\n\nor check the [docker guide](https://github.com/ZerataX/matrix-registration/wiki/docker)\n\n### First start\nTo start, execute `matrix-registration`.\n\nA configuration file should be generated for you on first start.\n\n**Note:**\nFor `server_location` it is recommended to use a local connect, e.g. `localhost:8008` (or whatever port synapse listens to).\nIt is possible however to connect over the internet, but you will need to make sure `/_synapse/admin/v1/register` is accessible.\n\n\u003cdetails\u003e\n  \u003csummary\u003e If the configuration file is not automatically discovered...\u003c/summary\u003e\n  \nyou can create a configuration by copying [config.sample.yaml](/config.sample.yaml) to your server and editing it:\n```bash\nwget https://raw.githubusercontent.com/ZerataX/matrix-registration/master/config.sample.yaml\ncp config.sample.yaml config.yaml\nnano config.yaml\n```\n\nThen pass the path to this configuration to the application on startup using `--config-path /path/to/config.yaml`.\n\u003c/details\u003e\n\n__INFO:__ \n- This only asks you for the most important options. \nYou should definitely take a look at the actual configuration file. The path to the file will be printed by `matrix-registration` the first time it runs.\n\n## Usage\n\n```bash\n$ matrix-registration -h\nUsage: matrix-registration [OPTIONS] COMMAND [ARGS]...\n\n  a token based matrix registration app\n\nOptions:\n  --config-path TEXT  specifies the config file to be used\n  --version           Show the flask version\n  -h, --help          Show this message and exit.\n\nCommands:\n  generate  generate new token\n  serve     start api server\n  status    view status or disable\n\n```\n\nAfter you've started the API server and [generated a token](https://github.com/ZerataX/matrix-registration/wiki/api#creating-a-new-token) you can register an account either:\n- with a simple post request, e.g.:\n```bash\ncurl -X POST \\\n     -F 'username=test' \\\n     -F 'password=verysecure' \\\n     -F 'confirm=verysecure' \\\n     -F 'token=DoubleWizardSki' \\\n     http://localhost:5000/register\n```\n- or by visiting http://localhost:5000/register?token=DoubleWizardSki\n\n\n## Further Resources\n\n### Nginx reverse-proxy\n\nIf you'd like to run matrix-registration behind a reverse-proxy, here is an example nginx setup:\n\n```nginx\nlocation  ~ ^/(static|register) {\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_pass http://localhost:5000;\n}\n```\n\nIf you'll be using the [web API](https://github.com/ZerataX/matrix-registration/wiki/api), you'll also need to forward that endpoint. More information on reverse proxying [here](https://github.com/ZerataX/matrix-registration/wiki/reverse-proxy#optional)\n\n### Custom registration page\n\nIf you want to write your own registration page, you can take a look at the sample in [resources/example.html](resources/example.html)\n\nThe html page looks for the query paramater `token` and sets the token input field to it's value. this would allow you to directly share links with the token included, e.g.:\n\n`https://homeserver.tld/register.html?token=DoubleWizardSki`\n\nIf you already have a website and want to use your own register page, the [wiki](https://github.com/ZerataX/matrix-registration/wiki/reverse-proxy#advanced) describes a more advanced nginx setup.\n\n\n### bot\n\nif you're looking for a bot to interface with matrix-registration and manage your tokens, take a look at:\n\n[maubot-invite](https://github.com/williamkray/maubot-invite)\n\n\n### Similar projects\n\n  - [matrix-invite](https://gitlab.com/reivilibre/matrix-invite) live at https://librepush.net/matrix/registration/\n  - [matrix-register-bot](https://github.com/krombel/matrix-register-bot) using a bot to review accounts before sending out invite links\n  - [MatrixRegistration](https://gitlab.com/olze/matrixregistration/) similar java project using my webui\n  - [Mother Miounne](https://gitlab.com/etke.cc/miounne) \"A bridge between matrix and external services\", which also integrates matrix-registration\n\nFor more info check the [wiki](https://github.com/ZerataX/matrix-registration/wiki)\n\n### Artwork attribution\n\n- The valley cover photo on the registration page is photo by [Jesús Roncero](https://www.flickr.com/golan)\nused under the terms of [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). No warranties are given.\n- The font used on the registration page is [Nunito](https://fonts.google.com/specimen/Nunito) which is licensed under [SIL Open Font License, Version 1.1](./matrix_registration/static/fonts/NUNITO-LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZerataX%2Fmatrix-registration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZerataX%2Fmatrix-registration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZerataX%2Fmatrix-registration/lists"}