What exactly is the cost of self hosting a Lemmy instance? Understandably you would want a powerful server, but that would be just a single one time purchase.

Where does the rest of the cost come in? Does it require more than a 2 gigabit connection and thus require a data centers 10 gigabit connection?

If I could run an instance on 2 gigabits and spending a 1-3 thousand on a server then I’d be interested in giving it a try.

  • falcon15500@lemmy.nine-hells.net
    link
    fedilink
    English
    arrow-up
    14
    ·
    1 year ago

    Depending upon how many users you are looking to host, Lemmy instances are not very taxing. Most instances are on quite modest hardware.

    • binwiederhier@discuss.ntfy.sh
      link
      fedilink
      English
      arrow-up
      11
      ·
      1 year ago

      I host an instance for myself. I have subscribed to many communities (10-20), and I run it on a 1 CPU + 1 GB RAM DigitalOcean droplet. However, the Lemmy instance was OOM-killed already once, and I expect that I have to upgrade eventually.

      The droplet costs $6/month.

      • homelabber@lemmy.one
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        That’s strange, from what I’ve read a VPS like that should be able to handle at least 20 concurrent users.

        Are you running anything else on the VPS?

          • homelabber@lemmy.one
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            Really weird. Might be a bug.

            I can’t find anyone else reporting memory usage problems. Maybe you could ask in the support community and see if anyone else has encountered the same problem.

            Your VPS should be more than enough and you shouldn’t have to spend more money because of a software issue.

        • binwiederhier@discuss.ntfy.sh
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 year ago

          “If you need to use the swap, you’re doing it wrong” – That’s what I learned long ago. And it has held up so far.

          • Dax87@forum.stellarcastle.net
            link
            fedilink
            English
            arrow-up
            6
            ·
            1 year ago

            Interesting. I’ve never heard that. I use swap all the time and it’s saved me from OOM scenarios. I’m currently limited on RAM so maybe it makes more sense for my situation.

            • vividspecter@lemmy.world
              link
              fedilink
              English
              arrow-up
              5
              ·
              1 year ago

              zram and other compressed swap approaches can help too (with less of a performance hit) although I use real swap as a fallback. Some would recommend using zswap in that case, but I still want compression in ram to be heavily prioritised but YMMV.

            • th3raid0r@tucson.social
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 year ago

              Right? Like, my “first” machine had 512MB of ram in an era where most people were running 4GB. SWAP made more modern distributions possible for me. I mean, then again, that wasn’t so much a choice than the harsh reality of growing up broke!

              (My ACTUAL first machine was more like 64MB, but I never did much with it)

            • binwiederhier@discuss.ntfy.sh
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 year ago

              I have a laptop with an NVMe drive, and even using a swap on NVMe is orders of magnitude slower than RAM. Usually as soon as you have to swap, everything grinds to a halt quickly, and more stuff stacks up. You can decide for yourself, if you’d rather die a slow death or a quick death.

              • Dax87@forum.stellarcastle.net
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 year ago

                Yeah I definitely get that. By default, swap is supposed to be secondary to ram, usually swappiness is configured that way. I was not implying that swap was a replacement for RAM, just that it might save you from OOM situations in exchange for some performance dips.

            • th3raid0r@tucson.social
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              Right? Like, my “first” machine had 512MB of ram in an era where most people were running 4GB. SWAP made more modern distributions possible for me. I mean, then again, that wasn’t so much a choice than the harsh reality of growing up broke!

              (My ACTUAL first machine was more like 64MB, but I never did much with it)

  • Korgen@lemmy.korgen.xyz
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 year ago

    Depends how many people you are hosting for. But what you describe seems overkill, I think Lemmy.ml just upgraded to a 6 core cpu and 32gb of ram and they have 30k+ members.

  • empireOfLove@lemmy.one
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 year ago

    Not much at all.

    For a basic instance running <1k registered users, it seems the lemmy.ml instance survived a while with a quad core and some middling ram on a VPS. Really, connection bandwidth and/or CPU is not the bottleneck with Lemmy since most heavy image/video content continues to be linked externally, it’s the database management to keep all comments and posts sorted correctly that takes resources. So you need storage IO and memory more than anything.

    Sure if you want to grow as large as lemmy.ml you will probably be needing a “dedicated server” with high expenses. However, I’d bet any old generic office PC, or even a Pi, can run most small instances easily if you have access to a 2-gig symmetrical connection.

  • Osayidan@social.vmdk.ca
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    I’m hosting a personal instance in my home rack on a VM of 1 CPU / 2GB RAM. My only concern is to see how fast the disk usage grows over time (years?) no idea yet if lemmy cleans up old content or not. I’d imagine not since that defeats the purpose.