30-minute Practical Linux Project: XMPP Chat Server Setup, Start to Finish

30-minute Practical Linux Project: XMPP Chat Server Setup, Start to Finish

Table of contents is in the description.
This is a 30-minute course that covers setting up an XMPP (jabber) chat server, for chatting with friends. For even more fun, consider allowing open registration, and meet interesting new people!

What’s XMPP/Jabber? If you’re old: it’s like IRC or AOL Instant Messenger. If you’re young: it’s like real-time twitter, with no character limits!

Requirements: an Internet-accessible server (with an Internet-routable IP address). A $5 VPS from or is just fine (referral code in the link).

Intro: 0:00
Requirements: 1:40
Why Prosody: 2:00
Step-by-step Overview: 3:04
SSH into server, install software 3:35
Service management with systemctl: 5:10
Checking open ports on our server: 5:21
Edit main prosody configuration file: 6:00
Configure virtual host: 6:35
Set up a multi-user chat room: 8:25
Run an open server (allow registration): 10:38
Troubleshooting: 12:48
Generate TLS certificates: 13:28
The prosodyctl command: 14:26
Adding prosody/xmpp users on the command-line: 14:50
DNS settings: 16:39
Install pidgin (jabber/xmpp chat client): 22:24
Set up a jabber account on pidgin: 22:32
Creating and joining multi-user chat rooms: 24:38
Prosody Modules: 26:40
Recommended Modules for running a public server: 27:32

DNS Records:
TXT: _xmppconnect _xmpp-client-xbosh=

SRV1: _xmpp-server _tcp 5269 xmpp.yourdomain.com.
SRV2: _xmpp-client _tcp 5222 xmpp.yourdomain.com.


This video was helped along by my Patreon supporters at

Full Linux Sysadmin Basics Playlist:

Check out my project-based Linux System Administration course (free sample videos):

Official Site:

28 thoughts on “30-minute Practical Linux Project: XMPP Chat Server Setup, Start to Finish

  1. Doni have to create an A record for myipadress without xmpp. So for example an A record for tutoriallinux.com as well as an A record for xmpp.tutoriallinux.com ?? When i type in my user for say [email protected] without forst A record it wont know where to point will it????

  2. Thanks for the video i couldnt get it to work the cfg.lua has slightly changed too i kept getting certificate errors on conference and domain. Ill get there eventually. Thanks.

  3. Thanks a lot man! Watched this video, then went on to use astra chat with ejabbard…. and then it worked in the very first attempt.
    I used an ejabbard docker image with astra client on my mac.

    Need to mock these command line utilities on a node server for the client, sucks

  4. Thanks for this tutorial. It's the clearest explanation I have found so far. I have a question: why does the DNS SRV port number change to 443 when saved, at this point in the video? https://youtu.be/-0M0NeZ_cU4?t=1203

  5. Great to watch this video and learn little tips along the way! For example, at https://youtu.be/-0M0NeZ_cU4?t=960 I learned that prefixing a space removes the command from shell history! Excellent, thank you for such an engaging video

  6. Thank you for this great tutorial! I am wondering if the DNS configuration you detailed will be the same for other XMPP servers, like Ejabberd. Thanks!

  7. curious: waiting for my DNS foo to propagate, I notice you entered tutorialinux.com and not xmpp.tutorialinux.com configuring pidgin.

    edit: totally explained at https://prosody.im/doc/dns
    then check here https://kingant.net/check_xmpp_dns/

  8. Would there be a significant difference in these steps if I were using a free DDNS service to point to a server in my home, so my domain would be something more like chatroom.duckdns.org

    I can register several of these for free, if I need multiple prefixes on the urls. Would I just use duckdns.org as my domain, then register the specific urls I need and point them to my server?

  9. Gday . Do you happen to have a video on explaining how to secure a VPS server when you run a website server + XMPP server off a rented vps box ?

  10. problems making Certificate Request
    139977419859616:error:0D07A097:asn1 encoding routines:ASN1_mbstring_ncopy:string too long:a_mbstr.c:154:maxsize=2
    There was a problem, see OpenSSL output

    +tutorialLinux, I am experiencing this error while generating certificate, could you please let me know what can be done ?

  11. I have a question about OTR. When i enabled it i cant write anything in chatrooms, my text wont show same for other people. Does the OTR module require that you download the otr plugin for pidgin or should it work from prosody?

  12. There's generally a way to see if the dns changes have been propagated. What's the command that you suggest? Also, I'm not being prompted to accept the self signed certificate. Further, I'm getting the "unknown host" message. Any thoughts on that? Oh, and for those self hosting with a router/firewall you might want to point out that port forwarding needs to be done. I don't use services like digital ocean as I self host everything. I've created the NAT port forwarding in my pfsense router.

    EDIT: As far as the "unknown host" and the failure to receive a certificate this was resolved by actually enabling the virtual host. I guess I missed that part.

  13. Since you're always giving us tips, figured I'd share one with you: at 7:17 you could use ci" and it will remove everything between the quotes and put you in insert mode.

  14. Hi Dave, Thanks for the awesome video. I just have one question: I am on linux running Pigdin. When I am following you from 22:38, my buddy list says: "You require encryption, but it is not available on this server." I tried googling it but now luck. Can you help me?

Leave a Reply

Your email address will not be published. Required fields are marked *