Matterbridge doc.

This commit is contained in:
John Livingston
2024-05-28 11:59:25 +02:00
parent 85ed5af001
commit 1697a956f1
38 changed files with 5670 additions and 94 deletions

View File

@ -5,41 +5,45 @@ weight: 50
chapter: false
---
The following is based on a tutorial to use Matterbridge with the plugin: <https://gitlab.com/refrac/obs-matterbridge-overlay/-/blob/master/documentation/peertube.md>
The following is based on a tutorial to use Matterbridge with the plugin: [Matterbridge + Peertube](https://gitlab.com/refrac/obs-matterbridge-overlay/-/blob/master/documentation/peertube.md)
## Requirements
- [PeerTube plugin livechat](https://github.com/JohnXLivingston/peertube-plugin-livechat) version 3.2.0 or later.
- [Matterbridge](https://github.com/42wim/matterbridge) version 1.22.4 or later.
The easiest is if the PeerTube instance and Matterbridge run on the same machine.
The easiest is if the PeerTube instance and Matterbridge run on the same server.
## Internal connections only (basic)
You will need to enable the new advanced option added in 3.2.0 for built-in Prosody: **`Enable client to server connections`**.
This will allow localhost XMPP clients to connect to the Prosody server.
You will need to enable `{{% livechat_label prosody_c2s_label %}}` in the livechat plugin settings.
This will allow localhost XMPP clients to connect to the Prosody XMPP server.
You may need to add some line to your `/etc/hosts`:
```
127.0.0.1 anon.example.org room.example.org
127.0.0.1 anon.example.com room.example.com
```
Replace `example.org` by your actual instance domain name. Afterwards you can continue with the Matterbridge configuration below.
Replace `example.com` by your actual instance domain name. Afterwards you can continue with the Matterbridge configuration below.
## Allow external connections (advanced)
By default, the internal Prosody server only listens on localhost (127.0.0.1).
By default, the internal Prosody XMPP server only listens on localhost (127.0.0.1).
On versions later than 10.0.2 a new option call `Client to server network interfaces` was added to allow changing this.
On livechat versions >= 10.1.0 a new option call `Client to server network interfaces` was added to allow changing this.
It allows to add a list of IPs to listen on, coma separated (spaces will be stripped).
It allows to add a list of IPs to listen on, coma separated (spaces will be stripped).
You can also use `*` to listen on all IPv4 interfaces, and `::` for all IPv6. Doing so allows external access to the client to server interface.
Then you need to open and forward the C2S port (by default `5222`) in your firewall so that it can be reached from the internet.
Then you need to open the C2S port (by default `52822`, but check the plugin settings to get the current value) in your firewall so that it can be reached from the internet.
If you don't want to use C2S connections for anything else than your Matterbridge service, you should restrict access to this port to your Matterbridge server IP.
And you need to add DNS records for `anon.example.org` and `room.example.org` to your domain.
You also need to add DNS records (A and AAAA) for `anon.example.com` and `room.example.com` (replace `example.com` by your actual domain name).
In case you are using a port other than `5222` you also need to set the [xmpp-client SRV record](https://prosody.im/doc/dns#srv_records) to the correct port.
In case you are using a port other than `5222` (XMPP standard port) you also need to set the [xmpp-client SRV record](https://prosody.im/doc/dns#srv_records) to the correct port.
## Configurating Matterbridge
@ -50,14 +54,15 @@ So in the TOML config file put:
``` TOML
[xmpp.mypeertube]
Anonymous=true
Server="anon.example.org:5222"
Muc="room.example.org"
Server="anon.example.com:52822"
Muc="room.example.com"
Nick="Matterbridge"
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
NoTLS=true
```
- Replace `example.org` by your actual instance domain name.
- Replace `5222` by the actual port if you changed it.
- Replace `example.com` by your actual instance domain name.
- Replace `52822` by the actual port if you changed it.
- `mypeertube` can be replaced by another name.
- Using `peertube` as the Nick will provide put PeerTube icon for overlay messages, can be also done with overlay config modification.
- The setting `NoTLS=true` allows connecting to a server with self-signed certificates.