Self hosted instances - Lemmy.world

I am considering creating my own lemmy instance as my current instance (lemmy.world) is often down, and I enjoy this kind of a project. That being said I haven’t been able to find any resources on hw needed for this? If I have a raspberry pi 4b 8g with 128gb is that enough for just me using it? Do I need to pay for a cloud server to host it? How can federation work if I only have <10 users tops? Anything else I might need to know?

You’ll be fine, it’s pretty light on resources. Your internet connection (bandwidth and stability) is really the biggest factor

Lemmy doesn’t require a lot of resources to run smoothly, especially for instances with a low number of users.

If you don’t want to manage a single user instance you can join someone’s instance (like mine, I am the only one in my instance)

Hello! I did the same thing, and this is my first post on my instance!

I just put it on an old computer with 8GB of RAM, a HDD, and an old i5. Its running great so far.

One disapointment for me is viewing “all”. Since im the only one on my instance, the only communities I see are the ones im subscribed to. Let me know if you find a way around this please!

Can you elaborate on the issue with viewing all? If I just want to scroll and see stuff will I be bc able to see anything across the fediverse that I am federated with or is it really only stuff I am subbed to?
Servers only receive content from communities that at least one user on them is subbed to. Servers do not download the entire fediverse, only the bare minimum to cover what the users on it have asked for.
I’ve heard instances are using some sort of bot to “discover” communities
GitHub Link for one of those bots, which mentions in the README that there are similar bots here and here
GitHub - jheidecker/lemmony: A better "All" browsing experience for Lemmy instances

A better "All" browsing experience for Lemmy instances - GitHub - jheidecker/lemmony: A better "All" browsing experience for Lemmy instances

GitHub
Indeed. [email protected] is my community for, well, testing has 63 subscribers. One is me, the rest are bots that managed to find the community.
I was using this for getting content to my instance: github.com/lflare/lemmy-subscriber-bot
GitHub - lflare/lemmy-subscriber-bot: Lemmy Subscriber Bot (LSB) for easy community federation :)

Lemmy Subscriber Bot (LSB) for easy community federation :) - lflare/lemmy-subscriber-bot

GitHub
About the same hardware, works wonders (especially after migrating to 0.18.3).

I’ve found the biggest thing isn’t any real resource. My instance runs on a core 2 duo with 4GB of RAM, and I really try to get it to waste memory and barely fill the 4GB.

The thing is your instance will be blasted by all the other instances you subscribe to. If you subscribe to too many big communities you might find you’re locked out during peak times, but it should be just fine as long as you’re not crazy with follows like I am lol

Consider object storage for pictures, that’s all I can say. That, and the community seeder bot is extremely helpful.
Is there a guide on setting up object storage?
It’s thru pictrs, but yes. This is a solid guide that explains how to do it out of the box without migration. literature.cafe/post/67882 <- (copy this link into the search of your instance, it’ll federate it over)
Pro-tip: Self-hosting Lemmy? You can use object storage to back pict-rs (image hosting) to save a lot of money - literature.cafe

