this post was submitted on 26 Jun 2023
22 points (100.0% liked)

Free and Open Source Software

17937 readers
141 users here now

If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

So I want to setup a messaging server in my home that works like Telegram or Whatsapp - it should use the local network as we plan on moving around a lot of photos and files between our devices for some projects

What should I use? XMPP? Or Matrix? Or is there something else that's ideal for local networks?

Thanks!

top 39 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 1 year ago (1 children)

I'm curious to learn of other people's workflows. May I ask why you prefer to send files over messenger instead of using a shared local file storage?

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

Mostly it's because we're using Telegram for our workflow and everyone is pretty used to it by now (including our parents, who're slow to adapt).

We're gonna be sharing videos, photos, and files on an hourly basis, and not every person is invovled with the every other person's workflow. If it could ideally be a messenger, we would have conversations regarding these files, and the chat history+notifications on new file upload would be pretty nice.

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

Then it sounds like Matrix is what you want. It can send files just fine and I use it for that all the time.

You may want to set up some kind of cleanup for media storage, as the files would stay on the server even after being sent and received, otherwise, slowly filling it up.

If you have a ton of storage and the files are reasonably small, you might be be fine without that, but look into it, at least.

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

Matrix doesn't really work without a public domain name and so on. Maybe this will change in the future with their p2p experiments, but right now it is not a good suggestion for a local only solution.

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

Yes it does. You can use it with a local domain. Setting it up would be marginally more tricky, perhaps even easier than a "real" domain, but using it would as simple as ever, on that LAN.

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

You can make anything technically work with a local domain...

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

Obviusly. Is there a downside here beyond it only working locally? Is that not exactly what OP needs? Is there a tool that fits better than matrix?

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

Matrix has all sorts of hard-coded or at least default configured stuff that needs a internet connection to phone home to the matrix.org servers. The Element web interface will also have issues working due to CORS protection in the browser.

Sure it might end up working sufficiently well, but it really isn't the right tool for this.

In general the use of a messenger for this is already less than ideal, but a messenger like matrix that is deeply integrated into a federated network and is build on web technology that isn't ment to be run locally is just a bad idea, sorry to say.

I wouldn't even recommend XMPP for it, and that is much more self-contained and doesn't use webtechnology at all.

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

I don't recall matrix-synapse needing to talk to any outside systems, unless you federate, generate url previews, or use integrations?

And can't you just self-host element, too? I do.

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

Its not strictly needed but everything is build with that assumption in mind and thus there will be many papercuts.

Yes you can self-host Element, but you have to be very careful with the setup to avoid cors issues and I think it will also permanently show a big warning if the connection is not via HTTPS.

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

Bottom line, it can work, if matrix is what op wants to go with.

As for SLL, without it any browser based thing is going to get you a warning, from the browser itself, at least.

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

Cool. I do like how sending photos over chat sends a message which doubles as a notification.

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

May be https://code.briarproject.org/briar, it is 'absolutely' local ... and global :)

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

Oooh this looks interesting, what a nice project!

I'll check it out, but it seems the local part is more of a backup than a primary feature, so not sure if it'll work for me

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

If you want something relatively idiot proof you could set up a local Nextcloud server that automatically syncs the photo from the devices and let's you share them directly or via the built in Nextcloud Talk chat app.

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

Seems to fit all my needs, the talk app looks a little dull, but I think it will be pretty functional for our needs

I also found Mattermost and Rocketchat while looking up nextcloud, and they seem promising too. Any idea about them?

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

Mattermost is easy to get running, but the community edition makes it easy to mess up groups accidentally as there is no ACL (this is an intentional crippling of the software to make people buy the enterprise version).

Rocketchat is ok AFAIK (not much experience with it), but not so easy to install and get working.

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

I've heard good things about NC Talk. For work, it is supposed to work brilliantly. The one thing you might have to look into is how push notifications work. The default NC server setup doesn't support them, iirc.

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

I think you need to think about what you want very clearly. For example, transferring files and other data between devices screams Nextcloud. My wife and I have a local Nextcloud instance on our media center that we use to sync calendars, address books, tasks, notes, and files in general. Way useful. Some people said syncthing. My big reservation is, can you find easy to use apps (I have not though maybe they exist). The big advantage of syncthing it can do NAT traversal and you do not need any server infrastructure.

On the other hand you said you want chat. So then yes, chat sounds interesting instead, not what we do. I will leave the others to talk about chat because there are so many options and I am not a big chat guy. By the way for chat, Signal does have some sort of group chat option. That is really my only input.

I would think about where your users are. If your stuff is on your LAN, then this means a few things. First you server will not have a globally routeable IP address or domain, so every device has to be on the LAN. If for example your parents do not live with you this is kind of out. Also people talked about domain names. Domain names are not the problem. You can always put a DNS server on your LAN (often your boundary router can do this), and add your server and domain to it. What is a problem is TLS Certificates. Generally android devices have problems with non-standard CAs and probably self-signed certs. So one has to think how they are going to do that. Other option is to have a VPS at a place like Linode for example. Then your server is on the internet, but then you have to maintain it and in particular keep it patched and secured which can be challenging.

Anyway, some things I did not see others say.

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

Thanks for sharing your thoughts. Yeah, I plan for this to be a LAN thing only, we're all currently living in the same house, and only need it when we're working indoors here, so it shouldn't be an issue.

I'm currently setting up nextcloud, as it's file transfer is impeccable, and it has a somewhat-functional chat feature. I have been having a little problem setting up the domain name + certificate - I would love to configure this to an internal IP but it seems that's not allowed for some reason - nextcloud documentation is suggesting a reverse proxy for setting up a local instance which seems like .... double the work? I'll try that if nothing else works out, and I'm gonna try it with a self-signed certificate for now, if that fails I'm not sure

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

The way I setup the domain name was to buy a domain from Namecheap for use for "private" and LAN use. Then I assigned my server to a subdomain of that. Then I setup my VPS that I have at Linode to also host that subdomain too and to mint a LetsEncrypt cert for it and keep the cert up to date. Then periodically I have my local server fetch the cert from my VPS.

There may be other ways. Maybe using port forwarding and dynamic DNS would have worked. Maybe I could have shelled out money and purchased a domain signing cert from say Digicert. I use to use my own CA and add it to my devices. Linux and maybe Windows too allows that but not Android does not, so that is why I purchased a domain and went through the drama minting a real cert. Also could have added my server as a subdomain of one I already had, but wanted my "private" stuff on a different domain then my public server for a little more privacy and long term flexibility. Also did not want to use port forwarding and dynamic DNS for security reasons though I think could have.

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

What install method are you following?

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

It's not a messenger, but for locally frequently transferring or syncing a lot of data, I can recommend syncthing. You can use it to configure shared directories, syncthing will use the local network as available (or you can force it to) to transfer files across the devices. We use it for keeping some media, notes, password databases and documents in sync over a bunch of devices. :)

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

Two ideas:

  1. xmpp works, but the domain needs to resolve correctly. I'd just use a free domain that you point at the server LAN ip, plus an acme client that can do a dns challenge. Prosody is pretty bulletproof and very lightweight.

  2. deltachat + email. Set up a little IMAP server for the lan and use Delta chat to create a messaging over it. Or just use an email client.

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

I've set up an XMPP server a few years ago. It worked beautifully!

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

XMPP sounds great, but I heard it has difficulty with file transfer. How was your experience with it?

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

I've not used it as FTP as it wasn't built for that. It was, however, brilliant for messaging. In regards to some comment below about the domain - you could always spin up a little unbound instance (+wireguard for your own stuff everywhere).

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

Its not really designed for sharing large files and storing them, but it is not hard to get working.

However XMPP works better with a domain name and such, for a purely local solution something p2p or a local NAS is much better. Syncthing is probably the easiest to get going.

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

Ahhh

I use Syncthing already for a lot of my stuff, but it doesn't fit the bill right now. I've been reading about Matrix while looking around for this, do you have any experience with it?

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

Yes, don't bother with it for this specific use-case.

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

Got it, thanks!

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

xmpp has a number of file transfer modes. http upload has been smooth sailing for me. It uploads the file to the server and holds it according to a retention period you configure. Shows up in the client you sent it to.

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

Hmm, that actually sounds manageable, as I don't plan on storing the files on server for a long time. Only issue is the notifications part I think, not sure how to configure that . I'll check it out

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

Notification works like any other message. http upload is just the method the client uses - it's more or less transparent to the clients involved. It's still sending and receiving as you would expect from a messenger.

[–] somegeek 1 points 1 year ago* (last edited 1 year ago)

I read your workflow. My suggestion is don't use a messenger, use syncthing or a similar app on a local shared storage. it's way better. you wouldn't get duplicate files, it does its thing automatically, you can even have versioned files. and it's not THAT hard that your parents won't learn. pretty easy and straightforward.

and for messaging, you can use matrix, IRC, briar.

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

If you’re moving primarily files, I’d probably use Synthing, which is easy to set up for several devices and is really good at syncing files. If you need to be sending messages like a chat, then you might have some luck with Berty, which can work over local Wi-Fi or Bluetooth; though it is in beta.

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

I'm a delighted user of SyncThing but it doesn't fit the use case this time unfortunately.

Berty sounds almost exactly like what I want, though I would have prefered an app with server-client architecture. Is Berty not in Open Beta? I'm being asked for an email that will consider letting me join when they receive it

load more comments
view more: next ›