Fediversity/matrix/draupnir/README.md

64 lines
1.9 KiB
Markdown
Raw Normal View History

---
gitea: none
include_toc: true
---
# Draupnir
Draupnir is the way to do moderation. It can exchange banlists with other
servers, and drop reports that people send into its moderation room so that
moderators can act upon them.
Start by creating a room where moderators can give Draupnir commands. This
room should not be encrypted. Then create a user for Draupnir, this user
should ideally be an admin user.
Once you've created the user, log in as this user, maybe set an avatar, join
the room you've created and then copy the access token. This token is used by
the Draupnir software to login.
After that, close the window or client, but
do not logout. If you logout, the token will be invalidated.
Make sure you have the right npm, Node.js, yarn and what-have-you ([see
Draupnir's documentation](https://the-draupnir-project.github.io/draupnir-documentation/bot/setup_debian))
and prepare the software:
```
mkdir /opt
cd /opt
git clone https://github.com/the-draupnir-project/Draupnir.git
cd Draupnir
git fetch --tags
mkdir datastorage
yarn global add corepack
useradd -m draupnir
chown -R draupnir:draupnir
```
Now, "compile" the stuff as user draupnir:
```
sudo -u draupnir bash -c "install yarn"
sudo -u draupnir bash -c "yarn build"
```
When this is completed successfully, it's time to configure Draupnir.
# Configuration
Under `config` you'll find the default configuration file, `default.yaml`.
Copy it to `production.yaml` and change what you must.
2024-11-29 02:28:03 +01:00
| Option | Value | Meaning |
2024-11-29 02:27:02 +01:00
| :---- | :---- | :---- |
| `homeserverUrl` | `http://localhost:8008` | Where to communicate with Synapse |
| ` rawHomeserverUrl` | `https://vm02199.example.com` | Same as `server_name` |
2024-11-29 02:29:12 +01:00
| `accessToken` | access token | Copy from login session |
| `password` | password | Password for the account |
| `dataPath` | `/opt/Draupnir/datastorage` | Storage |
2024-11-29 02:29:12 +01:00
| `managementRoom` | room ID | Room where moderators command Draupnir |
This should give a working bot.