From 420b864dcf3dfabfd0b97badacaa6c118dc36087 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 21 Jul 2021 14:38:59 -0400 Subject: xmpp prosody almost done, needs testing --- xmpp.html | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'xmpp.html') diff --git a/xmpp.html b/xmpp.html index f548948..a7affaf 100644 --- a/xmpp.html +++ b/xmpp.html @@ -49,10 +49,10 @@ Find the line that says admins = { } and to this we can specify one

# To add one admin:
-admins = { "chad@landchad.net" }
+admins = { "chad@example.org" }
 
 # We can add more than one by separating them by commas. (This file is written in Lua.)
-admins = { "chad@landchad.net", "chadmin@landchad.net" }
+admins = { "chad@example.org", "chadmin@example.org" }

Note that we have not created these accounts yet, we will do this below. @@ -62,7 +62,7 @@ Note that we have not created these accounts yet, we will do this

Find the line VirtualHost "localhost" and replace localhost with your domain. -In our case, we will have VirtualHost "landchad.net" +In our case, we will have VirtualHost "example.org"

Multi-User Chats

@@ -73,7 +73,8 @@ This is easily enough to enable. In the config file, add the following:

-
Component "chat.landchad.xyz" "muc"
+
Component "chat.example.org" "muc"
+    modules_enabled = { "muc_mam" }
     restrict_room_creation = "admin"

@@ -105,7 +106,7 @@ Find the array beginning with modules_enabled. This includes a list of modules to be used. Add "omemo_all_access"; to that list. -

+Additionally, be sure to change the module pep to pep_simple or this will cause a conflict.

This module is not installed by default, @@ -113,7 +114,7 @@ but you can easily download it by running the following command on the command p to download and install the module to the correct directory.

-
curl -sL https://hg.prosody.im/prosody-modules/raw-file/785389a2d2b3/mod_omemo_all_access/mod_omemo_all_access.lua > /usr/lib/prosody/modules/mod_omemo_all_access.lua
+
curl -sL https://hg.prosody.im/prosody-modules/raw-file/785389a2d2b3/mod_omemo_all_access/mod_omemo_all_access.lua > /usr/lib/prosody/modules/mod_omemo_all_access.lua

Other things to check

@@ -130,22 +131,10 @@ Nowadays, use can use Certbot to generate certificates and use a convenient comm

If you have multi-user chat enabled, be sure to get a certificate for that subdomain as well. -I usually just create a dummy nginx site for each and run it with the --nginx option. -This makes auto-renewal a little easier. +Include the --nginx option assuming you have an Nginx server running.

- - - - - - - - - - - -
certbot --nginx
+
certbot -d chat.example.org --nginx

Once you have the certificates for encryption, run the following to import them into Prosody. @@ -170,7 +159,7 @@ Let's manually create the admin user we prepared for above. Note that you can indeed do this in your XMPP client if you have not disabled registration, but this is how it is done on the command line:

-
prosodyctl adduser chad@landchad.net
+
prosodyctl adduser chad@example.org

This will prompt you to create a password as well.

@@ -181,7 +170,7 @@ Note that you can indeed do this in your XMPP client if you have not disabled re With any system service, use systemctl reload or systemctl restart to make the new settings active:

