I’m trying to better understand hosting a Lemmy Instance. Lurking discussions it seems like some people are hosting from the Cloud or VPS. My understanding is that it’s better to futureproof by running your own home server so that you have the data and the top most control of hardware, software etc. My understanding is that by hosting an instance via Cloud or VPS you are offloading the data / information to a 3rd party.

Are people actually running their own actual self-hosted servers from home? Do you have any recommended guides on running a Lemmy Instance?

63 points

Selfhosting is the act of hosting applications on “hardware you control”. That could be rented or owned, its the same to us. You could go out and buy a server to host your applications but there a few issues that you might run into that could prevent you from simply standing up a server rack in your spare room. From shitty ISPs to lack of hardware knowledge there are plenty of reasons to just rent a VPS. Either way youre one of us :)

permalink
report
reply
2 points

But you don’t control the hardware if you run it on a VPS?

permalink
report
parent
reply
3 points

You control the hardware you are provisioned and the software you run on it, which is enough for me. Unless you’re looking for a job in the server adminstration/maintenance field the physical hardware access component of it matters less IMO

permalink
report
parent
reply
3 points

You definitely don’t control the hardware. Someone else at some remote server farm or something does.

permalink
report
parent
reply
2 points

If your server has IPMI, there’s little difference between being there in person and not.

permalink
report
parent
reply
41 points

Self hosting basically means you are running the server application yourself. It doesn’t matter if it’s at home, on a cloud service or anywhere else.

I wouldn’t recommend hosting a social network like lemmy, because you would be legally responsible for all the content served from your servers. That means a lot of moderation work. Also, these types of applications are very demanding in terms of data storage, you end up with an ever growing dataset of posts, pictures etc.

But self hosting is very interesting and empowering. There are a lot of applications you can self host, from media servers (Plex, Jellyfin), personal cloud (like Google Drive) with NextCloud, blocking ads with pihole, sync servers for various apps like Obsidian, password manager BitWarden etc. You can even make your own website by coding it, or using a CMS platform like WordPress.

Check the Awesome Self-hosted list on GitHub, has a ton of great stuff.

And in terms of hardware, any old computer or laptop can be used, just install your favorite server OS (Linux, FreeBSD/OpenBSD, even Windows Server). You can play with virtualization too if you have enough horsepower and memory with ESXI or Proxmox, so you can run multiple severs at once on the same computer.

permalink
report
reply
38 points

Me, yes. But it’s still selfhosting if you do it on a VPS. And probably easier, too. I mainly do it at home, because I can have multiple large harddisks this way. And storage is kind of expensive in the cloud.

permalink
report
reply
2 points

Depending on where you are, a hard drive that runs 24/7 can cost you quite a bit of money (6$/month or even more for just the hard drive). If you consider the upfront cost of a hard drive, the benefit of hosting at home gets even smaller. Nvme is where you really save money hosting at home. Personally I do both, because cloud is cheap and you can have crazy bandwiths.

permalink
report
parent
reply
1 point
*

I know. You pretty much need to know what you’re doing. And do the maths. Know the reliability (MTBF/MTTF) and price. Don’t forget to multiply it by two (as I forgot) because you want backups. And factor in cost of operation. And corresponding hardware you need to run to operate those hdds. My hdd spins down after 5 minutes. I live in Europe and really get to pay for electricity as a consumer. A data center pays way less. My main data, mail, calendar and contacts, OS, databases and everything that needs to be there 24/7 fits on a 1TB solid state disk that doesn’t need much energy while idle. So the hdd is mostly spun down.

Nonetheless, I have a 10TB hdd in the basement. I think it was a bit less than 300€ back when I bought it a few years ago. But I can be mistaken. I pay about 0.34€/kWh for (green) electricity. But the server only uses less than 20W on average. That makes it about 4€ per month in electricity for me. And I think my homeserver cost me about 1000€ and I’ve had it since 2017. So that would be another ~15€ per month if I say I buy hardware for ~1100€ every 6 years. Let’s say I pay about 20€/month for the whole thing. I’m not going to factor in the internet connection, because I need that anyways. (And I probably forgot to factor in I upgraded the SSD 2 times and bought additional RAM when it got super cheap. And I don’t know the reliability of my hdds…)

