README: added installation and configuration

Started with the bare minimum instructions needed for getting the bridge
installed and running from source. Related to #34
This commit is contained in:
Morgan McMillian 2022-06-25 12:00:10 -07:00
parent 904140320d
commit f04ec6fef9
3 changed files with 39 additions and 3 deletions

View file

@ -12,6 +12,26 @@ The public bridge is once again online!
See [Using-the-public-bridge](https://gitlab.com/thrrgilag/pnut-matrix/-/wikis/Using-the-public-bridge) for details.
## Installation
Currently pnut-matrix has been only tested with and confirmed to work with [synapse]. Please refer to the [synapse installation instructions] for details on how to setup your homeserver.
To install the latest version of pnut-matrix from source:
```sh
git clone https://gitlab.com/thrrgilag/pnut-matrix.git
cd pnut-matrix
python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt
```
## Configuration
Copy `config.yaml-sample` to `config.yaml` and edit for your setup. Likewise copy `appservice.yaml-sample` to `appservice.yaml` and edit to match the tokens, prefix, and port listed in `config.yaml`. This is the configuration that synapse will need to reference so that it can connect the bridge. Make sure you modify your [syanpse configuration] accordingly.
## Contributing and support
You can open issues for bugs or feature requests and you can submit merge requests to this project on [GitLab]. You can also submit issues and patches to the [mailing list] or directly to [morgan@mcmillian.dev].
@ -26,6 +46,9 @@ Join my public chat room for development discussion.
GPLv3, see [LICENSE].
[synapse]: https://github.com/matrix-org/synapse
[synapse installation instructions]: https://matrix-org.github.io/synapse/latest/setup/installation.html
[syanpse configuration]: https://matrix-org.github.io/synapse/latest/application_services.html
[GitLab]: https://gitlab.com/thrrgilag/pnut-matrix/
[mailing list]: https://lists.sr.ht/~thrrgilag/pnut-matrix
[morgan@mcmillian.dev]: mailto:morgan@mcmillian.dev

13
appservice.yaml-sample Normal file
View file

@ -0,0 +1,13 @@
id: "pnut"
url: "http://127.0.0.1:5000"
as_token: "<AS_AUTH_TOKEN>"
hs_token: "<HS_AUTH_TOKEN>"
sender_localpart: pnut
namespaces:
users:
- exclusive: true
regex: "@pnut_.*"
rooms: []
aliases:
- exclusive: true
regex: "#pnut_.*"

View file

@ -4,9 +4,9 @@ MATRIX_URL: 'https://<DOMAIN_NAME>' # public base URL of the matrix server
MATRIX_HOST: 'https://localhost:8448' # client URL of the matrix server
MATRIX_DOMAIN: '<DOMAIN_NAME>' # domain of the matrix server (right hand side of a matrix ID)
MATRIX_AS_ID: '<MATRIX_ID>' # matrix ID for the app service user
MATRIX_AS_TOKEN: '<AUTH_TOKEN>' # auth token for the app service user
MATRIX_HS_TOKEN: '<AUTH_TOKEN>' # auth token for the matrix server
MATRIX_PNUT_PREFIX: '<APP_SERVICE_PREFIX>' # prefix used for reserving matrix IDs and room aliases
MATRIX_AS_TOKEN: '<AS_AUTH_TOKEN>' # auth token for the app service user
MATRIX_HS_TOKEN: '<HS_AUTH_TOKEN>' # auth token for the matrix server
MATRIX_PNUT_PREFIX: 'pnut_' # prefix used for reserving matrix IDs and room aliases
MATRIX_ADMIN_ROOM: '<ROOM ID>' # Administrator control room ID
MATRIX_PNUT_USER: '<USERNAME>' # pnut.io username for the matrix bot
MATRIX_PNUT_TOKEN: '<AUTH_TOKEN>' # pnut.io auth token for the matrix bot