Just thought I’d share this since it’s working for me at my home instance of federate.cc [http://federate.cc], even though it’s not documented in the Lemmy hosting guide. The image server used by Lemmy, pict-rs, recently added support for object storage like Amazon S3, instead of serving images directly off the disk. This is potentially interesting to you because object storage is orders of magnitude cheaper than disk storage with a VM. By way of example, I’m hosting my setup on Vultr, but this applies to say Digital Ocean or AWS as well. Going from a 50GB to a 100GB VM instance on Vultr will take you from $12 to $24/month. Up to 180GB, $48/month. Of course these include CPU and RAM step-ups too, but I’m focusing only on disk space for now. Vultr’s object storage by comparison is $5/month for 1TB of storage and includes a separate 1TB of bandwidth that doesn’t count against your main VM, plus this content is served off of Vultr’s CDN instead of your instance, meaning even less CPU load for you. This is pretty easy to do. What we’ll be doing is diverging slightly from the official Lemmy ansible setup [https://github.com/LemmyNet/lemmy-ansible] to add some different environment variables to pict-rs. After step 5, before running the ansible playbook, we’re going to modify the ansible template slightly: cd templates/ cp docker-compose.yml docker-compose.yml.original Now we’re going to edit the docker-compose.yml with your favourite text editor, personally I like micro but vim, emacs, nano or whatever will do… favourite-editor docker-compose.yml Down around line 67 begins the section for pictrs, you’ll notice under the environment section there are a bunch of things that the Lemmy guys predefined. We’re going to add some here to take advantage of the new support for object storage in pict-rs 0.4+ [https://git.asonix.dog/asonix/pict-rs/#user-content-filesystem-to-object-storage-migration]: At the bottom of the environment section we’ll add these new vars: - PICTRS__STORE__TYPE=object_storage - PICTRS__STORE__ENDPOINT=Your Object Store Endpoint - PICTRS__STORE__BUCKET_NAME=Your Bucket Name - PICTRS__STORE__REGION=Your Bucket Region - PICTRS__STORE__USE_PATH_STYLE=false - PICTRS__STORE__ACCESS_KEY=Your Access Key - PICTRS__STORE__SECRET_KEY=Your Secret Key So your whole pictrs section looks something like this: https://pastebin.com/X1dP1jew [https://pastebin.com/X1dP1jew] The actual bucket name, region, access key and secret key will come from your provider. If you’re using Vultr like me then they are under the details after you’ve created your object store, under Overview -> S3 Credentials. On Vultr your endpoint will be something like sjc1.vultrobjects.com [http://sjc1.vultrobjects.com], and your region is the domain prefix, so in this case sjc1. Now you can install as usual. If you have an existing instance already deployed, there is an additional migration command you have to run to move your on-disk images into the object storage. [https://git.asonix.dog/asonix/pict-rs/#filesystem-to-object-storage-migration] You’re now good to go and things should pretty much behave like before, except pict-rs will be saving images to your designated cloud/object store, and when serving images it will instead redirect clients to pull directly from the object store, saving you a lot of storage, cpu use and bandwidth, and therefore money. Hope this helps someone, I am not an expert in either Lemmy administration nor Linux sysadmin stuff, but I can say I’ve done this on my own instance at federate.cc [https://federate.cc] and so far I can’t see any ill effects. Happy Lemmy-ing!

Is this ok to do for an instance already running?

copying the link to the search bar just shows me this post in search. What is it supposed to do?

It should be? It’s supposed just show a link to this post -> lemmy.federate.cc/post/4824
Pro-tip: Self-hosting Lemmy? You can use object storage to back pict-rs (image hosting) to save a lot of money - federate.cc

Just thought I’d share this since it’s working for me at my home instance of federate.cc [http://federate.cc], even though it’s not documented in the Lemmy hosting guide. The image server used by Lemmy, pict-rs, recently added support for object storage like Amazon S3, instead of serving images directly off the disk. This is potentially interesting to you because object storage is orders of magnitude cheaper than disk storage with a VM. By way of example, I’m hosting my setup on Vultr, but this applies to say Digital Ocean or AWS as well. Going from a 50GB to a 100GB VM instance on Vultr will take you from $12 to $24/month. Up to 180GB, $48/month. Of course these include CPU and RAM step-ups too, but I’m focusing only on disk space for now. Vultr’s object storage by comparison is $5/month for 1TB of storage and includes a separate 1TB of bandwidth that doesn’t count against your main VM, plus this content is served off of Vultr’s CDN instead of your instance, meaning even less CPU load for you. This is pretty easy to do. What we’ll be doing is diverging slightly from the official Lemmy ansible setup [https://github.com/LemmyNet/lemmy-ansible] to add some different environment variables to pict-rs. After step 5, before running the ansible playbook, we’re going to modify the ansible template slightly: cd templates/ cp docker-compose.yml docker-compose.yml.original Now we’re going to edit the docker-compose.yml with your favourite text editor, personally I like micro but vim, emacs, nano or whatever will do… favourite-editor docker-compose.yml Down around line 67 begins the section for pictrs, you’ll notice under the environment section there are a bunch of things that the Lemmy guys predefined. We’re going to add some here to take advantage of the new support for object storage in pict-rs 0.4+ [https://git.asonix.dog/asonix/pict-rs/#user-content-filesystem-to-object-storage-migration]: At the bottom of the environment section we’ll add these new vars: - PICTRS__STORE__TYPE=object_storage - PICTRS__STORE__ENDPOINT=Your Object Store Endpoint - PICTRS__STORE__BUCKET_NAME=Your Bucket Name - PICTRS__STORE__REGION=Your Bucket Region - PICTRS__STORE__USE_PATH_STYLE=false - PICTRS__STORE__ACCESS_KEY=Your Access Key - PICTRS__STORE__SECRET_KEY=Your Secret Key So your whole pictrs section looks something like this: https://pastebin.com/X1dP1jew [https://pastebin.com/X1dP1jew] The actual bucket name, region, access key and secret key will come from your provider. If you’re using Vultr like me then they are under the details after you’ve created your object store, under Overview -> S3 Credentials. On Vultr your endpoint will be something like sjc1.vultrobjects.com [http://sjc1.vultrobjects.com], and your region is the domain prefix, so in this case sjc1. Now you can install as usual. If you have an existing instance already deployed, there is an additional migration command you have to run to move your on-disk images into the object storage. [https://git.asonix.dog/asonix/pict-rs/#filesystem-to-object-storage-migration] You’re now good to go and things should pretty much behave like before, except pict-rs will be saving images to your designated cloud/object store, and when serving images it will instead redirect clients to pull directly from the object store, saving you a lot of storage, cpu use and bandwidth, and therefore money. Hope this helps someone, I am not an expert in either Lemmy administration nor Linux sysadmin stuff, but I can say I’ve done this on my own instance at federate.cc [https://federate.cc] and so far I can’t see any ill effects. Happy Lemmy-ing!

The only comment I’d add here is that you should make sure you have a real domain, that you’ve paid actual money to, when setting this up. ActivityPub assumes the domain is immutable, and the free dynamic domain names you can get (or free TLDs like, say, .ml was) are a bad choice. Spend the $10 or whatever, because if something happens to your domain name, you cannot just update it in the database and fix federation: it completely breaks everything in a way that’s not repairable.
Shit good to know.
You're welcome to join my https://dmv.pub Kbin instance. It federates with Lemmy.
dmv.pub - DC/Maryland/Virginia on the Threadiverse

DC/Maryland/Virginia on the Threadiverse

I was originally going to host my instance on my own hardware but decided to use a $6/mo droplet on DigitalOcean. Seems to work well enough for me and my LCS bot. Picked up a domain off Google Domains for $20/year or so. It’s been a fun project and I’ve learned a lot along the way.
GitHub - Fmstrat/lcs: Lemmy Community Seeder (LCS)

Lemmy Community Seeder (LCS). Contribute to Fmstrat/lcs development by creating an account on GitHub.

GitHub
As far as I know, there is no current arm Docker image for your Raspi 4. You could rent a cloud server. E.g. Hetzner. I use the CX21. It runs very efficiently for me.

I run my instance on a Quartz 64 with 8GB of RAM and a 128GB SSD. Works just fine.

On my instance there are two users, one being myself and the other one beein a seeder bot. It automatically pulls top communities and posts from other instances to keep the feed fresh. For this I wrote my own script, if you’d like to have it I can post it here or you can just use an already available project like this: LCS

Like that my post is always full with enough posts to keep me reading.

Quartz64

PINE64