this post was submitted on 21 Apr 2024
158 points (98.2% liked)

Selfhosted

46609 readers
1031 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I'm looking into hosting one of these for the first time. From my limited research, XMPP seems to win in every way, which makes me think I must be missing something. Matrix is almost always mentioned as the de-facto standard, but I rarely saw arguments why it is better than XMPP?

Xmpp seems way easier to host, requiring less resources, has many more options for clients, and is simpler and thus easier to manage and reason about when something goes wrong.

So what's the deal?

(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 29 points 1 year ago (4 children)

I don't think you can pick out any one reason. XMPP is very old and has extensions for a huge variety of features. Many people have experience with older versions which had many major missing features (such as strong multi-device with offline support and server-side history) and a lot of the "hype" has died out long ago.

Matrix is new and made a lot of decisions that really helped its popularity.

  1. Having a HTTP-based client-to-server protocol makes web clients very easy to make.
  2. It is based on sync and merging rather than messages which moves some difficult problems (like multidevice and server-side history) into the core protocol meaning that it works well out of the box.
  3. Having HTTP based protocols make hosting it familiar for many people.
  4. The "default" Element clients have lots of features out of the box, features that for a long time were not always present on XMPP servers or clients. This gives a more consistent experience.

We will see what the history holds. Matrix is still very new and maybe the hype will die out and we end up moving back to XMPP. Or maybe something new. Overall I don't think there are major fundamental differences. I think Matrix making graph sync the core primitive to build off of was a good idea, but in practice I don't think it matters much.

You say that XMPP is much lighter. But I think that is mostly due to Synapse not being very efficient. Other implementations are fairly light. Even then my Synapse is using fairly small amounts of resources. You should also check that you are making an apples-to-apples comparison with large rooms, media and message history like you would typically see in a common Matrix server.

load more comments (4 replies)
[–] [email protected] 7 points 1 year ago

If the goal is to make a similar experience to discord, we should make a desktop/android client which changes the way the info is shown. I boil down discords main features this: 1-to-1 call/text, modern messenger features (emojis, text, audio, video, link embeds), servers with the option for channels and always on voice chats, group chats (weird overlap with servers). Always on voice chats should be as simple as disabling notifying or dialing members. Is it not just that simple to get a heavily reduced version of discord? Maybe noisetorch for noise cancelation.

[–] [email protected] 2 points 1 year ago (1 children)

I'm going to throw this out there not being sure how true it is, but I find it interesting to think about.

XMPP is much more widely used than Matrix if you count WhatsApp (Meta/Facebook). ActivityPub is much more widely used than AT Protocol and nostr combined if you count Threads (Meta/Facebook). So reasons why people aren't talking about XMPP include not wanting to recognize that Meta is hugely influential in this space and that most people don't talk about the underlying protocols of the services and tools they're use at all leaving a self selected group of people looking for alternatives with traction that don't depend on Meta. Outside of WhatsApp, there's not a lot of traction with any particular XMPP implementation. And none of the XMPP implementations have a Discord-ish organization of chat rooms that's popular and familiar right now. Matrix has both right now (although I don't think it will ever be more than a small niche in the mobile messaging space).

I'm fine with using Matrix for what it is. There are programming language communities that have been very helpful for me and a number of Lemmy related communities that have been nice to be a part of.

[–] [email protected] 8 points 1 year ago* (last edited 1 year ago)

WhatsApp is using a complete fork of the XMPP specifications and never had influence on XMPP. In the early days when Facebook messenger was using XMPP as a C2S interface they had a bit of influence but what you said used to be much more true for Google some years ago and what happened there is a major reason why people don't want Facebook to become influential in ActivityPub (which it isn't yet).

[–] [email protected] 44 points 1 year ago* (last edited 1 year ago) (5 children)

Many people have not used XMPP in years or never and go by hearsay of outdated information.

Matrix on the other hand had several million Euros of venture-capital to fund a marketing campaign.

[–] [email protected] 9 points 1 year ago (2 children)

several million Euros of venture-capital to fund a marketing campaign.

Citation needed. Matrix was funded by Amdocs initially, then got investment from Automattic and has gotten some contracts from European Governments, but AFAIK there is no "VC investment" and there certainly aren't "millions to fund marketing".

They do have better marketing than any XMPP developer, though. You basically don't hear anything from process.one or the Prosody devs.

[–] [email protected] 2 points 1 year ago

They do have better marketing than any XMPP developer, though. You basically don’t hear anything from process.one or the Prosody devs.

XMPP developer https://gultsch.social/@daniel does a good enough job at that imho

[–] [email protected] 26 points 1 year ago (1 children)

As unpopular as VC funding is in some circles, the Matrix community owes a huge debt of thanks to Element’s investors (Status, Notion, firstminute, Dawn, Automattic, Protocol Labs and Metaplanet) and Amdocs for funding over $50M of work on both Matrix and Element since 2017.

Strait from their blog.

[–] [email protected] 7 points 1 year ago (1 children)

Ok. I lost track of their funding. Seems like they raised $30M in a series B round in 2021.

Still, look at the timeline. 2021 is not that long ago, and Matrix was already ahead of XMPP in mindshare by then. It's not really fair to say that this money was only spent in marketing, and it is not fair to say that without it XMPP would be making some comeback.

[–] [email protected] 3 points 1 year ago (1 children)

I didn't say it was only spend on marketing, but they sure send a lot of people to developer conferences everywhere and offered "free" services to many open-source projects with that money.

[–] [email protected] 4 points 1 year ago (1 children)

They were doing that before 2021. Even acquired gitter and ported it to Matrix.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Yes and they had plenty of funding from highly questionable sources before 2021 as well. Even if you only take the 20 million difference in two figures mentioned above, but Element also partnered with a really shady crypto-currency startup in 2018, which had its own sources of investor funding.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (1 children)

Sorry, but now this is starting to sound like sour grapes.

Ok, they got a good amount of funding. But that alone is not enough to justify how they managed to gain as much mindshare as they did in relation to XMPP.

Element's funding in 2018 or 2021 did not steal any opportunity for (e.g,) snikket to work on their product. Element following the "cathedral" model allowed them to be faster in the development of multi-platform clients, while the XMPP devs were all fixed to the Bazaar ideal, and because of that absolutely failed to deliver a modern application in the platform that is used by half of mobile users in the US.

We (techy types) tend to ignore things that end users care about and we are a lot more forgiving with systems that we see as "technically superior", but the market cares a lot more about things like "Can I send emojis without having to worry about what client people use?" then "synchronization model or disk space requirements".

This is not just "marketing", this is "having someone with actual business and product sense".

If it was up to me, sure I'd wish that more people would be using XMPP. But in 2019 when I told my parents that I wouldn't be using WhatsApp anymore and that we needed a different app if they wanted to have video calls and see their grandchildren, XMPP was not even a choice for my iOS-using father, and Element (née Riot.im) was at least usable.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

Both Matrix and federated XMPP are irrelevant in the larger picture, but Element chose to reinvent the wheel to have a product they could more easily market to investors. Had they spend a similar amount of money and developer hours to improve existing XMPP based options we might have an actually working and popular alternative now.

But as it stands, we have a quite fundamentally broken Matrix protocol & ecosystem with some semi-usable but more modern looking clients and a working and well proven XMPP ecosystem that is extremely starved of funding and developers.

You can call this "sour grapes" all you want, but it is the sad fact and a direct result of outside investments screwing with incentives of developers.

Edit: and on an ironic side note: in 2019 Riot.im was using a fancy wrapper around Jitsi-meet for all video-calls which is internally using XMPP, so you were in fact using XMPP as that was the only usable solution back then.

[–] [email protected] 3 points 1 year ago (12 children)

Had they spend a similar amount of money and developer hours to improve existing XMPP based options we might have an actually working and popular alternative now.

And where would they get this money in the first place?

load more comments (12 replies)
[–] [email protected] 12 points 1 year ago

This makes matrix even less attractive to me lol. But you're right, that's a very good point.

load more comments (3 replies)
[–] [email protected] 1 points 1 year ago

because it's new

[–] [email protected] 19 points 1 year ago (2 children)

I've been an XMPP user for decades. I use it daily to talk to all of my friends and most of my immediate family, so I'm certainly an advocate for it.

I think in the simplest terms Matrix gets mentioned more often because it's newer and it's development has largely been driven by a corporation with significant funding. XMPP had similar corporate sponsors years ago, but a lot of them moved on. The XMPP community isn't gone, though, and XMPP development has continued.

As others have said, it's true that XMPP had some difficult issues in the past with various clients only supporting certain extensions (XEPs), which meant what worked on one client may not work on another. This problem isn't nearly as much of an issue nowadays, but it was frustrating in the past. There are official compliance suites that clients and servers can use to ensure they meet the base features for a particular purpose, so that has helped in that regard.

To me, XMPP is preferable because it's a messaging protocol, not a giant graph database of all social interactions. I don't need or want that. The main XMPP server software does handle message history that is synced across all devices, but this is often user configurable and none of that information is needed by or shared with other servers. MUCs are not replicated across the network, but only exist on the server that hosts them. While this does mean that server is a single point of failure, it's much simpler to operate and, at least in my opinion, is better from a privacy perspective.

Traditionally XMPP, albeit with propriety extensions, has been used as the basis for a large number of messaging platforms. Google Talk was XMPP. Facebook Messenger was XMPP. WhatsApp still is XMPP, as far as I know. Kik is also XMPP. Google and Facebook's platforms may still use XMPP, but I don't know for sure. It certainly works as a messaging platform for lots of users, but without all the VC money, development is pretty much only done by volunteers or client developers that offer paid builds of their clients (like Conversations on Android).

[–] [email protected] 1 points 1 year ago (1 children)

pidgin still doesn't support omemo

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

Pidgin's XMPP support hasn't been updated in more than a decade*. Please don't use Pidgin for XMPP! It lacks so much more than just not supporting e2ee via OMEMO.

*apparently they recently started working on a full re-write of it for an upcoming version, but it is slow going.

[–] [email protected] 6 points 1 year ago

I am hosting both XMPP and Matrix now, and my main concern with Matrix is storage. I am afraid it would eat up the very limited disk space I have on my VPS. Conduit offers no built-in way to clean files up, and media is stored in a weird way that makes it a PITA to see which ones can and cannot be deleted. I now know that neither the database files nor the media can be just deleted.

I sorta like the idea of a chatroom existing on more than one server, but that MUST have been opt-in or at the very least opt-out.

[–] [email protected] 28 points 1 year ago* (last edited 1 year ago) (1 children)

Google killed XMPP momentum. And while Matrix has many issues it needs to figure out, especially the development being almost exclusively supported by a for-profit company, they seem to slowly (very slowly) work towards more independence.

Matrix did some things right. Going with JSON spec instead of XML, having Element as uniform cross-platform client, offering bridges as a way to stay connected with your family and friends without needing to convince them to move (XMPP offers transports, but they function entirely differently) and offering end-to-end encryption by default.

XMPP in true open source fashion doesn't have any uniformity from user perspective. Different ways to do the same thing on different clients, different clients on different platforms. That is a benefit for a savvy tech nerd, but it's a huge inconvenience for a non-techie family member or friend.

[–] [email protected] 2 points 1 year ago (2 children)

Why is JSON better than XML? It's more modern, sure, but from technical perspective it is not objectively better right? Not something worth switching protocols for.

You mention XMPP has transports as opposed to Matrix bridges. I thought they give you roughly the same outcome. What's the difference?

[–] [email protected] 5 points 1 year ago (2 children)

Why is JSON better than XML? It's more modern, sure, but from technical perspective it is not objectively better right? Not something worth switching protocols for.

XML is unnecessarily complicated. By trying to cram everything into the spec, it's cumbersome and hard to parse.

You mention XMPP has transports as opposed to Matrix bridges. I thought they give you roughly the same outcome. What's the difference?

The goal is the same, but the way they archive that is different. For transport to work, you need an account on each platform you are using the transport on. It relays the messages through that account by mimicking the client. While bridges work by relaying the messages between rooms and not specific users.

My understanding is limited, so if you are interested, please do your own research.

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (1 children)

Most Matrix bridges to commercial chat systems also require accounts on those networks. That's the only way to make them work on most of these systems.

I guess you are specifically referring to the Matrix to Discord bridge that does work like you describe, but a similar bridge has existed for XMPP to Discord in the past but is currently broken and unmaintained. The currently working XMPP to Discord transport does require you to puppeteer a personal Discord account, but that is rather because of a different focus of the used transport framework than any technical limitation of XMPP in that regard.

[–] [email protected] 2 points 1 year ago (1 children)

All platforms that don't have public API access will require a way to relay that information, but I was talking about the difference in how the messages are relayed. Matrix bridges work fundamentally on each platform/protocol having its own room and relaying the messages through the bridged room instead of the user as XMPP does. That's why you can relay the same messages to multiple rooms on Matrix, but can't do the same on XMPP.

[–] [email protected] 1 points 1 year ago

No, that is only an implementation detail, you can easily do a very similar thing with XMPP group-chats.

In fact the way Matrix does it is a major limitation and the source of an endless amount of issues with their IRC bridge.

[–] [email protected] 1 points 1 year ago (1 children)

cumbersome to parse

Parsers have already existed for so long in every major language. Why need to worry about parsing?

And why need to worry about transports working differently if they achieve the same thing? They seem similarly convenient if I understood what you said correctly

load more comments (1 replies)
[–] [email protected] 11 points 1 year ago

The only things JSON has over xml is that it’s easier to write a parser for it and the format is less verbose and less complicated. There are extensions to JSON that can add features that xml has and the JSON spec doesn’t have. Overall the xml spec is bigger and has more features but that also makes it overkill for many of the cases that it would be used in.

[–] [email protected] 54 points 1 year ago* (last edited 1 year ago) (2 children)

has many more options for clients,

The problem of XMPP is here. These options are not uniform among the possible different combinations of servers and clients.

The situation has improved a lot, but there was a point in time where saying "this is my XMPP handle" was far from enough to know if you'd be able to communicate with others, and you'd have to figure out things like:

  • Does the server support MUC?
  • Does the server support E2E? If so, which?
  • Are emojis supported on the server, or do they get converted to ASCII?
  • Can you use audio calls? If so, which codec?
  • If my client supports "share live location", what do you see on your end?

Not to mention that until recently there was no decent XMPP client for iOS. Even today, the best alternative is siskin, which may have its vocal fans but quite frankly is pretty barebones and has a UI that would be considered ugly even in 2010.

Matrix as a protocol is technically worse than XMPP and Synapse is a resource hog compared to Prosody and Ejabberd? Yes, true. But at least I can tell non-technical people to download Element from the App stores and they will have a consistently-not-great-but-acceptable-and-improving experience.

[–] [email protected] 5 points 1 year ago (2 children)

But at least I can tell non-technical people to download Element from the App stores and they will have a consistently-not-great-but-acceptable-and-improving experience.

Conversations on Android looks and feels like any other modern messenger and supports basically all the XMPP features there are. And I found Monal on iOS to be pretty usable as well, when I tested it 3 years ago.

[–] [email protected] 3 points 1 year ago (1 children)

Conversations on Android seems to be the default answer for "advanced client".

But for everything else... look at Monal's blog, they only added support to audio calls in October of last year. Nice to see it's still being developed, but "too little, too late" seems fair.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

The other XMPP client for iOS called Siskin has had a/v calls for many years now.

[–] [email protected] 3 points 1 year ago

Yeah, I mentioned it in the first comment. But seriously, it looks like something built in 2009. It might be functional, but only a die-hard XMPP fan would be interested in using it.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

Yes, Monal is catching up to Siskin fast, but until recently didn't support a/v calls which is why many people still prefer Siskin.

As for a unified system, have a look at https://snikket.org which offers a one-stop solution under a single brand similar to Element. It uses lightly modified versions of Conversations, Siskin and Prosody (as a server) under the hood.

[–] [email protected] 18 points 1 year ago* (last edited 1 year ago) (2 children)

This is the correct answer, IMO.

I loved using XMPP back in the day, but I struggled talking with people who weren't on the same server as me because of spec and client variations.

While Synapse is a resource hog, it (and Element) - to a certain degree - does the job. Can't wait until sync v3 lands in the main server.

The only issue I have is with one friend who insists on deploying his own version of Synapse, but can't figure out coturn and - as a result - we can't voice chat properly.

Goddammit. Two steps forward, one step backward. 😅

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Suggest your friend to give Eturnal a try maybe. I have it running on an Oracle free tier instance, and I use it daily to have video calls with my family using Synapse/Element (and Jitsi inside Element for group calls), and it works great. The documentation is very good too.

Edit: this is my Eturnal config, for reference:

eturnal: listen: - ip: "::" port: 3478 transport: udp enable_turn: true - ip: "::" port: 3478 transport: auto enable_turn: true - ip: "::" port: 5349 transport: tls enable_turn: true realm: turn.<MY_DOMAIN> tls_crt_file: /etc/letsencrypt/live/turn.<MY_DOMAIN>/fullchain.pem tls_key_file: /etc/letsencrypt/live/turn.<MY_DOMAIN>/privkey.pem tls_options: - no_tlsv1 - no_tlsv1_1 - cipher_server_preference

And the compose file: services: eturnal: container_name: eturnal image: ghcr.io/processone/eturnal:latest environment: ETURNAL_RELAY_MIN_PORT: 49160 ETURNAL_RELAY_MAX_PORT: 59160 ETURNAL_RELAY_IPV4_ADDR: <REDACTED> ETURNAL_RELAY_IPV6_ADDR: <REDACTED> ETURNAL_SECRET: <VERY LONG RANDOM STRING> volumes: - ./eturnal.yml:/etc/eturnal.yml:ro - /etc/letsencrypt:/etc/letsencrypt:ro restart: unless-stopped read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true network_mode: host

load more comments (1 replies)
load more comments
view more: ‹ prev next ›