this post was submitted on 06 Apr 2024
77 points (97.5% liked)

Selfhosted

40006 readers
874 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 1 year ago
MODERATORS
 

Hi. I have a group of 6 people using Discord to chat. Recently Discord changed a lot and we're looking for an alternative. We have a few requirements:

  • Good client on multiple platforms
  • Easy to use search
  • Self hosted
  • Permanently saved chat history & attachments on server (no expiration)
  • Easy image upload (Ctrl+V to post image from clipboard)

IRC isn't an option as chat history is saved on the client, and there's no good integrated way to share files and preview images. Matrix would be an overkill as we're a small group not interested in federation, and the available clients had a few bugs. Mattermost lacks a good mobile app (their current one had bunch of bugs). XMPP appears to be the best as it is extensible and has many clients available.

However, I tried configuring prosody on my FreeBSD server and it seems like it doesn't permanently save chat history or attachment files. Does anyone know if these can be solved? Or is there any better alternative than XMPP?

Thanks.

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 7 months ago* (last edited 7 months ago) (1 children)

You don't have to federate with matrix.

Curious: what are the bugs you encountered? I guess you looked deeper into element (or schildichat). The next version is on its way but not yet ready for prime time. In the long run it'll be your best bet.

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

One of the members and I used to chat on Matrix some time ago. I didn't encounter much issues but he had an awful experience (android/Windows, encryption related things and minor glitches on the client such as when syncing) that he refuses to move to Matrix unfortunately...

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

Understand the issue. I know those bugs. Those were funny times. That didn't happen in a long time

[–] [email protected] 6 points 7 months ago

Happened to me yesterday on the official element webclient 🤷‍♂️ These are far from solved.

[–] [email protected] 10 points 7 months ago (3 children)

I maintained an ejabberd server for myself and a few friends for many years. The config language was a little arcane to me at first, but it was pretty solid after I got it set up. I used a couple of different client apps with it over that time, most of which are still available on the F-droid repo. It was fun, but got annoying when the server needed maintenance, or was down, or because of any of the other minor nuisances that come along with maintaining a service for others to use.

Eventually we all ended up just moving over to Signal because it was just as good from the view of cost-benefit and risk for us. We're just trading stupid memes and Saturday night stories among ourselves. The most radical thing we might organize is a trip to Vegas for the week.

Definitely try it out, but consider that being a comms provider for others is always a bigger chore than it seems at the outset.

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

The most annoying thing about Signal is that they don't for some reason allow registering from desktop directly, so I had to use signal-cli. Which is inconvenient AF and it's a shame they haven't added a feature as simple as "input an SMS code in the desktop client".

Anyway, glad I only have to use it for a couple of guys and only with my real identity. So happy XMPP exists, and I have most of my 1-to-1 messaging with internet friends there. Very easy to host.

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

I hear you. The desktop wasn't Signal's primary market, and that's pretty clear in their implementation. On the other hand, that difficulty registering a desktop servuce may make it less attractive to would-be bot farms and spammers. Its a thin one, but I see that as a silver lining.

[–] [email protected] 4 points 7 months ago

Not just bot-farms and spammers, but just a regular person. What is Signal's main feature? Encryption. You would not want to expose your sensitive chats to a smartphone, unless it has a privacy-respecting OS (which not all phones can do). Good thing I only have to use it with a couple of guys who don't want to use other encrypted communication methods.

[–] [email protected] 4 points 7 months ago

I also had an ejabberd running for my family. Configured all the XEPs that take it into the current century. Had Conversations as a client for Android and Monal on iOS. No problems at all - apart from Monal being a bit wonky at times. But I assume these bugs are all fixed by now.

Also, Conversations is THE XMPP client. The guy behind it is involved in lots of XMPP stuff. And Monal tries to be the same for the iOS world.

But similarly, we all switched to Telegram over time as that's where my parent's friends are, too.

[–] [email protected] 2 points 7 months ago (6 children)

Did you ever get carbons working properly? (As in, mobile and desktop clients of the same user both getting messages and marking as read remotely between them)

load more comments (6 replies)
[–] [email protected] 9 points 7 months ago (4 children)

Many years ago I used XMPP with Prosody and it was ok.

  • You can setup some retention time for attachments and history depending on the space you have.
  • There are clients for multiple platforms but not very much advanced vs competition.
  • Security is good with omemo protocol. In so e clients you have to turn it on since it's not by default.
  • Audio video calls on one to one is good as long as you setup stun coturn server. Android to iOS calls still in progress.
  • Check out Snikket for an all in one solution.

You might want to also consider Matrix (dendrite option ?) for your needs.

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

I just started hosting Matrix in addition to XMPP (just because some communities prefer it now), and I find it bothersome that it saves chat history and media to every participating server. IDK how much of an issue chat logs would be, but media scares me a lot. Hopefully cleaning old files manually would not break anything...

Anyway, I started with Conduit rather than Dendrite, and it seems like a good experience. Could not even hope to get Synapse going on my weak VPS.

[–] [email protected] 2 points 7 months ago

Ah good to know about Conduit!

Well that's how the protocol works saving data on every participating server.

Simplex chat might be another alternative but is on early development as far as groups and desktop client.

