194

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?

you are viewing a single comment's thread
view the rest of the comments
[-] NeoNachtwaechter@lemmy.world 33 points 1 year ago

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

[-] cyberpunk007@lemmy.ca 28 points 1 year ago

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.

[-] VonReposti@feddit.dk 28 points 1 year ago

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

[-] tristan@aussie.zone 10 points 1 year ago

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

[-] Valmond@lemmy.mindoki.com 2 points 1 year ago

You should think before releasing dangerous information on the internet!

You can get a 2core 8GB / 240GB for 75€!!

Uh oh, I think I'll have to buy one now...

[-] tristan@aussie.zone 3 points 1 year ago* (last edited 1 year ago)

This is my little setup at the moment. Each is 8500t CPU, 32gb ram, 2tb nvme and 1tb SATA SSD all running in a proxmox cluster

Edit: also check out Dell micro or the hp... Uh I want to say it's g6 micro? You might need to search for what is actually called

[-] Valmond@lemmy.mindoki.com 2 points 1 year ago* (last edited 1 year ago)

Not at all overkill? :-D

Future proofing or is it really used ? I don't know proxmox, is it some docker launcher thingy?

Very cool anyways!

[-] tristan@aussie.zone 2 points 1 year ago

Proxmox is like esxi, it lets you setup virtual machines. So you can fire up a virtual Linux machine and allocate it like 2gb ram and limit it to 2 cores of the CPU or give it the whole lot depending on what you need to do

Having them in a cluster let's them move virtual machines between the physical hardware and have complete copies so if one goes down the next can just start up

It is a little overkill, I'm probably only using about 20% of its resources but it's all for a good cause. I'm currently unable to work due to kidney failure but I'm working towards a transplant. If I do get a transplant and can return to work, being able to say "well this is my home setup and the various things I know how to do" looks a lot better than "I sat on my ass for the last 4 years so I'm very rusty"

This whole setup cost me about $1000aud and uses 65-70w on average

[-] Valmond@lemmy.mindoki.com 2 points 1 year ago* (last edited 1 year ago)

Hey good luck man!

Good idea, just sitting around isn't good for mental health either.

So back to tech :-) is it like docker / Kubernetes but with VM right? What's the good/bad things concerning VM Vs Docker?

BTW that's not a lot of power consumption!

And yeah if it's not overkill they you are morally obliged to search for ways to make it so, right :-) ?!

Cheers

[-] tristan@aussie.zone 1 points 1 year ago

Docker/kubernetes and VMS are similar in that they are all virtualisation but the similarity kinda end there. Love them or hate them, Each has its own important role in IT infrastructure.

First off, docker itself needs a host operating system to run. Secondly, Docker are containers. Each image is built on a cut down version of the operating system generally to perform one specific task or run one specific application. The environment is preconfigured to work exactly as intended so generally speaking, you don't get the whole "but it works on my machine"

Kubernetes I'm not the most qualified to speak to, but pretty much someone said "ok docker is great but we want redundancy, scalability, etc" and made kubernetes.

A vm is a full virtual machine. You can give it virtual harddisks, virtual network cards, etc. You then install a full operating system on it, could be windows or Linux or whatever you need.

From there you can install docker if that's what you want, or can install specific apps. This is the first difference, is if you install the app compared to a docker container, you need to make sure you have all the prerequisites met, all the correct compatibility, etc. It's up to you to make sure your system is correct for the software.

Another major difference is docker containers are all seen on the network as coming from whatever the host machine's IP is.

Whereas the network views each vm as it's own device on the network, giving each it's own IP (if using dhcp) and allowing things like vlans and things.

As for my setup, I have 3 VMs with docker servers, each with between 20-30 docker containers, 3 VMs running adguard DNS, 1 vm acting as a tailscale entry point, then a few application specific VMs. It's handy just being able to fire up a blank Ubuntu instance to play with me software, and if anything goes wrong just delete the whole machine and start fresh.

Then for storage behind it all, I have a qnap ts453d with 4x 8tb drives.

Then outside my home, I have 2 X Oracle hosted VMs, one hosting about 22 websites and all the stuff they need, one acting as a tunnel into my home services since I'm behind a CGNAT, and then another physical server located in the local data centre running email for a few small businesses and myself

[-] Valmond@lemmy.mindoki.com 2 points 1 year ago

Thank you for the thorough explanation!

I think a VM for me would only bf a windows on inux for like Photoshop and 3dsmax :-)

Docker though seems interesting for a simple user like me.

Thanks again !

Cheers

[-] tristan@aussie.zone 2 points 1 year ago

No worries, in terms of docker, if you want to see some of the more useful docker things along with explanation of how to get them running, check out https://noted.lol and https://mariushosting.com

Noted has a lot of writeups on various projects that are nearly entirely docker based. Marius focuses more on docker projects on Synology but for many of them you can go to the project home to get the generic docker instructions and just read his one for project descriptions and intially setup guides

[-] Valmond@lemmy.mindoki.com 1 points 1 year ago

So just laid my hands on a 55€ + 6.49€ Shipping Lenovo thinkcenter M 910Q I5 Vpro 6eme gen 8GB/256GB SSD

It's crazy. I mean not long ago all I could even dream about was expensive slow computers with small harddrives :-D

So I'll dedicate it to docker "stuff", thank you :-) I really like the docker idea, and running on like "any" Linux kernel (if I got that right) is so awesome. I have mostly had to work on windows at work and it's so both changing and closed system it's infuriating in the long run.

