this post was submitted on 16 Sep 2023
194 points (96.2% liked)

Selfhosted

40375 readers
485 users here now

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!

founded 1 year ago
MODERATORS
 

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?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 63 points 1 year ago (5 children)

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 :)

load more comments (5 replies)
[–] [email protected] 41 points 1 year ago

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.

[–] [email protected] 38 points 1 year ago (5 children)

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.

load more comments (5 replies)
[–] capy_bara 37 points 1 year ago (1 children)

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

[–] [email protected] 4 points 1 year ago (5 children)

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.

[–] [email protected] 10 points 1 year ago

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.

[–] [email protected] 6 points 1 year ago

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.

[–] lemcat 4 points 1 year ago

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.

load more comments (2 replies)
[–] NeoNachtwaechter 33 points 1 year ago (5 children)

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...

[–] [email protected] 28 points 1 year ago (1 children)

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.

[–] [email protected] 28 points 1 year ago (5 children)

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

[–] [email protected] 10 points 1 year ago (22 children)

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

load more comments (22 replies)
[–] [email protected] 7 points 1 year ago

Just set it to "do nothing" when lid is closed. That's all.

load more comments (3 replies)
[–] [email protected] 8 points 1 year ago (4 children)

How do you install security updates etc without restarting?

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

[–] [email protected] 16 points 1 year ago (2 children)

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

load more comments (2 replies)
load more comments (3 replies)
[–] ProtecyaTec 5 points 1 year ago (4 children)

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

[–] [email protected] 10 points 1 year ago

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.

[–] [email protected] 7 points 1 year ago (1 children)

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

[–] tinysalamander 11 points 1 year ago (1 children)

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.

[–] [email protected] 7 points 1 year ago

Ive been using esxi (free copy) for years. Same situation. Being able to spin up virtual machines or take a snapshot before a major change has been priceless. I started off with smaller nuc computers and have upgraded to full fledged desktops.

[–] PlutoniumAcid 3 points 1 year ago

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.

load more comments (2 replies)
[–] [email protected] 31 points 1 year ago

"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.

[–] [email protected] 29 points 1 year ago

Are people actually running their own actual self-hosted servers from home?

My lemmy instance is hosted in my basement

[–] [email protected] 21 points 1 year ago

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!

[–] MolochAlter 18 points 1 year ago (1 children)

Yep, big ol' case under my desk with some 20TB of storage space.

Most of what I host is piracy related 👀

[–] [email protected] 4 points 1 year ago (4 children)

how much of the 20tb is used?

[–] [email protected] 11 points 1 year ago (2 children)

Free space is wasted space

~19.5 tb of hardcore midget porn

~500 gigs of whale sounds to help me sleep

load more comments (2 replies)
load more comments (3 replies)
[–] thisisawayoflife 16 points 1 year ago

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.

[–] [email protected] 15 points 1 year ago (14 children)

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.

load more comments (14 replies)
[–] [email protected] 13 points 1 year ago (8 children)

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.

load more comments (8 replies)
[–] sparr 13 points 1 year ago

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, ...

[–] [email protected] 11 points 1 year ago (1 children)

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.

[–] surewhynotlem 13 points 1 year ago (2 children)

I'm starting to realize that jellyfin is a gateway drug to self-hosting. And I'm here for it.

load more comments (2 replies)
[–] [email protected] 11 points 1 year ago (2 children)

My "server" is just my old gaming PC that I slapped Ubuntu on.

[–] Spider89 7 points 1 year ago

My "Server" is a small 32bit ARM Orangepi.

load more comments (1 replies)
[–] [email protected] 10 points 1 year ago (1 children)

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.

load more comments (1 replies)
[–] [email protected] 8 points 1 year ago (6 children)

It's not strictly defined like that. Some people do, others don't.

load more comments (6 replies)
[–] BrightCandle 5 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 4 points 1 year ago

For me it does. I'm sure some other people use a VPS or something and self host using a cloud provider of some kind.

[–] [email protected] 4 points 1 year ago* (last edited 6 months ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
CGNAT Carrier-Grade NAT
DNS Domain Name Service/System
Git Popular version control system, primarily for code
HTTP Hypertext Transfer Protocol, the Web
IP Internet Protocol
LXC Linux Containers
NAS Network-Attached Storage
NAT Network Address Translation
Plex Brand of media server package
SATA Serial AT Attachment interface for mass storage
SSD Solid State Drive mass storage
VPN Virtual Private Network
VPS Virtual Private Server (opposed to shared hosting)
nginx Popular HTTP server

[Thread #139 for this sub, first seen 16th Sep 2023, 05:05] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 4 points 1 year ago (2 children)

I pay Dreamhost for a beef pc VPS, that's what "selfhosted" means to me. I host all kinds of shit on it.

load more comments (2 replies)
load more comments
view more: next ›