I also have a cheap VPS and they’d want 76,27€/month … 915.24€ per year if I was to buy 10TB of storage from them. (But I think there are cheaper providers out there.) That would have me protected against hard disk failures. It’ll probably get cheaper with time, I can scale that effortlessly and the harddisks are spun up 24/7. The harddisks are faster ones and their internet connection is also way faster. And I can’t make mistakes like with my own hardware. Maybe having a hdd fail early or buy hardware that needs excessive power. And that’d ruin my calculation… In my case… I’m going with my ~20€/month. And I hope I did the maths correctly. Best bang for the buck is probably: Dont have the data 24/7 available and just buy an external 10TB hard drive if your concern is just pirating movies. Plug it in via USB into whatever device you’re using. And make sure to have backups ;) And if you don’t need vast amounts of space, and want to host a proper service for other people: just pay for a VPS somewhere.

permalink
report
parent
reply
1 point

You forgot something in your calculations, you don’t need a complete VPS for the *arrs. App hosting/seedboxes are enough for that and you can have them for very, very cheap.

permalink
report
parent
reply
37 points

I’d say there are levels to selfhosting. Hosting your stuff on the cloud is selfhosting, but hosting it on your own hardware is a more “pure” way of doing it imo. Not that it’s better, both have their advantages, but it’s certainly a more committed to the idelal

permalink
report
reply
4 points

I don’t know what hosting on the VPS should be called but it is definitely not self hosting. Since you are hosting your services on someone else’s servers. Didn’t it used to be called colo or something like that.

permalink
report
parent
reply
10 points

I thought colo was your hardware in someone else’s data center.

For me though a VPS is still self hosting because you own your applications data and have control over it.

You’re less beholden to the whims of a company to change the software or cut you off. With appropriate backups you should be able to move to a new cloud provider fairly easily.

permalink
report
parent
reply
6 points

I disagree. Selfhosting is not specific to hardware location for me. My own git server is definitely selfhosted, VPN, and so on.

I agree that having your own hardware at home is a more pure way of doing it, but I’d just call that a Homelab. I personally just combine both.

permalink
report
parent
reply
4 points

Of course it’s self hosting. The term “self hosting” just means being in control of the service or host yourself, as opposed to that being controlled by a third party.

It doesn’t mean the hardware has to be in your house. It just so happens that that is the majority preference, because people value privacy, and are often hosting private data.

permalink
report
parent
reply
3 points

Yup, it’s more like self administration or something like that

permalink
report
parent
reply
3 points

I’d like to pose the fact that VPSes and Hosted solutions are different as a rebuttle to what you’re saying. It’s pretty unreasonable to gate keep self hosting behind having the hardware running on a device you control.

permalink
report
parent
reply
33 points

actually have a server at home

I haven’t got any piece of hardware that was sold with the firstname “Server”.

But there’s this self-built PC in my room that’s running 24/7 without having to reboot in several years…

permalink
report
reply
28 points

Well technically a “server” is a machine dedicated to “serving” something, like a service or website or whatever. A regular desktop can be a server, it’s just not built as well as a “real” server.

permalink
report
parent
reply
28 points

There is though reasons to stray from certain consumer products for server equipment.

permalink
report
parent
reply
10 points

Yeah I’d stay away from Mac too… but seriously most modern laptops can disable any sleep/hibernation on lid close

My go to lately is Lenovo tiny, can pick them up super cheap with 6-12 month warranties, throw in some extra ram, a new drive, haven’t had any fail on me yet

permalink
report
parent
reply

Just set it to “do nothing” when lid is closed. That’s all.

permalink
report
parent
reply
2 points

