I’m trying to see if I can host my own Fediverse instance for friends and family and I want to know what kind of device would be required. I’m an absolute beginner to self-hosting so I was wondering if I can start cheap (Raspberry Pi 2GB RAM is something I can definitely consider).

Also, can one device host multiple software? Like if I wanted both a WordPress instance and a Hubzilla instance or a Matrix/XMPP instance

  • 3dmvr@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    I have friendica, lemmy, gotosocial, and streams (hubzilla 2.0?, havent tried it yet) on one server and its not using much 8core 16gb from littlecreek look en up on lowendtalk signup and comment with invoice to double the ram, they have two deals one is 7$ a month, one is 9$ make sure you click the right listing since the 7$ one is the same exact specs, they also have 3.50 for 4core 8gb which is more than enough too

    • 3dmvr@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      I looked for deals for weaks before setlting there, seem to have a good rep, got 3 vps through them

  • dnzm@feddit.nl
    link
    fedilink
    arrow-up
    9
    ·
    3 days ago

    To start with the last question: yes, you can absolutely host more than one service on a single machine, resources permitting. The different services will each listen on a different (TCP) port, and you can front it all with a proxy which works a bit like a front desk, directing the incoming requests to the proper port, so foo.example.com gets directed to service A and bar.example.com gets directed to service B, and so on.

    The key part is “resources permitting”, because all those services need CPU cycles to run and memory to run in (not to mention storage). Especially RAM is critical; have too much running for the amount available, and your server has to “swap”, parking bits of ram to disk, use it for whatever has to run at that moment, and swap bits back. Storage is always vastly slower than memory, so this slows things down tremendously, to the point of the server feeling sluggish or frozen. If you run on a Pi that runs off of a microSD card, not only is your storage really, really slow, you’ll also severely limit its lifespan with swapping. So do invest in better storage, like a USB NVMe drive (not a regular USB thumb drive, as those are typically the same flash storage as sd cards). And see if you can get a pi with more RAM. There’s no such thing as having “too much RAM”.

    So, what to run? I don’t know about Hubzilla specifically, but their FAQ (under the “average hosting cost” header) says you should be fine — it’s just a PHP + database app. But with apps like these, it also depends on the actual use: if your family and friends start following a million people, that’s going to increase resource use. Keep in mind that over time, you’ll see storage increase slowly but surely, anyway, I’m running a single user GoToSocial instance for myself, and the database and cached images and whatnot amount to some 12GB of storage. I did mention getting extra and faster storage, right? ;) I know there’s folks hosting GoToSocial and snac on severely constrained hardware, like raspi zero (so far less powerful than what you have in mind), old routers and even their car radio…

    WordPress is just another PHP + database app, although it tends to scale somewhat shitty; if you’re not entirely tied to WordPress, you might look into different systems, maybe a static site generator that turns your pages into, well, static HTML files, which take next to no resources (CPU/RAM) to host.
    Synapse is a bit of a heavy thing (although it has gotten vastly better, the last couple of years), but it too is quite disk-heavy, so really don’t run this on SD cards.

    Point is: yes, you can absolutely start with a Pi. I’d try and get one with as much RAM as you can / are willing to spend, as you can’t upgrade it, and get some storage that’s faster and less prone to failing. But even 2GB will get you some way and you’ll learn a ton (aka “break stuff”) in the process!

    • absurdity_of_it_all@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      Thank you so much for the detailed response! I might be able to stretch out to 4GB RAM on the Pi

      I’ve been finding it a bit difficult to understand the hardware part of things. For example, the hubzilla FAQ you shared says 512M and not MB. Does that not refer to RAM?

      And I’ve also not been able to find any guides about the “levels” in hardware. If not the Pi, then what? How do I decide? How do I explore?

      • dnzm@feddit.nl
        link
        fedilink
        arrow-up
        2
        ·
        3 days ago

        Yep, the M is for mb, that’s for RAM in this case.

        As for levels… That’s not really that black and white, IMO, there’s no “best” platform, it’s always “it depends”. I think you’re fine with a pi, certainly for a while, and especially at the price point. Plenty of folks running fedi instances and Matrix off of 'em.

        The only thing that comes close and has good software support would be a second hand small form factor office PCs, like HP mini PCs or the Lenovo ThinkCentre. Might buy you some expandability down the road, but it’s slightly bigger, uses a bit more energy, choices. It depends.