Thanks for the link to all the examples, I have to get to try it all out, but if I want to "dockerise" stuff myself, how do you decide like how do it access to the outside world, like I fire up a docker image which plays music (if that's even possible?) it has to have access to the disc, sound drivers, maybe interactive stuff etc on the host PC right?

Cheers

[-] tristan@aussie.zone 2 points 1 year ago

Congrats on your new slippery slope haha

ike I fire up a docker image which plays music (if that's even possible?) it has to have access to the disc, sound drivers, maybe interactive stuff etc on the host PC right?

So the main things you'll want to read up on for that are mounts. Mounts will let you attach files and folders from the host computer into the docker container that it sees as if it's inside the container.

A lot of docker apps will run a web host, so instead of accessing them like a normal application, you load up the website that's located at the IP address, and the exposed port. Then just like running Netflix or anything, it already has access to local sound and video devices through that

This also means that you can open them up to other computers/devices on the home network... so your phone could load it up and play music or your windows PC could, and it's all served from that docker container

If you're interested in hosting media, you could look into Plex or jellyfin, they are media servers that can stream self hosted videos, music and photos over the network.

There's a lot of other options that are more specific, and what's right for everybody else might not be right for you so it's worth playing around with various options

[-] Valmond@lemmy.mindoki.com 1 points 1 year ago

Running docker on my phone, now that seems crazy cool, but also obvious when you think about it (why didn't I think about it 😁).

I'm collecting my little 55€ Think Centre this lunch (6500T 8GB/256GB), we'll see what it will be used for but I guess dockers will sure play a part!

Cheers!

[-] tristan@aussie.zone 1 points 1 year ago
[-] Valmond@lemmy.mindoki.com 1 points 1 year ago

All too slow! My new job is taking a fair share of time, but I project getting back on track in a month or so. But I already have my Lemmy server, and I'm building a little "slow game" multiplayer with action points in python, so I'm not totally exhausted :-)

So how're you doing?

[-] tristan@aussie.zone 1 points 1 year ago

Yeah life tends to get in the way of hobbies like that.. as for me, I started the Linux foundation certified systems administrator course recently but only got a little into before my health went down and a few other things, but hopefully can get back into it soon

[-] Valmond@lemmy.mindoki.com 0 points 1 year ago

So how're you doing? Are you on sick leave (IDK where you live but lots of Americans(and lots of Americans on Lemmy) have huge problems with health problems, I mean over the problem itself)? A cheap Linux box can provide plenty of amusement if you like those kind of things!

[-] tristan@aussie.zone 2 points 1 year ago

I'm from Australia and on disability pension. And yeah, I have 3 Linux boxes to play with haha

[-] poVoq@slrpnk.net 2 points 1 year ago

Heh, this is awesome πŸ˜…

[-] tristan@aussie.zone 2 points 1 year ago

Thanks :D the frame and all parts are self designed and 3d printed... was a fun project

The whole thing runs from just 2 power cables with room for another without adding any extra power cables

[-] NeoNachtwaechter@lemmy.world 1 points 1 year ago

Lenovo tiny

Doesn't that mean, tiny fans howling all day long?

[-] synestine@sh.itjust.works 2 points 1 year ago

Only if you've got it cranking all day. I've got a couple of Tiny (they're Micro, which is the same thing) systems that are silent when idle and nearly silent when running less than a load avg of 5. It's only if I try to spin up a heavy, CPU-bound process that their singular fan spins fast enough to be noticable.

So don't use one as a Mining rig, but if you want something that runs x64 workloads at 9-20 watts continuously, they're pretty good.

[-] tristan@aussie.zone 1 points 1 year ago

Even running at full speed mine are pretty quiet but I also have 80mm silent low rpm fans blowing air across them too which seems to help

I also recently went through with fresh thermal paste

[-] user224@lemmy.sdf.org 7 points 1 year ago

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

[-] ChrisLicht@lemm.ee 2 points 1 year ago

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

[-] cyberpunk007@lemmy.ca 1 points 1 year ago

100%, and this is why businesses don't use laptops as servers... typically πŸ˜‚.

[-] tuff_wizard@aussie.zone 1 points 1 year ago

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

[-] nix@merv.news 8 points 1 year ago

How do you install security updates etc without restarting?

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

[-] VonReposti@feddit.dk 16 points 1 year ago

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

[-] Pringles@lemm.ee 2 points 1 year ago

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.

[-] Valmond@lemmy.mindoki.com 2 points 1 year ago

Good luck with that, I have all reboot options off but yesterday it just rebooted like that. Thanks MS.

[-] poVoq@slrpnk.net 3 points 1 year ago

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.

[-] avidamoeba@lemmy.ca 3 points 1 year ago* (last edited 1 year ago)

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.

[-] NeoNachtwaechter@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

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.

[-] ProtecyaTec@lemmy.world 5 points 1 year ago

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

[-] morras@links.hackliberty.org 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.

[-] bender@insaneutopia.com 7 points 1 year ago

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

[-] tinysalamander@lemmy.world 11 points 1 year ago

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.

[-] bender@insaneutopia.com 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@lemmy.world 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.

[-] jaybone@lemmy.world 1 points 1 year ago

Years? Lol you should update that software.

[-] HamsterRage@lemmy.ca 1 points 1 year ago

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.

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

Selfhosted

40383 readers
599 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 2 years ago
MODERATORS