8 ms·
Modern messaging: Running your own XMPP server
- mindcrime 1y agoGood stuff. I run my own ejabberd server and it's been great. Installation is relatively straightforward, configuration isn't terribly convoluted, and it "just works" once up and running. Now my server doesn't have a ton of load on it, as it's used mainly for development / experimental purposes at the moment, so I can't say much about it's scalability or anything. But generally speaking, I installed it, did the initial setup, and other than adding/modifying users, I've rarely had to think about it since.
- codedge 1y agoThanks! Same for me, it just works. Even regular updates run smoothly with ejabberd. I also do audio calls with it, and it is just a pleasant experience.
- endre 1y agothe only problem, as usual, is the network effect
- tcfhgj 1y agowhat about - single point of failure of rooms (server creating the chat room) - media access via 3rd party servers - gossiping encrypted message access across multiple devices - encrypted audio-visual (group) communication - good clients for iOS - reliable server-side storage of messages (of all(!) chats) - realistic verification concept for e2ee with multiple devices
- AJ007 1y agoNot my project, but I was hoping to see more stuff like https://prose.org/ https://prose.org/ As others have pointed out, for iOS Monal is good.
- rglullis 1y ago> for iOS Monal is good. Monal looks like something that would be good in 2005, not 2025. There is no way you'll convince people nowadays to use it unless you force them to.
- netsharc 1y agoMaybe for friends and family? But then, if their phone might be compromised by the state... And telling friends and family they need to setup a Jabber connection to talk you will make you "That guy/girl who...". And if the idea spreads, then talking to n people requires n accounts on n servers. At least Pidgin (last time I used it, which was last decade) supports such a configuration. I wonder if the mobile apps can do the same.
- tcfhgj 1y ago> And if the idea spreads, then talking to n people requires n accounts on n servers. No, it doesn't. XMPP is like E-Mail and Matrix a protocol which supports federation, i.e. a protocol which specifies how many service providers can cooperate, specifically forward messages to other service providers to reach their users.
- deleted 1y ago[deleted]
- sroerick 1y agoI couldn't get iOS notifications to work properly when I tried to set up ejabberd. Ended up using Hey, and it works pretty well, I guess, but a rails PWA is a little heavy duty for my taste, I would prefer XMPP
- codedge 1y agoI cannot say, that I have problems with it. I use monal on iOS and whenever someone mentions me, I get a notification.
- Semaphor 1y agoI’ve been running Prosody [0] for many years now. Don’t ask me why I chose it over another server. I used to have a jabber.org account that I used before that, already back when I could use jabber to communicate with gchat and facebook messenger users. Alas, nowadays, it’s just my wife I use it to communicate with :( [0]: https://prosody.im/ https://prosody.im/
- jauntywundrkind 1y agoProsody is sweet. I forget why I switched over from ejabberd, but it it was quite reliable and had such a huge breadth of extensions it supported. Ejabberd has been intimidating to setup but really wasn't hard, but Prosody was a snap.
- vlttnv 1y agoProsody was a breeze to set up and it worked pretty well for me. I set up a simple bot to get notifications on my phone. The whole set up works great until you get to the notifications. Super unreliable. I believe that's an issue of the iOS client I am using.
- netdur 1y agoAny idea what kind of server we’d need to handle 40M users if it’s just text chat (no files or audio)?
- reactordev 1y agoIf you’re running a single machine, you’ll be limited by the number of available ports. It’s a TCP limitation and nothing to do with XMPP. You’d need a cluster of XMPP servers to handle 40M users. Even for just text. Port limits are port limits.
- VladVladikoff 1y ago40M users don’t all simultaneously send messages, or does XMPP need to sustain an open connection to each user?
- wild_egg 1y agoYou're thinking of outbound port limits. Inbound connections all come in on the same port and there's no port-related limits there. The real limits are going to be on hardware. If we want 40M concurrent connections, the server will need a few hundred to a few thousand gigabytes of memory.
- reactordev 1y agoUnless you're doing multicast or anycast, there's a port bound IP handshake that happens. You have your listener (your server port) and the connected TCP/IP client (client port, on the server machine). You're limited to 64533 clients (0-65535 but the first 1000 are reserved). If there's a way to get more client on a single machine, I'm all ears - but that's baked into IP protocol. TCP/UDP doesn't matter. It's a limitation of IP. Assume 10% of 40M users are active at once. That's 4M clients to deal with. You would need 62 servers (and probably a few for cache) to handle the load. But those could be small core cheap servers.
- pkulak 1y agoLast time I tried this I couldn’t even find an iOS client that supported reactions. Hate on the complexity of Matrix all you like, but at least when you ask your family to use it, they get a modern experience and don’t feel like they’re giving up everything vs every other messenger they are used to.
- bogwog 1y agoI recently tried to move people over, and the iOS situation is bleak. It seems like notifications don't work at all in any app, which is a big problem for chat. Also, one of them (I think Siskin?) doesn't display sender name/avatar in group chats, so you can't tell who sent what. There's also some weird behavior with how E2EE works, which is causing me problems in group chats. Initially it worked, but now people are unable to read some messages with errors like "this message was not encrypted for this device" FWIW, everything works great on Android with the Conversations app, and also I admit I haven't really RTFM'd too much so it may be my fault as a lazy admin. Edit: this is with ejabberd btw
- fishgoesblub 1y agoMonal works great on iOS in my families experience. They've never missed a notification and E2EE (OMEMO) never failed. We are using the conversations.im server however.
- morshu9001 1y agoMy experience with XMPP server hosting is that the defaults are not what you actually want, and many bare minimum features (not even talking about reactions) are bolted on.
- nicoco 1y agoFor (repliable) notifications on iOS, you need mod_cloud_notify server-side.
- ccakes 1y agoI’m using Monal and it’s decent. Agree reactions are a big thing missing, but notifications etc have been flawless which was a harder requirement for me
- zenmac 1y agoOne potential issue with XMPP is the default port is commonly blocked on public wifi. There is an nginx-xmpp to proxy it, but it is archived. https://github.com/robn/nginx-xmpp https://github.com/robn/nginx-xmpp For that reason http based protocol just seems much easier on the network or something that can be easily reverse proxied without extensions will be easier to self-host and have wilder internet connection accessibility.
- Calzifer 1y agoAt least Prosody implements BOSH (xmpp over http) and communication over Websocket. https://prosody.im/doc/setting_up_bosh https://prosody.im/doc/setting_up_bosh https://prosody.im/doc/modules/mod_websocket https://prosody.im/doc/modules/mod_websocket But I never tried it myself and from a quick search the popular non-browser XMPP apps/clients don't seem to use it.
- deleted 1y ago[deleted]
- tcfhgj 1y agowith chat control on the horizon, they should probably consider implementing it
- someodd 1y agoI actually enabled BOSH on my Prosody setup. For reference: https://www.someodd.zip/phlog-mirror/xmpp-server.gopher https://www.someodd.zip/phlog-mirror/xmpp-server.gopher BOSH still has some interesting trade-offs even today. It can help with some NAT headaches and rides over plain HTTPS. I like this old post: https://metajack.im/2008/07/02/xmpp-is-better-with-bosh/ https://metajack.im/2008/07/02/xmpp-is-better-with-bosh/ Curious who here uses BOSH in production and/or WebSocket (RFC 7395) these days.
- wink 1y agoNot for 13ish years but we built the chat feature in a social networking platform with BOSH. Looked just like FB Messenger, really. The thing never took off, so I don't remember any talks about outside federation, I think it was not on by default.
- exe34 1y agoDoes anyone use ejabberd inside a wireguard network? I'm hoping to set it up on the main server, and connect to it with aTalk on Android - but I'm worried ssl is going to be a pain if it's not exposed with a proper domain name. I don't know if aTalk will accept a self-signed certificate (or even better, just use non-ssl with an address and port without a domain name)?
- MattJ100 1y agoejabberd should work fine, it won't care. But you're right - whether apps will allow you to accept self-signed certificates can vary. Some are strict and don't allow bypass, others may just issue a warning prompt that you can dismiss. I haven't personally tried aTalk.
- eddieroger 1y agoI was thinking of setting something like this up on a Tailscale network, and figured I'd just get real certs for the servers in question using DNS challenges, which I've been able to do with my tailnet (driven by Headscale) for a while now. But even if not, if your root cert is in your device's trust store, then an app would have to go out of its way to only trust well known CAs.
- bogwog 1y agoI have this setup, but I haven't tried using a self signed cert. I just have a public domain with the DNS pointing to the ejabberd internal IP. Setting up LetsEncrypt with DNS auth isn't that difficult, and I'm using Digital Ocean for their free DNS API to automate renewals. Although the big issue with this is that clients need to have wireguard enabled at all times, otherwise they can't even receive notifications. It's kind of a PITA for non techies to understand, and also kind of a PITA for techies who may already be using wireguard for something else, as Android/iOS don't let you have multiple VPNs active at once. It may be better to expose my ejabberd service to the internet directly. Even if it gets hacked, messages are E2EE at least.
- tracker1 1y agoYou should be able to use a DNS provisioning through Let's Encrypt assuming you're on a supported host for your DNS based provisioning. Traefik may even have an easy button option depending on your configuration.
- Weetile 1y agoIf you plan to communicate with people not in the techsphere, Signal is probably the best bet to convince people to switch to.
- zaik 1y agoSignal is a walled garden and might even leave the EU soon. Of course if that happens, XMPP clients will also be harder to get, but at least I will always have full control over my XMPP server.
- ekianjo 1y agoSignal is not even private since it requires a phone number
- panja 1y agoIts still private, just not anonymous
- unsolved73 1y agoFor TLS I would recommend https://github.com/pingooio/pingoo https://github.com/pingooio/pingoo instead which has automatic certificate management and is really easy to setup.
- dtj1123 1y agoAlthough material like this is extremely important, instructions like 'Fill in the IPv6 addresses accordingly.' are a roadblock to anyone who isn't particularly knowledgeable about networking. You could argue that those people should go away and learn, but not everyone has the time or frankly the ability to do so.
- jiggunjer 1y agoI've forgotten how much hassle installing applications can be since docker.
- MattJ100 1y agoHere are the official docs for deploying ejabberd using containers: https://docs.ejabberd.im/CONTAINER/ https://docs.ejabberd.im/CONTAINER/
- tracker1 1y agoPart of my thoughts... though if you're familiar with Ansible, the automation isn't so bad in that ecosystem. I mostly run my personal stuff single instance, so deploying /apps/app-name/docker-compose.yaml is my general approach to most things along with either Caddy or Traefik.
- qwertox 1y agoI'm running ejabberd in my home network and together with Conversations (Android app) it is my solution to have all devices report their status to my phones, tablets and pc. Easy to upgrade (when used with Docker), never complains. It's a bit the same feeling like RabbitMQ, which I'm no longer using that much, but I also always thought that it is a reliable software. I've wondered if it is related to them being written in Erlang.
- aftergibson 1y agoIf you're looking for something that's a little less hassle and has some very sane defaults, try https://snikket.org/ https://snikket.org/
- junto 1y agoHas anyone done a security review of their source code?
- guiraldelli 1y agoIt is simply Prosody + Conversations + Siskin [1], so I'd say that many people have had their eyes on their code. Specific security audits would have to be searched for, though. [1]: https://snikket.org/open-source/ https://snikket.org/open-source/
- emptysongglass 1y agoThey're really lagging on their mobile client updates.
- SJk7TAy 1y agoYou can use upstream apps instead of their forks, as I do. Zero problems.
- zaggynl 1y agoI'm missing the actual self hosted guide where I can use my own hardware instead of a VPS.
- aftergibson 1y agoCan't you install docker compose on your own hardware and follow this? https://snikket.org/service/quickstart/ https://snikket.org/service/quickstart/
- docsaintly 1y agoFor people who want an easier approach, both NethServer and Cloudron have this packaged as an app for people who self host. The Cloudron one is not official yet and is a community developed one.
- fishgoesblub 1y agoI love XMPP. I've never missed a notification with it and I wished I switched back to it sooner rather than sticking with Matrix, I do wish it gets more love these days. I've been tempted to make my own desktop client and integrate VoIP with something like Mumble to achieve a Discord like experience with voice channels, but that's way beyond my pay grade.
- nicoco 1y agoMovim and Dino do multi-party jingle, aka voice and video group calls. Maybe you can contribute to improving it ;)
- deleted 1y ago[deleted]
- fishgoesblub 1y agoJingle is P2P with an optional server middleman for firewalled connections only no? I haven't seen any support for actually hosting a voice server with XMPP, only just allowing clients to figure it out themselves. I'll give it a look either way.
- goffi 1y agoIndeed, Jingle is for establishing connections, P2P when possible, but there are lot of extensions around it. I've proposed a specification for SFU hosting (check https://bloggeek.me/webrtcglossary/sfu/ https://bloggeek.me/webrtcglossary/sfu/ if you don't know what's a SFU), and wrote a component based on the excellent Galène SFU, as well as client implementation (in Libervia) as part of a NLNet/NGI grant (https://nlnet.nl/project/Libervia-AV/ https://nlnet.nl/project/Libervia-AV/). XMPP council (disclaimer: I'm a council member for the current term) asked me to some modifications and to re-propose, which I'm about to do. I couldn't find the time so far (cause I'm working on ton on stuffs), but will go back to it very soon. To sum-up: this is very much worked on.
- goffi 1y agoAnd Libervia (disclaimer: I'm the lead dev). It also implements SFU including components (based on Galène), but I'm reworking design on this part. Also note that Libervia is using a backend/frontends architecture with a D-Bus API, you can use it to make your own frontend with any language you like.
- goatmeal 1y agoyunohost installations include the metronome XMPP service enabled out of the box. it's similar to prosody
- BinaryIgor 1y ago"Since 3 years the European Commission works on a plan to automatically monitor all chat, email and messenger conversations.12 If this is going to pass, and I strongly hope it will not, the European Union is moving into a direction we know from states suppressing freedom of speech." If this come to pass, there will be two approaches: 1. People will not share anything important online, only in person 2. Every friends group will have a more technical guy/girl who will ran chat infrastructure for them Interesting article though :)
- fermuch 1y ago3. Normal people accept surveillance and techies are tracked down / silenced. Given our current surveillance state with social networks, I don't see (1) or (2) as real options.
- BinaryIgor 1y agoI hope not; I hope there is a culture change; but, hope is not a strategy so it's better to build alternative tools and learn how to use them
- pessimizer 1y agoEjabberd has been around since forever, and people have been saying that forever. Why would it suddenly happen now? One thing I do agree with is that collaboration tools have to come first. We've become unable to do anything without a company/boss, completely atomized. Three or four programmers/designers who hang out should be able to do anything together. Put them in a downtown office with some MBA prick alternately yelling at them and kissing their asses, and they can build empires that they get to share 5% of.
- AuthAuth 1y agoYeah that made me laugh, aint no way average people are going to care. They already assume things are maximally bad. They assume things aree completely public and still choose to overshare. They are past the point in caring and I dont blame them, its near impossible to actually take serious without going down a schizo rabbit hole.
- jacooper 1y agoI'm sorry but there's no way you can call xmpp modern messaging. Matrix with all of its shortcomings looks like 2050 compared to xmpp. Xmpp doesn't even have any half-decent mobile client!
- emptysongglass 1y agoConversations is fantastic, not sure what you're on about.
- codr7 1y agoAs much as I like the idea of XMPP, I don't have good experiences from interacting with it. Neither clients nor protocol/server level. I've written multiple parsers along the way, back in the days when there was nothing else and more recently for use in very constrained embedded contexts. I don't know how much has changed, but it was more complicated than I would have wished, seemingly designed more to check theoretical boxes than for ease of use. I was also part of a project where the backend was implemented as a bunch of services communicating via XMPP, custom server etc. And it was a total mess, we spent a lot of time on manual intervention just making sure messages weren't dropped. Is this a common experience with XMPP or did I just hit all lemons?
- nicoco 1y agoI have been running a family and friends XMPP server on a cheap VPS for almost 10 years and the only downtime we had was when the datacenter burned down (OVH, true story).
- ekianjo 1y agoThe problem is not the server. The clients all suck.
- fho 1y agoI still remember when Google (and Facebook?) used XMPP for their chat functions. You could log into any XMPP client and chat with people using Google infrastructure. Good times, I feel old now.
- vlttnv 1y agoYeah I used to use Pidgin to chat with people on Facebook! I miss those days.
- morshu9001 1y agoYeah, I had iChat logged into 4 different things, one of them being AIM.
- kuon 1y agoXMPP has very nice server implementations, and the protocol is OK regarding complexity. But the clients are lacking. On linux there is gajim that is "okish" but it lacks calling capacity with mobile clients. On mobile there is conversation and derivatives on android which are "nearly there" and monad on iOS. Globally, the main lacking features are: - voice and video calls cross platform - gif integration, tenor/giphy/imgur... - fast sync (if you open gajim after being offline for a week, it takes ages to catch up)
- rolandog 1y agoI kind of view the lack of gifs as something positive? Like, it forces one to use actual words and think out a response. Plus, you're not leaking all the tracking associated with those widgets. However, I understand that people have come to expect having fun experiences in their IM clients, and that usually requires reacting with animated GIFs.
- kuon 1y agoI agree but it's a required feature for many people.
- vthriller 1y ago> On linux there is gajim that is "okish" In my book it only got worse. Way worse. Sure, it looks more familiar to those who is used to iMessage/Whatsapp/Telegram, but I bet it would still look quite alienating for that audience. And for those who remember Gajim 1.x, disastrous UX doesn't outweigh introduction of reactions, history syncing and whatnot. Last time I checked it a couple of months ago: - It was not possible to close group chat without leaving MUC. - I had to constantly open separate search dialog to write to someone who's already in my roster but is not in the list of active chats. - Speaking of active chats: what annoys me the most about modern IM clients (and that includes Gajim 2.x) is that list of chats is sorted by the last activity date. I don't even know how Whatsapp/Telegram users live with this, I got so fed up with hovering my mouse/finger over one chat and tapping it only for the whole thing to reorder in the last jiffy and opening something completely different, I just dropped my account from one of those centralized mass-market services altogether. It is that annoying. - It had lots of smaller warts like nickname autocompletion requiring way more key presses (especially after someone mentions you).
- amatecha 1y agoHellz yeah. I'm at ~10 active users on my XMPP server and going strong. Finally something that won't unilaterally lock us out if we don't update every week, and we can chat from using any OS. We really do not care about "reactions" or stickers or all that other shit people complain about being lacking. "It doesn't look nice enough".. We just want to talk in private with a secure protocol that lets us actually use whatever we have, up to and including no mobile device at all.
- ajot 1y agoNever implemented this by myself, but I've read in the past this post on using Prosody, by the guys helpong the Low-Tech Magazine blog to become a self-hosted solar-powered site. https://homebrewserver.club/category/instant-messaging.html https://homebrewserver.club/category/instant-messaging.html
- vthriller 1y ago> support clustering (for high-availabilty purposes) That reminds me of one idea I had back in the day. You see, not everyone has the skill nor time to set up their own server, so clients rely on 3rd party servers. But sometimes these servers either experience intermittent connectivity issues or just die out altogether, which means users now have to set up second account and re-add everyone, while also scattering chat history across multiple accounts. What I'd like to see is some way of linking accounts across multiple servers, so that: - message delivery could have transparent fallback (it gets delivered to me@bar.com if me@foo.com is unavailable) - you don't have to add and authorize multiple accounts - rosters and chat histories also get synchronizes between the two A lot of that could probably be hacked around just on the client side, and I don't have good answers to questions like "what happens if I want to unlink two accounts for some reason". (And going a bit off-topic: I also wish I could use multiple email addresses while registering in other places, because email provides too can fail, close altogether, or even just ban you for no good reason while also having crappy bot-driven support@.)
- mixcocam 1y agoTake a look at delta.chat Your server can be a traditional email server you set up or one of their optimised devocot, smtp relays: https://github.com/chatmail/relay https://github.com/chatmail/relay The clients are great (they have reactions!) there is even a really good app store associated : https://webxdc.org/ https://webxdc.org/
- zikduruqe 1y agoI actually messed around with Delta.chat this past weekend for the first time. It's kinda cool. If or when, I need to setup new communication needs, I might use this. (Currently do not have a need for any)
- someodd 1y agoI've been homelabbing my own XMPP setup for a while. I went with Prosody and I enjoy its Lua flexibility and clean config model. For anyone curious, I documented the full process (including IRC bridge + more!) here: https://someodd.zip/phlog-mirror/xmpp-server.gopher https://someodd.zip/phlog-mirror/xmpp-server.gopher I also covered audio/video calls using a companion STUN/TURN server: https://someodd.zip/phlog-mirror/xmpp-server-video-audio-calls.gopher https://someodd.zip/phlog-mirror/xmpp-server-video-audio-cal... Curious how others here are handling federation and mobile clients these days. I use Conversations (F-Droid) and Gajim.
- chb 1y agoOf possible interest: https://xmpp.org/extensions/xep-0384.html https://xmpp.org/extensions/xep-0384.html
- defanor 1y ago> I assume the server is going to be run under xmpp.example.com and you all the following domains have been set up. > [multiple A records] "A" DNS records may be used for a fallback, but SRV records are the primary way to configure those [1, 2]. Also some of those can reuse an existing domain name, and some may not have any DNS RRs, but only be used as an internal JID. > ejabberd is a robust server software, that is included in most Linux distributions. Prosody [3] is another nice and popular option. > Install from Process One repository > Install from Github Both ejabberd and Prosody are available from regular Debian repositories as well. > Make sure the fowolling ports are opened in your firewall, taken from ejabberd firewall settings. A port range is also needed for TURN, to use for relaying. And there is a typo. > Clients I can recommend are Profanity, an easy to use command-line client, and Monal for MacOS and iOS. Among relatively feature-rich and user-friendly ones (quite polished, supporting more recent standards, including voice calls with DTLS-SRTP, OMEMO), there are also Conversations for Android, Dino for Lignux (GUI), poezio for TUI (though that one has no voice calls). Setting converse.js (a Web client) may also be convenient (and done rather easily, at least with Prosody). [1] https://www.rfc-editor.org/rfc/rfc6120.html#section-3.2.1 https://www.rfc-editor.org/rfc/rfc6120.html#section-3.2.1 [2] https://xmpp.org/extensions/xep-0368.html https://xmpp.org/extensions/xep-0368.html [3] https://prosody.im/ https://prosody.im/
- deleted 1y ago[deleted]
- threecheese 1y agoAnyone considering wiring Agents to XMPP? Seems like a convergence of A2A and human chat, and supports all the human-interface pieces of agents like slash commands. You can build many topologies with XMPP, and there is a wealth of extant source code.
- Gud 1y agoOn a tangent, what’s the simplest and best self hosted discord alternative?