So you want to know how we host lemmy?

I bought a server for 12 months, cloned this repository, edited the smtp details, modified the host vars, and ran the deploy!

The lemmy stack uses nginx, docker, and certbot. Inside docker it runs, lemmy, lemmy-ui, pictrs, postgresql, and postfix.

For our CDN we are using the “dreaded” cloudflare for caching. Here’s a pretty picture of our analytics for the past 7 days (the whole life time of reddthat.com):
Screenshot of cloudflare analytics Incase you hate me for using cloudflare, don’t worry I don’t like using it either, but it’s free for the time being. We are planning to move to BunnyCDN once we become funded. We’ve enabled Strict SSL to ensure all communications are secure. We also allow Tor users to access the site, and have our cloudflare “security” setting to minimal.

We are using UptimeRobot for our status page; status.reddthat.com.

Emails are hosted via my Mailcow instance.

The git repo linked here has been forked to a git repo and I’ll be looking at making some changes in the coming days. Mainly to add the nginx configuration to be part of the code as well. It will then be completely under code, not just partly under code as it is now.
This is a gitea instance utilising gitea_runners, so once I get that done, I’ll be creating gitea actions for:

  • Adding renovate to automatically check for new versions of the docker files and notify of passing tests
  • Once the PR is merged, automatically deploy it.

& that’s about it.

Tiff

  • grabthar
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    Wow! Thanks for posting this. I was wondering how you got this set up. I can’t help but think this is expensive to run. If you have time, I’m really curious how you plan to sustain the service economically. This has to cost money to run and I suspect those costs will increase as more people join.

    I totally understand if you’re too busy just getting this thing bootstrapped to respond. Thanks again for setting up this instance.

    • TiffOPMA
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      We have an Open Collective which shows our current expenses and goals. The link should be on the sidebar on the main page. (I need to put in our server expenses thanks for the reminder)

      I have a great relationship with our current infrastructure host as I have other infrastructure hosted with them as well, so I got a great deal.

      Our current costs are A$120 per year for a 2 core, 4gb VPS with 60gb of space.
      Even after a week I can see this server may not be adequate for our needs, mainly in the space department. As more and more pictures are added, we will need to move pictrs off to its own server at some point but that is easy and I have a good idea on loadbalancing it.

      Another option depending on funds is to migrate the images to an object storage solution such as Backblaze B2, or wasabi. I am reluctant to do that due to the amount of $ it can waste on storage, the more storage the more expensive it gets per month and I cannot foot the bill forever.

      These are the hard costs of what happens when people not only join our server but just federate with others. I think for some federated content we store a thumbnail on our server as well.
      I am not doing this currently for money, and as you can see a breaking even point is within our reach.
      If we have 4 people donate a coffee a month we would be funded! If we end up having 40 people contributing a coffee a month that is a dedicated server in a colocation and I could buy an 8TB drive and send it to them!

      There are so many options, but they all come with a cost. I can do a lot on a shoe string budget as I do that for $work on a daily basis :P

      Cheers
      Tiff

      • MentallyExhaustedM
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 months ago

        I have about 20TB free on my home server. I assume that you’d prefer to keep the infrastructure in the cloud, but please let me know if you need a temp dumping ground, archive, backup, etc. – happy to contribute.

        • TiffOPMA
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          11 months ago

          Thanks for the offer! I’ll let you know if I need it. Might be useful for a secondary encrypted backup but they are tiny at the moment.
          Biggest issue will be object storage, but for USD$60/year we can host 1TB of images (& possibly videos) via Backblaze. So as long as we use cloudflare (which we already are) the egress fees are $0 because of their bandwidth alliance.

  • hexed
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Hi Tiff, I was wondering if you might have an idea about this: I deployed an instance using this ansible playbook. When I install the Android PWA for my instance the app name is “New Site” and the icon is the default Lemmy icon. I noticed that Reddthat’s PWA seems to work fine, so I thought you might know how to resolve. Thanks!

    • TiffOPMA
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      Hey hexed,
      I think it’s to do with the favicon? I had the same issue when I originally setup the site.
      After adding & removing over a couple of days it ended up working.
      Not entirely sure why it started working but it did.

      • hexed
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        Huh, weird. I’ll try uploading a new icon and pray. Thanks!