Does "Selfhosted" mean you actually have a server at home?
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?
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 :)
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
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
The right way (tm) 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.
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.
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.
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.
"Self-hosted" means you are in control of the platform. That doesn't mean you have to own the platform outright, just that you hold the keys.
Using a VPS to build a Nextcloud server vs using Google Drive is like the difference between leasing a car and taking a taxi. Yes, you don't technically own the car like you would if you bought it outright, but that difference is mostly academic. The fact is you're still in the driver's seat, controlling how everything works. You get to drive where you want to, in your own time, you pick the music, you set the AC, you adjust the seats, and you can store as much stuff in the trunk as you want, for as long as you want.
As long as you're the person behind the metaphorical wheel, it's still self-hosting.
I'm sure the original spirit of selfhosting is actually owning the hardware (whether enterprise- or consumer-grade) but depending on your situation, renting a server could be more stable or cost effective. Whether you own the hardware or not, we all (more or less) have shared experiences anyway.
Where I live, there are some seasons wherein the weather could be pretty bad and internet or electricity outages can happen. I wouldn't mind hours or even days of downtime for a service whose users are only myself or a few other people (i.e. non-critical services) like a private Jellyfin server, a Discord bot, or a game server.
For a public Lemmy server, I'd rather host it on the cloud where the hardware is located in a datacenter and I pay for other people to manage whatever disasters that could happen. As long as I make regular backups, I'm free to move elsewhere if I'm not satisfied with their service.
As far as costs go, it might be cheaper to rent VMs if you don't need a whole lot of performance. If you need something like a dedicated GPU, then renting becomes much more expensive. Also consider your own electricity costs and internet bills and whether you're under NAT or not. You might need to use Cloudflare tunnels or rent a VPS as a proxy to expose your homeserver to the rest of the world.
If the concern is just data privacy and security, then honestly, I have no idea. I know it's common practice to encrypt your backups but I don't know if the Lemmy database is encrypted itself or something. I'm a total idiot when it comes to these so hopefully someone can chime in and explain to us :D
For Lemmy hosting guides, I wrote one which you can find here but it's pretty outdated by now. I've moved to rootless Docker for example. The Lemmy docs were awful at the time so I made some modifications based on past experiences with selfhosting. If you're struggling with their recommended way of installing it, you can use my guide as reference or just ask around in this community. There's a lot of friendly people who can help!
Some stuff is just better hosted in a proper data center. Like mail, DNS or a search engine. Some stuff, like sensitive data, is better hosted on your own hardware in your home.
There are definitely benefits on running a server at home but you could say the same of a VPS. As long as you control it, it is self hosted in my book.
Not really, you're ideally paying for a server that you have complete control of. The differences are mostly just fundamental limitations.
Example: if you're hosting off site, you will always be connecting remotely, so your access depends on a network connection. If you're hosting at home then your stuff is still accessible when your internet goes down
@[email protected] not sure what that means but I guess you can do certain thing in your home server not allowed on a VPS. OTOH, an email server at home for example is much more difficult to achieve because your ISP most likely won’t allow you to open port 25
It is, if you can host at home and use a cheap vps as proxy is better in my opinion. Like it or not when you host something you will put sensitive info in your vps and ofc you should trust them. Exactly like the vpn providers, they will fight for your rights paying 5 dolars/months? For sure no.
Certain cloud providers are as secure, if not more secure, than a home lab. Amazon, Google, Microsoft, et al. are responding to 0-day vulnerabilities on the reg. In a home lab, that is on you.
To me, self-hosted means you deploy, operate, and maintain your services.
Why? Varied...the most crucial reason is 1) it is fun because 2) they work.
Listing Microsoft cloud after their recent certificate mess is an interesting choice.
Also, the "cloud responds to vulnerability" only works if you're paying them to host the services for you - which definitely no longer is self hosting. If you bring up your own services the patching is on you, no matter where they are.
If you care about stuff like "have some stuff encrypted with the keys in a hardware module" own hardware is your only option. If you don't care about that you still need to be aware that "cloud" or "VPS" still means that you're sharing hardware with third parties - which comes with potential security issues.
Well with bare metal yes, but when your architecture is virtual, configuration rises in importance as the first line of defense. So it’s not just “yum —update” and reboot to remediate a vulnerability, there is more to it; the odds of a home lab admin keeping up with that seem remote to me.
Encryption is interesting, there really is no practical difference between cloud vs self hosted encryption offerings other than an emotional response.
Regarding security issues, it will depend on the provider but one wonders if those are real or imagined issues?
Most people who "self host" things are still doing it on a server somewhere outside their home. Could be a VPS, a cloud instance, colocated bare metal, ...
I have a salvaged HP 3500 Pro with an HTPC case and 8.5 TB storage. Started mainly for Jellyfin and now have half a dozen docker containers on it. Great test bed for getting used to linux before I slowly creep towards having it as my main OS on my PC.
That's how it started with me. Now I have the arr stack and a bunch of other stuff running. It's definitely been a fun learning experience. It's a lot nicer just giving the wife a jellyseerr icon on her phone instead of her giving me a long list of stuff she wants and I have to find them.
No that's a homelab. Selfhosted applies to the software that you install and administrate yourself so you have full control over it. If it was about running hardware at home we'd see more posts about hardware.
I would say that a homelab is more about learning, developing, breaking things.
Running esoteric protocols, strange radio/GPS setups, setting up and tearing down CI/CD pipelines, autoscalers, over-complicated networks and storage arrays.
Whereas (self)hosting is about maintaining functionality and uptime.
You could self-host with hardware at home, or on cloud infra. Ultimately it's running services yourself instead of paying someone else to do it.
I guess self-hosting is a small step away from earning money (or does earn money). Reliable uptime, regular maintenance etc.
Homelabbing is just a money sink for fun, learning and experience. Perhaps your homelab turns into self-hosting. Or perhaps part of your self-hosting infra is dedicated to a lab environment.
Homelab is as much about software as it is about hardware. Trying new filesystems, new OSs, new deployment pipelines, whatever
It's easier and quicker to start with a VPS and most people do that. On the low end it is usually also cheaper (unless you already have or can get second hand hardware almost for free).
However, if you are starting to get higher storage and compute needs, currently especially also GPU compute, hosting from home can be very interesting as it is much cheaper in the longer term and the hardware side is interesting to learn as well.
I do both. I have a custom built NAS based on a Ryzen 3600 and ZFS across 4 drives which runs about 20 self hosted applications and stores the majority of my files but its only accessible from within the home. I also rent a small VPS for personal webspace and hosting self hosted apps I want out of the house.
In the past I have also hosted raw servers from Hetzner or bigger VPS from Amazon for the purpose of hosting a game server. Alongside those I often had community applications like website, forums, wikis and custom chat and voice comms services.
Its all self hosting to me since I run it. The various options are all about the trade offs of security, accessibility, cost and performance. The cheaper cloud options when you add it up can be cheap compared to buying and running your own hardware when you take into account electrical costs and the likely hardware replacement needs within 5 years. The big cloud providers aren't price competitive but Contabo/Hetzner really surprisingly are especially if you pay a lot for electricity. But then if you need a game server it can be quite hard to find good fast CPUs on the cloud and its not going to be 24/7 for communities, so the trade off flips back to having your own.
Since I got 1 gbit/s fibre internet my need for internal NAS has definitely reduced as the internet is nearly as fast as the local network so I could now have my NAS needs remote.
I do not think that self-hosting necessarily means that you have to host it at home. As others have pointed out, its more about hosting it on hardware you control.
I do think there is certainly a trust factor involved if you host stuff on hardware that you don't own, but at the end of the day only you can deem whom you can trust. For example, I rent a couple of dedicated servers from a provider, but I also have a pretty good personal connection with the owner of that provider - so I have no concerns about the safety of my data. In general, I tend to just be pretty conscientious about what data is going to any server, and anything that I wouldn't want falling into the wrong hands doesn't leave my house unless I can guarantee its safety (with the likes of encryption and such).
I do also keep in mind that with the various providers out there, reputation is paramount to them (or at least, the good ones) so it is generally in their best interest to say, let someone walk into their datacenter and just start ripping the drives from your systems.
I ran one for a few months until I woke up one morning and it wasn't working. As I was the only person using it, I didn't bother to troubleshoot and just signed up for an account at lemmy.world.
If you want to run your own I recommend you check out the ansible install route. It's really simple and straightforward once you wrap your head around ansible.
I consider selfhosting to be both. VPS or homelab. The latter has more 'cred' but is also a much bigger investment and not everyone can do it. Granted I'm living in a difficult environment but as somebody using Linux since 1994 it took me 3 years to recently get a homelab to where I could credibly serve the wider internet from it, and I still use a VPS as reverse proxy anyway! Meanwhile, offloading your physical plant to a mom-n-pop platform-as-a-service provider isn't the worst thing in the world. Some operators started out selfhosting and grew their little VPS provider from that, those guys need business too!
I don't know about the history of selfhosted, I use a vps at hetzner which serves as playground and I use a mini desktop (hp elitedesk) as my home automation lab.
This community is an inspiration on spotting new techniques and software to discover!
Hey, I love this thread, and I am intrigued by the term "futureproof"ing. can someone direct me to a thread where local networks are self-hosted and the human element of organizing the network is discussed? Thank you. If I don't come back, it's because I'm new to Lemmyworld and got lost.
Running on a synology, but it's not cheap. I like having direct access to my stuff if I can. Next step is cloud backup of my local , i think borg or something is very popular.
I'm going to say that self hosting becomes a fun hobby once you get your core services running. Core in this case means the services that are bringing you into selfhosting.