Matrix: Difference between revisions
No edit summary |
→Discord: fix |
||
| (20 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
We are currently setting up a test server for Matrix. If everything goes well, we will set up a production Matrix server. |
We are currently setting up a test server for Matrix. We use Synapse. If everything goes well, we will set up a production Matrix server. |
||
== Server Setup == |
== Server Setup == |
||
We are currently running Matrix on a Proxmox |
We are currently running Matrix on a Proxmox LXE container on <code>citric-acid</code>. Ask Siracha for the credentials to access Proxmox and the VM. |
||
== Matrix |
== Matrix Installation == |
||
We are using NixOS, so the config to setup both Synapse and PostgreSQL is hosted at https://git.csclub.uwaterloo.ca/k95ma/matrix-nixos/. |
|||
The reverse proxy, Caddy is configured on citric-acid. |
|||
== Testing == |
|||
Go to https://app.cinny.in/login/csclub.uwaterloo.ca, and click "Continue with CSC". |
|||
== Bridging == |
|||
We are currently running mautrix-discord. Bridge to IRC via heisenbridge may be added in the future. |
|||
=== Discord === |
|||
{{code|@beefbot:csclub.uwaterloo.ca}} is a Matrix account that is used to configure the actual mautrix-discord. It is logged into mautrix-discord via login-token bot (token saved, if it expires, login to CSC Exec and reset it). The login password of beefbot (the matrix account) is stored in the CSC vault on [[Vaultwarden]]. |
|||
{{code|Matrix Bridge#7477}} is the Discord bot that reads the messages on Discord and sends them to Matrix via puppeting. It needs read access to the channels for the Discord -> Matrix part to work properly. |
|||
* Create the Matrix channel to bridge to |
|||
* Invite {{code|@discordbot:csclub.uwaterloo.ca}} to the channel |
|||
* Invite the Discord bot to the bridged server using {{code|1=https://discord.com/oauth2/authorize?client_id=...&permissions=309774583872&scope=bot}}. client_id is found by logging in to the CSC Exec account on Discord and going to developer portal to find the ID of the Matrix Bridge bot. |
|||
* Login to User {{code|beefbot}} (password in VaultWarden, idk if there is a better place to put it) on our matrix instance |
|||
* ''Inside'' the matrix channel, send, {{code|!discord bridge <channel ID>}} (the channel ID on Discord, the Discord bot must be able to see that channel) |
|||
* Create a Discord Webhook URL for that channel on Discord's side, and then DM the discord bot (via beefbot on matrix) with {{code|!discord set-relay !26DmcJd3cQ...:csclub.uwaterloo.ca --url https://discord.com/...}} with the first argument replaced by the actual room identifier and the second parameter the webhook URL. |
|||
Latest revision as of 18:38, 12 August 2026
We are currently setting up a test server for Matrix. We use Synapse. If everything goes well, we will set up a production Matrix server.
Server Setup
We are currently running Matrix on a Proxmox LXE container on citric-acid. Ask Siracha for the credentials to access Proxmox and the VM.
Matrix Installation
We are using NixOS, so the config to setup both Synapse and PostgreSQL is hosted at https://git.csclub.uwaterloo.ca/k95ma/matrix-nixos/.
The reverse proxy, Caddy is configured on citric-acid.
Testing
Go to https://app.cinny.in/login/csclub.uwaterloo.ca, and click "Continue with CSC".
Bridging
We are currently running mautrix-discord. Bridge to IRC via heisenbridge may be added in the future.
Discord
@beefbot:csclub.uwaterloo.ca is a Matrix account that is used to configure the actual mautrix-discord. It is logged into mautrix-discord via login-token bot (token saved, if it expires, login to CSC Exec and reset it). The login password of beefbot (the matrix account) is stored in the CSC vault on Vaultwarden.
Matrix Bridge#7477 is the Discord bot that reads the messages on Discord and sends them to Matrix via puppeting. It needs read access to the channels for the Discord -> Matrix part to work properly.
- Create the Matrix channel to bridge to
- Invite
@discordbot:csclub.uwaterloo.cato the channel - Invite the Discord bot to the bridged server using
https://discord.com/oauth2/authorize?client_id=...&permissions=309774583872&scope=bot. client_id is found by logging in to the CSC Exec account on Discord and going to developer portal to find the ID of the Matrix Bridge bot. - Login to User
beefbot(password in VaultWarden, idk if there is a better place to put it) on our matrix instance - Inside the matrix channel, send,
!discord bridge <channel ID>(the channel ID on Discord, the Discord bot must be able to see that channel) - Create a Discord Webhook URL for that channel on Discord's side, and then DM the discord bot (via beefbot on matrix) with
!discord set-relay !26DmcJd3cQ...:csclub.uwaterloo.ca --url https://discord.com/...with the first argument replaced by the actual room identifier and the second parameter the webhook URL.