-
systemctl reload prosody
+
systemctl restart prosody
LandChad.net
Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • -- cgit v1.2.3 From 9d3bf2eeb5c62750ff1a5f15829d707d9a064abc Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 21 Jul 2021 23:00:14 -0400 Subject: xmpp added --- index.html | 2 +- rss.xml | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ xmpp.html | 36 ++++++++++++++ 3 files changed, 192 insertions(+), 1 deletion(-) (limited to 'xmpp.html') diff --git a/index.html b/index.html index d1fdcb8..0568e63 100644 --- a/index.html +++ b/index.html @@ -61,6 +61,7 @@

    "Build your own platform!"

    diff --git a/rss.xml b/rss.xml index 73d1048..7e00287 100644 --- a/rss.xml +++ b/rss.xml @@ -15,6 +15,161 @@ + +XMPP Server (Prosody) +https://landchad.net/xmpp.html +https://landchad.net/xmpp.html +Wed, 21 Jul 2021 22:58:21 -0400 +

    XMPP Server (Prosody)

    + +
    + XMPP Logo and Icon +

    XMPP is a fantastically simple protocol that's usually used as a messenger. + It's highly extensible, + better than IRC, + lighter and more decentralized and Matrix + and Telegram and normie social media can't hold a candle to it. +

    +

    + XMPP is so decentralized and extensible that there are many different XMPP servers. + Here, let's set up an Prosody XMPP server. +

    +

    Installation

    +

    + Prosody is in the Debian repositories, so we can easily install it on our server with the following command: +

    +
    apt install prosody
    +

    Configuration

    +

    +The Prosody configuration file is in /etc/prosody/prosody.cfg.lua. +To set it all up, we will be changing several things. +

    +

    Setting Admins

    +

    +Let's go ahead and set who our admin(s) will be. +Find the line that says admins = { } and to this we can specify one or more server admins. +

    +
    # To add one admin:
    +admins = { "chad@example.org" }
    +# We can add more than one by separating them by commas. (This file is written in Lua.)
    +admins = { "chad@example.org", "chadmin@example.org" }
    +

    +Note that we have not created these accounts yet, we will do this below. +

    +

    Set the Server URL

    +

    +Find the line VirtualHost "localhost" and replace localhost with your domain. +In our case, we will have VirtualHost "example.org" +

    +

    Multi-User Chats

    +

    +Most people will probably want the ability to have chats with more than two users. +This is easily enough to enable. +In the config file, add the following: +

    +
    Component "chat.example.org" "muc"
    +    modules_enabled = { "muc_mam" }
    +    restrict_room_creation = "admin"
    +

    +On the first line, you must have a separate subdomain for your multi-user chats. +I use the chat. subdomain, but some use muc.. +Anything if possible. +

    +

    +The second line is important because it prevents non-admins from creating and squatting rooms on your server. +The only situation where you might not want that is if you indend to open a general public chat system for people you don't know. +

    + +

    End-to-end Encryption

    +

    +Importantly, we'll want end-to-end encryption enabled for user privacy. +

    +

    +Find the array beginning with modules_enabled. +This includes a list of modules to be used. +Add +"omemo_all_access"; to that list. +Additionally, be sure to change the module pep to pep_simple or this will cause a conflict.

    +

    +This module is not installed by default, +but you can easily download it by running the following command on the command prompt +to download and install the module to the correct directory. +

    +
    curl -sL https://hg.prosody.im/prosody-modules/raw-file/785389a2d2b3/mod_omemo_all_access/mod_omemo_all_access.lua > /usr/lib/prosody/modules/mod_omemo_all_access.lua
    +

    Other things to check

    +

    Check the config file for other settings you might want to change. +For example, if you want to run a general public XMPP server, you can allow anyone to create an account by changing allow_registration to true. +

    +

    Certificates

    +

    +Obviously, we want to have client-to-server and server-to-server encryption. +Nowadays, use can use Certbot to generate certificates and use a convenient command below prosodyctl to import them. +

    +

    +If you have multi-user chat enabled, be sure to get a certificate for that subdomain as well. +Include the --nginx option assuming you have an Nginx server running. +

    +
    certbot -d chat.example.org --nginx
    +

    +Once you have the certificates for encryption, run the following to import them into Prosody. +

    +
    prosodyctl --root cert import /etc/letsencrypt/live/
    +

    +Note that you might get an error that a certificate has not been found if your muc subdomain and your main domain share a certificate. +It should still work, this is just notifying you that no specific +

    +

    +For user privacy, we will definitely want to install and enable encryption with OMEMO. +

    +

    Creating users/admins manually

    +

    +Let's manually create the admin user we prepared for above. +Note that you can indeed do this in your XMPP client if you have not disabled registration, but this is how it is done on the command line: +

    +
    prosodyctl adduser chad@example.org
    +

    This will prompt you to create a password as well.

    +

    Make changes active

    +

    +With any system service, use systemctl reload or systemctl restart to make the new settings active: +

    +
    systemctl restart prosody
    +

    Using your Server!

    +

    +Once your server is set up, you just need an XMPP client to use your new and secure chat system. +

    + +

    +Install whichever of these clients you want on your computer or phone and you can log into your new XMPP server with the account you made. +Note that if you enabled public registration, anyone can create an account on your server through one of these clients. +

    +

    Account addresses

    +

    +XMPP account addressed look just like email addresses: username@example.org. +You can message any account on any XMPP server on the internet with that format. +

    +

    Note on MUCs (multi-user chats)

    +

    +Remember that MUCs are kept on a separate subdomain that we created and should've gotten a certificate for above, for example, muc.example.org. +Chatrooms are created and referred to in the following format: #chatroomname@muc.example.org. +

    +
    + +]]>
    +
    + + Setting up RSS Bridge https://landchad.net/rss-bridge.html diff --git a/xmpp.html b/xmpp.html index a7affaf..290523a 100644 --- a/xmpp.html +++ b/xmpp.html @@ -13,6 +13,8 @@
    + XMPP Logo and Icon +

    XMPP is a fantastically simple protocol that's usually used as a messenger. It's highly extensible, better than IRC, @@ -172,6 +174,40 @@ With any system service, use systemctl reload or systemctl re

    systemctl restart prosody
    +

    Using your Server!

    + +

    +Once your server is set up, you just need an XMPP client to use your new and secure chat system. +

    + + + +

    +Install whichever of these clients you want on your computer or phone and you can log into your new XMPP server with the account you made. +Note that if you enabled public registration, anyone can create an account on your server through one of these clients. +

    + +

    Account addresses

    + +

    +XMPP account addressed look just like email addresses: username@example.org. +You can message any account on any XMPP server on the internet with that format. +

    + +

    Note on MUCs (multi-user chats)

    + +

    +Remember that MUCs are kept on a separate subdomain that we created and should've gotten a certificate for above, for example, muc.example.org. +Chatrooms are created and referred to in the following format: #chatroomname@muc.example.org. +

    +
    LandChad.net
    Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • -- cgit v1.2.3 From e8b4d8726b0e21aabe3e48f8e1ef5c8431d51de5 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 22 Jul 2021 09:00:04 -0400 Subject: consistency --- xmpp.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmpp.html') diff --git a/xmpp.html b/xmpp.html index 290523a..64238b0 100644 --- a/xmpp.html +++ b/xmpp.html @@ -204,8 +204,8 @@ You can message any account on any XMPP server on the internet with that format.

    Note on MUCs (multi-user chats)

    -Remember that MUCs are kept on a separate subdomain that we created and should've gotten a certificate for above, for example, muc.example.org. -Chatrooms are created and referred to in the following format: #chatroomname@muc.example.org. +Remember that MUCs are kept on a separate subdomain that we created and should've gotten a certificate for above, for example, chat.example.org. +Chatrooms are created and referred to in the following format: #chatroomname@chat.example.org.

    -- cgit v1.2.3