From f04ec6fef968769d16536b4b4528d8ab5adcafde Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sat, 25 Jun 2022 12:00:10 -0700 Subject: [PATCH] README: added installation and configuration Started with the bare minimum instructions needed for getting the bridge installed and running from source. Related to #34 --- README.md | 23 +++++++++++++++++++++++ appservice.yaml-sample | 13 +++++++++++++ config.yaml-sample | 6 +++--- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 appservice.yaml-sample diff --git a/README.md b/README.md index 07b42ef..435f636 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/appservice.yaml-sample b/appservice.yaml-sample new file mode 100644 index 0000000..9a81904 --- /dev/null +++ b/appservice.yaml-sample @@ -0,0 +1,13 @@ +id: "pnut" +url: "http://127.0.0.1:5000" +as_token: "" +hs_token: "" +sender_localpart: pnut +namespaces: + users: + - exclusive: true + regex: "@pnut_.*" + rooms: [] + aliases: + - exclusive: true + regex: "#pnut_.*" diff --git a/config.yaml-sample b/config.yaml-sample index d03d148..922e123 100644 --- a/config.yaml-sample +++ b/config.yaml-sample @@ -4,9 +4,9 @@ MATRIX_URL: 'https://' # public base URL of the matrix server MATRIX_HOST: 'https://localhost:8448' # client URL of the matrix server MATRIX_DOMAIN: '' # domain of the matrix server (right hand side of a matrix ID) MATRIX_AS_ID: '' # matrix ID for the app service user -MATRIX_AS_TOKEN: '' # auth token for the app service user -MATRIX_HS_TOKEN: '' # auth token for the matrix server -MATRIX_PNUT_PREFIX: '' # prefix used for reserving matrix IDs and room aliases +MATRIX_AS_TOKEN: '' # auth token for the app service user +MATRIX_HS_TOKEN: '' # auth token for the matrix server +MATRIX_PNUT_PREFIX: 'pnut_' # prefix used for reserving matrix IDs and room aliases MATRIX_ADMIN_ROOM: '' # Administrator control room ID MATRIX_PNUT_USER: '' # pnut.io username for the matrix bot MATRIX_PNUT_TOKEN: '' # pnut.io auth token for the matrix bot