FWIW, this free app solves for that issue well; I have several clammed Macs running it right now:

https://apps.apple.com/us/app/amphetamine/id937984704?mt=12

permalink
report
parent
reply
1 point

just break the screen off. call it a headless sever.

permalink
report
parent
reply
1 point

100%, and this is why businesses don’t use laptops as servers… typically 😂.

permalink
report
parent
reply
8 points

How do you install security updates etc without restarting?

Linux servers prompt you do restart after certain updates do you just not restart?

permalink
report
parent
reply
16 points

Enterprise distributuions can hot-swap kernels, making it unnecessary to reboot in order to make system updates.

permalink
report
parent
reply
2 points

Microsoft needs to get its shit together because reboots were a huge point of contention when I was setting up automated patching at my company.

permalink
report
parent
reply
3 points

You can just restart… with modern SSDs it takes less than a minute. No one is ging to have a problem with 1 minute downtime per month or so.

permalink
report
parent
reply
3 points
*

The right way ™ is to have the application deployed with high availability. That is every component should have more than one server serving it. Then you can take them offline for a reboot sequentially so that there’s always a live one serving users.

This is taken to an extreme in cloud best practices where we don’t even update any servers. We update the versions of the packages we want in some source code file. From that we build a new OS image contains the updated things along with the application that the server will run and it’s ready to boot. Then in some sequence we kill server VMs running the old image and create news ones running the new. Finally the old VMs are deleted.

permalink
report
parent
reply
2 points
*

install security updates etc without restarting?

Actually I am lazy with updates on the “bare metal” debian/proxmox. It does nothing else than host several vm’s. Even the hard disks belong to a vm that provides all the file shares.

permalink
report
parent
reply
5 points

Do you have any recommended resources for getting started? I do have a secondary PC…

permalink
report
parent
reply
10 points

First, you need a use-case. It’s worthless to have a server just for the sake of it.

For example, you may want to replace google photos by a local save of your photos.

Or you may want to share your movies accross the home network. Or be able to access important documents from any device at home, without hosting them on any kind of cloud storage

Or run a bunch of automation at home.

TL;DR choose a service you use and would like to replace by something more private.

permalink
report
parent
reply
7 points

Get a copy of vmware (esxi) or proxmox and load it on that secondary pc.

permalink
report
parent
reply
11 points

Proxmox absolutely changed the game for me learning Linux. Spinning up LXC containers in seconds to test out applications or simply to learn different Linux OSs without worrying about the install process each time has probably saved me days of my life at this point. Plus being able to use and learn ZFS natively is really cool.

permalink
report
parent
reply
3 points

The simple way is to Google ‘yunohost’ and install that on your spare machine, then just play around with what that offers.

If you want, you could also dive deeper by installing Linux (e.g.Ubuntu), then installing Docker, then spin up Portainer as your first container.

permalink
report
parent
reply
1 point

Years? Lol you should update that software.

permalink
report
parent
reply
1 point

Well, there are specific hardware configurations that are designed to be servers. They probably don’t have graphics cards but do have multiple CPUs, and are often configured to run many active processes at the same time.

But for the most part, “server” is more related to the OS configuration. No GUI, strip out all the software you don’t need, like browsers, and leave just the software you need to do the job that the server is going to do.

As to updates, this also becomes much simpler since you don’t have a lot of the crap that has vulnerabilities. I helped manage comuter department with about 30 servers, many of which were running Windows (gag!). One of the jobs was to go through the huge list of Microsoft patches every few months. The vast majority of which, “require a user to browse to a certain website” in order to activate. Since we simply didn’t have anyone using browsers on them, we could ignore those patches until we did a big “catch up” patch once a year or so.

Our Unix servers, HP-UX or AIX, simply didn’t have the same kind of patches coming out. Some of them ran for years without a reboot.

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 4.9K

    Monthly active users

  • 3.5K

    Posts

  • 75K

    Comments