From 46a8ff50ef16904e1a5140550a11616c38f6cbcb Mon Sep 17 00:00:00 2001 From: Denshi Date: Tue, 21 Mar 2023 19:58:09 +0400 Subject: Added Dendrite guide, added voice and video calling guide to Prosody, fixed up ejabberd PostgreSQL so it applies to all modules --- content/ejabberd.md | 78 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 33 deletions(-) (limited to 'content/ejabberd.md') diff --git a/content/ejabberd.md b/content/ejabberd.md index b8579cd..c725465 100644 --- a/content/ejabberd.md +++ b/content/ejabberd.md @@ -17,10 +17,26 @@ Ejabberd presumes that you have already created all the **required and optional Depending on the usecase, you may need any or all of the following domains for XMPP functionality: - **example.org** - Your XMPP hostname -- **conference.example.org** - For Multi User Chats (MUCs) -- **upload.example.org** - For file upload support -- **proxy.example.org** - For SOCKS5 proxy support -- **pubsub.example.org** - For publish-subscribe support (A fancier RSS) +- **conference.example.org** - For `mod_muc`, Multi User Chats (MUCs) +- **upload.example.org** - For `mod_http_upload`, file upload support +- **proxy.example.org** - For `mod_proxy65`, SOCKS5 proxy support +- **pubsub.example.org** - For `mod_pubsub`, publish-subscribe support (A fancier RSS) + +Only the **example.org** domain is required for basic, private chat usage. +If you do **not** wish to use a certain domain, just disable it's associated module and ejabberd won't complain when it can't find it's associated certificate. +For example, if you don't want [Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html) support, just comment out the `mod_pubsub` config in `/etc/ejabberd.yml`: + +```yml +## mod_pubsub: +## access_createnode: pubsub_createnode +## plugins: +## - flat +## - pep +## force_node_config: +## ## Avoid buggy clients to make their bookmarks public +## storage:bookmarks: +## access_model: whitelist +``` This guide will assume **all these subdomains** have been created. @@ -213,16 +229,37 @@ sql_server: "localhost" sql_database: "{{}}ejabberd{{}}" sql_username: "{{}}ejabberd{{}}" sql_password: "{{}}psql_password{{}}" + +default_db: sql ``` +That line at the end sets **every module's database** to default to the `sql` backend. This includes the `mod_mam` module, so all our data is being stored with PostgreSQL. + +### Voice and Video Calls -Once you've ensured your database name, username and password are all correct, enable SQL storage for `mod_mam`: +Ejabberd supports the **TURN** and **STUN** protocols to allow internet users behind NATs to perform voice and video calls with other XMPP users. **This is enabled by default using [ejabberd_stun](https://docs.ejabberd.im/admin/configuration/listen#ejabberd-stun-1).** + +**However,** if you plan on running ejabberd alongside **other applications** that require TURN and STUN, such as Matrix, then you'll have to setup your own external TURN server using Coturn. + +#### Setup with Coturn and `mod_stun_disco` + +Firstly, setup a TURN and STUN server with [Coturn,](/coturn) using an **authentication secret.** + +Then, edit `mod_stun_disco` to contain the appropriate information for +your turnserver: ```yml -mod_mam: - ## (Other parameters above) - db_type: sql + mod_stun_disco: + secret: "{{}}your_auth_secret{{}}" + services: + - + host: {{}}turn.example.org{{}} + type: stun + - + host: {{}}turn.example.org{{}} + type: turn ``` + ## Using ejabberd ### Registering the Admin User @@ -252,31 +289,6 @@ your ejabberd server from this web interface: {{< img src="/pix/ejabberd-admin.webp" >}} -## TURN & STUN for Calls - -Ejabberd supports the **TURN** and **STUN** protocols to allow internet users behind NATs to perform voice and video calls with other XMPP users. **This is enabled by default using [ejabberd_stun](https://docs.ejabberd.im/admin/configuration/listen#ejabberd-stun-1).** - -**However,** if you plan on running ejabberd alongside **other applications** that require TURN and STUN, such as Matrix, then you'll have to setup your own external TURN server using Coturn. - -### Setup with Coturn and `mod_stun_disco` - -Firstly, setup a TURN and STUN server with [Coturn,](/coturn) using an **authentication secret.** - -Then, edit `mod_stun_disco` to contain the appropriate information for -your turnserver: - -```yml - mod_stun_disco: - secret: "{{}}your_auth_secret{{}}" - services: - - - host: {{}}turn.example.org{{}} - type: stun - - - host: {{}}turn.example.org{{}} - type: turn -``` - ## Further Configuration For a deeper look into all the modules and options, have a look at the following ejabberd documentation: -- cgit v1.2.3