load more comments (3 replies)
[–] [email protected] 8 points 7 months ago (1 children)

I am surprised that no one mentioned snikket yet, which is essentially a distribution of Prosody with sane defaults and a custom client.

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

Yes, and this can be paired with a self-hosted mail server, too.

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

This is interesting. I've never heard of this project but it looks really neat.

[–] [email protected] 3 points 7 months ago (3 children)

We've been using it on our phones and desktops for three years now, it's very stable

load more comments (3 replies)
load more comments (2 replies)
[–] [email protected] 7 points 7 months ago* (last edited 7 months ago) (1 children)

I would go with Prosody or Ejabberd, and here's a good comparison: https://stackoverflow.com/a/45531372 and Ejabberd is the most used thing out there. https://xmpp.org/software/

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

Hands down Revolt. Best alternative I have found so far.

[–] [email protected] 2 points 7 months ago

I've tried installing and using revolt. It's okay and our members like it but the lack of support and a usable control panel makes it hard to choose.

[–] [email protected] 4 points 7 months ago (2 children)

Nextcloud has chat capabilities. Perhaps it might be overkill for chat alone but presumably you also want some collaboration with documents.

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

Yes, but Nextcloud is also a perpetually half made project that breaks at every corner and requires a lot of resources.

[–] [email protected] 4 points 7 months ago

Speaking from experience from the last five years, it's been pretty good for me.

[–] [email protected] 3 points 7 months ago

It's just a room for chatting among friends so not really, but I'll check this out as well, thanks.

[–] [email protected] 4 points 7 months ago (2 children)

You can have non-federated Matrix. And XMPP is federated as well.

XMPP is probably fine. I haven't used it but people say it's good.

[–] [email protected] 3 points 7 months ago (2 children)

You're right that XMPP is federated as well and Matrix can be non-federated but I've heard some people had trouble with the Synapse server chugging resources despite not using federation.

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

I've been self-hosting Matrix Synapse for more than two years to chat friends and family and it has been rock-solid and it's on a VPS that os hosting a Nextcloud and Lemmy instance as well. It is definitely not really resource hungry for small groups of people.

If you want to try again this route, just make sure that everybody saves a backup of their keys as the messages are all encrypted and while you can authenticate a new client installation from another client that the same user is logged in, some people - like my mother - only use one, on her phone, which is understandable.

So in summary, I'm very happy with it! :)

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

How much CPU, RAM and storage does it consume for you?

[–] [email protected] 4 points 7 months ago

That is a good point... on average it's around 500Mb of RAM usage, between 0.5% and 1% of CPU (it's a 2.4Mhz four cores).

Space is 5Gb, mainly media files accumulated over two years.

So overall, not bad.

load more comments (1 replies)
[–] [email protected] 3 points 7 months ago* (last edited 7 months ago) (11 children)

Yes, but Matrix a plague of questionable open-source and a metadata disaster.

Matrix’s E2EE does not, however, encrypt everything. The following information is not encrypted: Message senders, Session/device IDs, Message timestamps, Room members (join/leave/invite events), Message edit events, Message reactions, Read receipts, Nicknames, Profile pictures

Matrix is developed by a for profit entity, a group of venture capitalists and having a spec doesn’t mean everything. The way Matrix is designed is to force people into jumping through hoops and kind of drawing all attention to Matrix itself instead of the end result.

Decentralized communication protocol Matrix shifts to less-permissive AGPL open source license Element, the company and core developer behind the decentralized communication protocol known as Matrix, has announced a notable license change that will make the open source project just that little bit less appealing for companies looking to build on top of it.

https://techcrunch.com/2023/11/06/decentralized-communication-protocol-matrix-shifts-to-less-permissive-agpl-open-source-license/

Stop recommending questionable open-source like Matrix. XMPP is the true and the OG federated and truly open solution that is very extensible. XMPP is tested, reliable, secure and above all a truly open standard and decentralized it just lacks some investment in better mobile clients.

What people fail to see is that XMPP is the only solution that treats messaging and video like email: just provide an address and the servers and clients will cooperate with each other in order to maintain a conversation and it can be configured to be secure and private. Everything else is just an attempt at yet another vendor lock-in. Here a quick overview of the architecture.

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

What also bothers me is how prominent matrix.org instance is. So you got a system that is supposed to be decentralized... Yet defederating from the one central server would break a lot.

[–] [email protected] 2 points 7 months ago

The way Matrix is designed is to force people into jumping through hoops and kind of drawing all attention to Matrix itself instead of the end result

That's just another detail where we see that.

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

Yes, but Matrix a plague of questionable open-source and a metadata disaster.

Matrix does not "leak" metadata. It HAS metadata.

[–] [email protected] 2 points 7 months ago

Fair enough 😂😂😂

load more comments (9 replies)
[–] [email protected] 3 points 7 months ago* (last edited 7 months ago) (1 children)

Prosody can be configured to permanently save chat and files, you just need to change the default settings. If I remember correctly an empty value for the retention means infinite, but I don't think that is a good idea as it just wastes storage space.

Otherwise I think you will run into issues with search as none of the xmpp clients consider permanent searchable history to be particularly important. And I tend to agree, as chat is among the worst possible ways to store information, no matter the search capabilities.

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