Update documentation (for prosody tutorial).

This commit is contained in:
John Livingston 2021-03-12 17:25:55 +01:00
parent 2bf8926fa7
commit a6f7793b36
3 changed files with 36 additions and 37 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## v...
* New tutorial to setup [Prosody on the Peertube server](documentation/tutorials/prosody.md)
## v1.0.6 ## v1.0.6
* New icons by [Porrumentzio](https://github.com/Porrumentzio) * New icons by [Porrumentzio](https://github.com/Porrumentzio)

View File

@ -10,14 +10,13 @@ There are multiple way to provide such functionality:
For the first solution, the connection to the XMPP server is made with [converseJS](https://conversejs.org/). For the first solution, the connection to the XMPP server is made with [converseJS](https://conversejs.org/).
You will also find in this repository example config files to setup the XMPP server with [Prosody](https://prosody.im). **Important Note**: If you don't have a running XMPP server, here is a
**[tutorial to install Prosody XMPP Server](documentation/tutorials/prosody.md) on your Peertube instance**. This is the simpliest way to make this plugin work.
If you have new feature requests, bugs, or difficulties to setup the plugin, you can use the [Github issue tracker](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues). If you have new feature requests, bugs, or difficulties to setup the plugin, you can use the [Github issue tracker](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues).
If you are a webdesigner or a ConverseJS/Prosody/XMPP expert, and want to help improve this plugin, you are welcome. If you are a webdesigner or a ConverseJS/Prosody/XMPP expert, and want to help improve this plugin, you are welcome.
**Important note**: a tutorial for a quick setup of Prosody XMPP server on a Peertube instance is coming. It will probably be available by March 11th.
## Contact me ## Contact me
If you have any question, or if you want to talk about this plugin, you can join this XMPP room with any Jabber client: [plugin-livechat-support@room.im.yiny.org](xmpp:plugin-livechat-support@room.im.yiny.org?join). If you have any question, or if you want to talk about this plugin, you can join this XMPP room with any Jabber client: [plugin-livechat-support@room.im.yiny.org](xmpp:plugin-livechat-support@room.im.yiny.org?join).
@ -63,6 +62,10 @@ NB: this feature will probably soon disappear. I planned to add a checkbox in ea
If you have an XMPP server, and don't want to provide a webchat application by yourself, you can use the builtin ConverseJS implementation. If you have an XMPP server, and don't want to provide a webchat application by yourself, you can use the builtin ConverseJS implementation.
If you don't have a running XMPP server, you can use
[this tutorial](documentation/tutorials/prosody.md) to setup Prosody Server
on your Peertube's instance.
You have to fill the following parameters: You have to fill the following parameters:
#### Builtin webchat: XMPP service server (mandatory) #### Builtin webchat: XMPP service server (mandatory)
@ -134,31 +137,18 @@ Please refer to the converseJS documentation.
You can use Prosody for the XMPP backend. You can use Prosody for the XMPP backend.
You can find an example configuration file [here](documentation/examples/prosody/virtualhost.cfg.lua). You can find an example configuration file [here](documentation/examples/prosody/virtualhost.cfg.lua) or use [this tutorial](documentation/tutorials/prosody.md)
to setup Prosody from scratch.
You have to place this file in /etc/prosody/conf.avail/peertube.im.your_domain.cfg.lua and create a symlink:
```cd /etc/prosody/conf.d && ln -s /etc/prosody/conf.avail/peertube.im.your_domain.cfg.lua```
Replace peertube.im.your_domain with the domain you want.
Replace admin@your_xmpp_provider_domain with Jabber ids of users that you want to be admin for your server and public chatrooms. Replace admin@your_xmpp_provider_domain with Jabber ids of users that you want to be admin for your server and public chatrooms.
This users have to be on another domain/virtualhost (which don't use anonymous authentication). This users have to be on another domain/virtualhost (which don't use anonymous authentication).
It can even be on another XMPP server. It can even be on another XMPP server. Or you can add a virtualhost on the
Peertube server's prosody config.
If you have no XMPP account, remove the line (but you will not be able to moderate rooms). If you have no XMPP account, remove the line (but you will not be able to moderate rooms).
There must be a DNS record for that domain. Please refer to the [Prosody documentation](https://prosody.im/doc/) and to
[the tutorial](documentation/tutorials/prosody.md) for other modifications
NB : no need to have a DNS record for room.peertube.im.your_domain. (how to get the ssl certificates, ...).
To create the certificate, you can use certbot with letsencrypt:
```certbot certonly --nginx --emailyour_email -d peertube.im.your_domain```
Then:
```prosodyctl --root cert import /etc/letsencrypt/live/```
Please refer to the [Prosody documentation](https://prosody.im/doc/).
NB : if you have not nginx on your server, please replace by the correct parameter. NB : if you have not nginx on your server, please replace by the correct parameter.
@ -171,7 +161,7 @@ There is an example file [here](documentation/examples/nginx/site.conf).
NB: this example files also serve the static html files with converseJS. NB: this example files also serve the static html files with converseJS.
NB: it is recommanded to change ```Access-Control-Allow-Origin``` to something else that ```"*"```. NB: it is recommanded to change ```Access-Control-Allow-Origin``` to something else that ```"*"``` (your peertubes uri).
## Credits ## Credits

View File

@ -1,26 +1,31 @@
-- these global settings can affect an existing Prosody installation.
-- Use them with care.
-- NB: prosody http will be behind the nginx reverse proxy.
cross_domain_bosh = false; cross_domain_bosh = false;
consider_bosh_secure = true; consider_bosh_secure = true;
cross_domain_websocket = false;
consider_websocket_secure = true; consider_websocket_secure = true;
cross_domain_websocket = true; https_ports = {};
trusted_proxies = { "127.0.0.1", "::1" }
VirtualHost "peertube.im.your_domain" VirtualHost "your_domain"
authentication = "anonymous" authentication = "anonymous"
allow_anonymous_s2s = false allow_anonymous_s2s = false
ssl = { ssl = {
key = "/etc/prosody/certs/peertube.im.your_domain.key"; key = "/etc/prosody/certs/your_domain.key";
certificate = "/etc/prosody/certs/peertube.im.your_domain.crt"; certificate = "/etc/prosody/certs/your_domain.crt";
}
modules_enabled = {
"http";
"bosh";
"ping";
"websocket";
} }
http_host = "peertube.im.your_domain" modules_enabled = {
http_external_url = "http://peertube.im.your_domain" "http";
"bosh";
"ping";
"websocket";
}
http_host = "your_domain"
http_external_url = "http://your_domain"
admins = { "admin@your_xmpp_provider_domain" } admins = { "admin@your_xmpp_provider_domain" }
Component "room.peertube.im.your_domain" "muc" Component "room.your_domain" "muc"
admins = { "admin@your_xmpp_provider_domain" } admins = { "admin@your_xmpp_provider_domain" }
restrict_room_creation = "local" restrict_room_creation = "local"
muc_room_locking = false muc_room_locking = false