peertube-plugin-livechat/documentation/prosody.md

77 lines
2.8 KiB
Markdown
Raw Normal View History

2021-06-11 16:32:32 +00:00
# Prosody server controlled by Peertube
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
This is the recommended setup mode for this plugin.
2021-04-16 15:55:48 +00:00
Peertube will launch a [Prosody](https://prosody.im) process, with a custom configuration.
2021-06-11 16:32:32 +00:00
Prosody is a Free and Open Source XMPP/Jabber server software.
With this mode, the Peertube server will be able to communicate with the Prosody server, with following features:
- auto login: if a user is logged in on the Peertube instance, it will be automatically authenticated in the web chat
- access rights: Peertube instance's administrators and moderators will automatically be owner for all created chat rooms.
- access rights: the Peertube's user who has added the video will automatically be moderator on the chat room.
- moderation tools will be enabled
- it will not be possible to create a room that is not linked to a video
- chat room will automatically get some informations from the video (title, ...)
2021-04-16 15:55:48 +00:00
## Prerequisite
2021-06-01 19:21:47 +00:00
### For standard Peertube installations
2021-04-16 15:55:48 +00:00
You have to install [Prosody](https://prosody.im) on your server:
```bash
sudo apt-get install prosody
```
If you are not using prosody for anything else on your server, you can then disabled it:
```bash
sudo systemctl disable prosody && sudo systemctl stop prosody
```
And that's it!
The Prosody process launched by the plugin will listen on a specific port, and only on the localhost interface.
2021-06-11 16:32:32 +00:00
You don't to open any external port on your firewall.
The default local port will be 52800 and can be changed in the plugin settings.
2021-04-16 15:55:48 +00:00
2021-06-01 19:21:47 +00:00
### For Docker installations
In the docker-compose.yml file, replace the peertube service image
`image: chocobozzz/peertube:production-buster` by `image: johnxlivingston/peertubelivechat:production-buster`.
And that's it!
You can find the source for this Dockerfile [here](../docker/Dockerfile.buster).
2021-04-16 15:55:48 +00:00
## Settings
2021-06-11 16:32:32 +00:00
### Chat mode
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
Just select «Prosody server controlled by Peertube» as chat mode.
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
#### Prosody port
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
This is the port that the Prosody server will use. By default it is set to 52800. If you want to use another port, just change the value here.
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
### Chat behaviour
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
These settings are common with other chat modes.
Here is the documentation: [common settings](./common.md).
2021-05-06 11:01:01 +00:00
2021-06-12 01:52:45 +00:00
## Moderation
You can list all existing chatrooms: in the plugin settings screen, there is a button «List rooms».
You can delete old rooms: join the room, and use the menu on the top to destroy the room.
2021-05-06 11:01:01 +00:00
## Notes
All instance moderators and admins will be owner for created chat rooms.
If the video is local (not from a remote Peertube), the video owner will be admin in the chat room.
You can use [ConverseJS moderation commands](https://conversejs.org/docs/html/features.html#moderating-chatrooms) to moderate the room.
2021-06-11 16:32:32 +00:00
When you open the chat room in full screen, there will also be a menu with dedicated commands on the top right.