I’ve been using Signal for many years now, and it fulfils most of my messaging needs. But last year’s AWS outage, which took it offline for almost a day, showed one of its many flaws: Signal is highly centralised and reliant on big tech infrastructure.

I was therefore wondering if I shouldn’t start self-hosting my own messaging infrastructure - maybe not for my day-to-day needs, but as an emergency fallback for my closest friends and family, should Signal fail again or become unavailable or compromised (looking at you, EU Chat Control!).

My first thought was to self-host my own Matrix/Synapse server, which ticks a lot of boxes for me: end-to-end encryption, media sharing (pics, audio, videos, all that good stuff), high availability of mobile clients with modern UIs, potentially even audio/video calls. The latter is still giving me a headache since apparently, I need a TURN server to get this working properly, and I’m somewhat reluctant to open so many ports just for it to work…

What’s your perspective on self-hosting messengers: which ones do you prefer? What is your primary motivation to do it? And how have you set it up?

  • stratself@lemdro.id
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    12 days ago

    If you choose to go with Matrix, I would strongly recommend you to give the Continuwuity server a try. It is quite simple to install, much less resource-intensive than the commonly-used Synapse, and has an active community behind it.

    apparently, I need a TURN server to get this working properly

    Do note, Matrix recently has a new calling stack called MatrixRTC, and for that you would be setting up LiveKit in place of a TURN server. That also opens many ports by default, but I think there is a “UDP mux” mode that listens all on one port. I’ll be looking into it soon.

    The other alternative is XMPP, which is a bit more complex to set up (more ports and subdomains, non-HTTP protocol etc) but is generally more lightweight and fast. ejabberd is my choice, but people tend to like Prosody and Snikket as well. While they use the traditional TURN servers for calls, their clients could use a lot of improvements though…

    So yeah, my Continuwuity and the XMPP server sits on a small homelab machine, and with some extra tuning and grit, they work well. LiveKit and TURN sits on a VPS for better network performance. To be honest, I do all of this mainly because I wanna talk to cool people on the internet, so the service has to be federatable.

    • stratself@lemdro.id
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 days ago

      Just wanna update: the UDP mux option works! Rather than opening thousands of ports, you’d now only need to open 3 or 4. I’ve got 7881/tcp, 7882-7883/udp, and livekit’s HTTP backend fronted by a reverse proxy, and that’s all for calls in most circumstances.

  • drkt@scribe.disroot.org
    link
    fedilink
    English
    arrow-up
    9
    ·
    12 days ago

    If you’re going with Matrix, consider looking at Synapse alternatives. Synapse is by a huge margin the heaviest of the backends to run and it doesn’t really get you anything extra.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    12 days ago

    Have you looked at all into Meshtastic? Depending on where you are, it may work quite well for local communications

    • LewdLemon@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      12 days ago

      I’ve come across it, and I love the concept of making communication even more robust by making it independent even of the infrastructure of the internet. That said, I assumed that it would come with a lot more friction than the userbase I have in mind would tolerate. For now, my plan is to first seek an equally accessible, yet more decentralised alternative to Signal, and reserve digging into mesh networks for later.

  • SolacefromSilence@fedia.io
    link
    fedilink
    arrow-up
    6
    ·
    12 days ago

    I also self-host a messaging service. My infrastructure is a homing pigeon coop.

    /uj I like your question and couldn’t contribute technically, so hope you get a laugh

  • artyom@piefed.social
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    2
    ·
    edit-2
    12 days ago

    Matrix is the most popular one these days, and it’s worth considering just for that reason, but it is also extremely buggy and slow. I can’t tell you how many timed I’ve been booted and locked out of my own account, or someone sends me a message, only to receive “message cannot be decrypted” error.

    If you’re starting something new that you’re bringing other people to, I’d very much recommend DeltaChat/ArcaneChat (chatmail). It’s been far more reliable and easier to use.

    I’ve never used XMPP because all of the clients are extremely dated.

    • lyralycan@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      4
      ·
      12 days ago

      1 - great username, 2 - I no longer have these issues with my setup, been running for 5 years now (but an update seems to have broken Element Call

      • artyom@piefed.social
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        2
        ·
        12 days ago

        Well, I’m happy for you, but I am currently locked out of my account. All of my devices were booted for some reason and now it’s not accepting my encryption key that I’ve been using for years to get back in, and I can’t use another device to verify, because they were all booted simultaneously.

        • lyralycan@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          11 days ago

          There is an admin override available. Depending on your version (i use continuwuity) there’s a toml config or maybe .env, and an admin_pass. @admin:domain and this key will hopefully show something

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    12 days ago

    Simplex chat looks interesting although I don’t use it

    I would recommend that you use what the people around you use

    • LewdLemon@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      12 days ago

      I would recommend that you use what the people around you use

      That’s not what I have in mind. I’m playing trailblazer here: at least for the people closest to me, I want an alternative means of communication that will be ready in a minor shit-hits-the-fan scenario (i.e. one where Signal for instance goes tits up, like it already has once).

  • Denys Nykula@piefed.social
    link
    fedilink
    English
    arrow-up
    4
    ·
    11 days ago

    There’s no federated messenger yet that withstands domain theft or abandonment while providing a good group experience, so I’m still waiting for someone to make one.

  • Egonallanon@feddit.uk
    link
    fedilink
    English
    arrow-up
    4
    ·
    12 days ago

    A friend hosts an IRC server that I use along with a bunch of other mates for a lot of our comms. Works really well and is wonderfully lightweight without any extra bells and whistles that we don’t care for.

  • Spite_By_Design_LLC@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    11 days ago

    XMPP hosted via Raspberry Pi.

    The setup is:

    • Prosody provides the XMPP server.
    • Converse.js provides web client / PWA.
    • Conversations for Android clients
    • Coturn provides TURN services for calls and NAT traversal.
    • Tailscale provides remote access without exposing the XMPP server directly to the public internet.

    (nb: also configured Message Archive Management (MAM) for chat history, private multi-user chat rooms (MUC), HTTP File Upload for media, and Jingle signalling for audio/video calls).

    The server is designed to be accessible over our LAN. When away from home, family members connect through Tailscale (I really should just use Android actions and geofencing to auto launch Tailscale, but on my kids devices, I just leave Tailscale enabled. I don’t think it hits the battery too hard). Tailscale can only connect to XMPP and we keep our XMPP to family only, with me manually adding devices to Tailscale as I need to.

    As for why? Because I get joy from hosting my own shit, having control over it, having it work when other stuff falls over. My stuff falls over too, but I know WHY and HOW to fix it, and that’s how I prefer it. I want to get to the point that if the internet dies tomorrow, I shrug my shoulder and barely notice.

    My goal is to replace all cloud based services we use and I’m about 85% of the way there. I have a much larger goal too…but that’s a story for a different time.

    PS: I’m mildly irritated about Tailscale use, so I’m looking at getting off that teat as well eventually for a self hosted solution. There are some issues with Headscale and I don’t want to punch holes in firewall if I can avoid it. Still thinking on it.

    PPS: Meshtastic, Reticulum etc all seem super cool…but until there’s interoperability simple enough for normies…good luck getting buy in. I struggle to convince the fam to use XMPP (weird issues with android clients, Tailscale drop outs etc).

  • femtek@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    12 days ago

    I just setup fluxer selfhosted, using it for alerts from monitoring things but once I make everything is good and stable I was going to let the discord communities I’m in about it.

    • jabberwockiX@piefed.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 days ago

      I just set up fluxer as well. It was pretty easy. I need to figure out the TURN server part for calls and video. Fluxer is in my home lab behind pangolin. I haven’t figured out how to do the TURN part yet. I have a VPS that it will likely run on, but getting it thorough pangolin is a bit of a process apparently.

  • TheMightyCat@ani.social
    link
    fedilink
    English
    arrow-up
    3
    ·
    12 days ago

    I host a matrix tuwunel server and can recommend it.

    My motivations are that it gives greater control, and i think federated platforms are better.

    I have it set up on a hetzner vps running debian, which tuwunel provides an official package for.