DEV Community

Cover image for Why you should have a home server

Why you should have a home server

Paulo Henrique on March 31, 2024

Do you have multiple machines for working (your desk computer, a notebook, maybe a tablet)? Are you tired of keeping all of them updated with vario...
Collapse
 
anurag_vishwakarma profile image
Anurag Vishwakarma

I'm not arguing with you, and I understand even I have home lab setup but for beginners, setting up a home server is tricky due to potential security risks, complexity, resource overhead, and a steep learning curve. The main problem is cost vs performance vs backup. The more you build a bigger infrastructure by spending money, the more you need a reliable and potentially costly backup solution strategy. Ultimately, you'll likely end up looking at online backup solutions, which can get expensive for larger amounts of data. It's better to start with simpler projects, cloud services, or virtual environments to gain foundational knowledge and skills before attempting a more advanced home server setup that requires robust backup.

Collapse
 
phalkmin profile image
Paulo Henrique

And I agree with you, for a beginner, a home server can be more than a simple challenge. But maybe you are overengineering it? (which is ok, considering we are all devs and engineers here 🤷🏽‍♂️)

You don't need to go all-in on your home server. Start small with a *Pi or an old computer, just to have a main source of development on your network. Then make it big as needed/wanted.

I have 8TB of data locally stored, and it's cheaper than using a paid cloud solution. Also, I love to just go from my computer to the tablet and continue working when I'm at home. And I love to learn how the sausage is made and what happens if I change the sausage ingredients. OK, it works on my computer, why Vercel is complaining? Why the client's server is giving a fatal error? With a local server, I can create n+1 environments to test.

But, after all, I still use cloud services (drive, dropbox, github, etc.). One solution doesn't negate another.

"Oh, but for devs that started yesterday a home server is overkill". Yes, that's why I wrote "should" instead of "have to". 🥷🏽

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
anurag_vishwakarma profile image
Anurag Vishwakarma

What about if you have terabytes of data? How will you handle that via free tiers? The problem with free tiers is that your account will be terminated if you don't comply with the company policy. Also, don't forget about the egress data charges that cloud providers will impose. I read a post where a guy hosted all his data under Oracle's free tier without alternate backups. Accidentally, his account got terminated and he lost all his data. Oracle didn't even email him; they just banned the account. You can find the post on the subreddit r/selfhosted, something like this and as I said more server operating cost vs robust backup.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
anurag_vishwakarma profile image
Anurag Vishwakarma

Murphy's Law, 'Anything that can go wrong will go wrong, and at the worst possible time.' Keeping this in mind, for beginners, it's tricky and you can't depend on free tiers because, in the end, it's your data.

Thread Thread
 
akostadinov profile image
Aleksandar Kostadinov

Yeah, this Rolf guy is probably young and inexperienced. One can argue that for 99% of the people they use a single external drive and have no issue.

There are two kinds of people - those who do backup and those who never lost data.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
akostadinov profile image
Aleksandar Kostadinov

If you are taking notes, don't overlook the rest 80% of my post. Your original point of using percents was already logic defying. Now you're putting the least important part of my message in the spot light, trying to turn it personal as if I've said something bad or offensive about you.

There is nothing wrong to be inexperienced, let alone young. You can't always be right even if you are 90 years old.

Even if you are so sure in yourself, the very least you can learn is to agree to disagree. Arguing with random people on the internet is not productive.. although can be entertaining at times when used moderately.

Thread Thread
 
rolfstreefkerk profile image
Rolf Streefkerk

why this passive aggressive approach in the first place? I've positinioned my opinion and you call it immature.
You need to review how you communicate online and perhaps understand the argument i was making, because in my view you do not understand it and respond with arrogance instead.

Thread Thread
 
akostadinov profile image
Aleksandar Kostadinov

Now this is direct and to the point. I appreciate that, I'm not being sarcastic.

I surely didn't reply in the most peaceful way, I wouldn't call it passive aggressive though. I think it was slightly sarcastic (or are these the same?). In my view actually your previous replies (not this one, this one is cool) were passive aggressive and somehow arrogant and using manipulative logic, which I considered immature.

Just an explanation.. whether the best approach on my end was to be sarcastic - that's a different question. Maybe so, but probably not. Surely I can become a better person, and hopefully will become over time.

I think it's important thought not to take matter so seriously. Try looking objectively at our opinions, conduct, etc. and try to be as reasonable as possible in the future.

Thread Thread
 
phalkmin profile image
Paulo Henrique

no flame wars are allowed on this post, now virtually shake hands and let's all be friends

Image description

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
akostadinov profile image
Aleksandar Kostadinov

This is your opinion but obviously many people do not agree, including myself. And it has nothing to do with large data.

To setup any kind of server with personal information and/or information that you don't want to lose, without descent backup and security (including regular updates) is what perhaps 1% of the people know is a bad idea. This doesn't mean it is ok for the rest 99%. They may think it is though and your post is promoting such way of thinking.

Such a simple, insecure server as you propose might be suitable for a npm mirror or something that less than 0.1% of the people need.

That's the reason you've got negative feedback.

Thread Thread
 
phalkmin profile image
Paulo Henrique

Image description

Collapse
 
gunabalans profile image
Gunabalan.S

Indeed, free tiers can be beneficial. However, I primarily utilized my Google Drive for storing photos and also configured WhatsApp for backups. Unfortunately, on one occasion, while attempting to clear my WhatsApp backup, it cleared entire Google drive, except shared folder..

Collapse
 
akostadinov profile image
Aleksandar Kostadinov

Actually not for beginners only. I wanted a "home" server to keep at another site to make sure I didn't keep all my stuff at a single site.

Then securing the thing, access, backup/restore, deal with strange hw specifics (using a power efficient mini-computer which required some tweaks), etc.

I can't just put a machine somewhere without encryption and without a backup plan and put anything important on it.

Maintaining an important server is hard. Running some toy thing at home, I wouldn't call a server.

Collapse
 
ricovz profile image
Rico van Zelst

What are your main concerns regarding security risks? I have a home server, and it's not something I actively worry about right now. I have everything closed off to the outside, so I can only access any of the services through LAN.

While I don't use it for storage myself, I do use it for other things like Home Assistant, Journal and Vikunja.

Collapse
 
phalkmin profile image
Paulo Henrique

If it's not connected to the outside (open ports) security risk is low, probably a smart thingie has more security issues. If you keep some ports open or has http/https access (for HA maybe) you may need to check a proxy manager, a 2FA service, etc.

If you have a whole datacenter in your bedroom, good luck :P

Collapse
 
danbailey profile image
Dan Bailey

Honestly, most of what we ("we" as in "my family") run doesn't require massive dedicated boxes. I just have a fleet of Raspberry Pis handling individual tasks around the house. I have an RPi 4 to handle Homebridge (links non-HomeKit stuff into Apple's ecosystem), one to work as a Wifi router (with parental controls) for the kids' stuff, etc. Once we buy our new house next year, I'll be wiring the whole house with CAT6 ethernet and setting up a dedicated SAN for Time Machine backups, as well as a separate file/media server platform.

My Macbook Pro is my dev environment, and I have a couple of Linux-based VMs in Azure that I can spin up/down on an as-needed basis for testing before I deploy anything.

Collapse
 
steeve profile image
Steeve • Edited

Hi, good article to encourage beginners to get started on their servers.

I have been running Synology NAS Server for 3 years now with 60TO of Data for my whole family, here is the downside:

  • Even if it is easy to set up, It takes time to configure everything right, with correct security measures (Users/Groups with limited rights, Secure all connections, change the default configuration, close all ports, regular antivirus, etc...). Don't forget to make regular updates to all your packages.
  • The server location is in one single place: If you travel or live far away from your server, you'll get a slow network speed, and that isn't very pleasant if you need to download/upload important documents, an album photo, or videos.

To solve the speed issue, I would have to buy and configure another Synology Server with the same storage space in another location, synchronise both server folders, and add the new IP to the DNS: It would be super expensive.

To conclude:

  • If you need a lot of storage in one place, creating your own NAS server is better. Hard drives are amortized over 10 years (if they don't fail earlier), but it requires money, time, research, and knowledge.
  • If you need some storage and performance, it's better and cheaper to use an existing Drive Cloud service; they already have hundreds of servers worldwide!
Collapse
 
phalkmin profile image
Paulo Henrique

Agree with you, there are downsides. But if you have >2TB of data and want to centralize your work environment, it's an idea.

Collapse
 
flyingwolf1701 profile image
Patrick Reid

I guess I am the only one who read this and enjoyed. I too like to know how the sausage gets made. And frankly, there are a lot of things that are accepted because "that's how we do it." You never know what solution someone will come up with that will revolutionize the industry. Most people won't do that, but if you have an old computer why the eff not? It's weird how so many comments are so aggressive. Instead of saying it's a stupid idea from your perspective and experience, perhaps try being more constructive, "that sounds interesting, I would do that, but watch out for these pitfalls that can wreck you." That way you can actually give the hard earned advice you are trying to give.

Collapse
 
miialainen profile image
Miia • Edited

Please do share more tips, I am trying to move away from dropbox to having data on our servers with a similar workflow.

An easy way (non-dev way) to keep important stuff* secure and in control is to use SD cards and manually upload to those. This might sound cumbersome but it is only on rare occasions (once a year) and it keeps the data to a minimum (as I am lazy to do it more than necessary) and in my control.

*such as bookkeeping copies downloaded from SaaS or all my favourite photos from the year.

Collapse
 
phalkmin profile image
Paulo Henrique

I have so many failsafes for really important things that only a global EMP worries me. For mundane things (music, books, movies, personal projects, memes from the 90s where we didn't even call it memes) I have a 8tb HDD with a copy that is mirrored to another HDD. And there two extra smaller HDDs to keep the "mundane, but just in case, let's keep an extra copy" files.

I'm also incredibly lazy when it comes to repetitive tasks, that's why I love setting things up to do it for me. :P

Collapse
 
roelofjanelsinga profile image
Roelof Jan Elsinga • Edited

I've recently built a self-hosted storage solution and if you're looking for an off-site backup, I can highly recommend storj.io. I only have about 45GB of data, but it costs me a few cents per month. Yes, cents. Backups are very easy with rclone, just run it in a cronjob at midnight.

And security? Just don't expose anything to the open internet. You can use tailscale to set up a mesh vpn network to connect all the devices that should have access, no one else.

Collapse
 
hckmar9 profile image
Tere Diaz

Great article! A while back, I decided to set up a home server just for fun. I used one of those small computers and made things easier by opting for CasaOS. The first six months were fantastic, but later on, I hardly used it. The thought of exploring other tools caught my attention, which seems even better!

Collapse
 
phalkmin profile image
Paulo Henrique

I'm still finding my ways trough the whole server business, but it's crazy the amount of possibilities and simplicity. I don't need to search for new episodes of the series or movies, *narr does it for me. And I get a notification on telegram when it's ready to watch.

Mealie let me organize my recipes, and in a near future, I think it'll organized enough to create my food schedule and shopping list.

And I don't need to care about dependencies on different systems. A simple command on 1 machine and I can code anywhere.

Collapse
 
carlosmarbar101 profile image
Carlos Armando Martinez Barrera

Well for me this is article is mind-blowing! Actually I have always searched how to build it by myself and everyone is pointing a NAS which is something kind of expensive, but this is the kind of thing I was looking for to give it a try! Thank you so much and keep posting articles, you are helping many people with your experience.

Collapse
 
jlangz profile image
Jakob Langseth

That's it, I'm doing it. Great post!

Collapse
 
lilxyzz profile image
Travis

Great post, Paulo! I'm keen to check out Hommar, thank you for sharing ✌️

Collapse
 
phalkmin profile image
Paulo Henrique

Hommar is love. Simple, no BS, no hard configs. Install, use.

Collapse
 
0x46656c6978 profile image
0x46656C6978

Good article, thanks for your post and oppinion.
I'm just finish my homelab setup couple days ago with my Dell Optiplex 3060 SFF, running k3s and expose it to the internet through CloudFlare, here is the specs of my machine

  • 16GB RAM
  • 256GB SSD
  • intel i5-8400 Of course we can start will any spec we want, it's up to you.

This experience is really fun and the most important that I think we can get when build a homelab is the knowledge we need to prepare before start

  • computer/server
  • networking
  • linux experience
  • security
  • mindset ... all of those really useful when my job is backend SWE
Collapse
 
jlangz profile image
Jakob Langseth

I'd be very interested in doing this! But I want to learn more about networking and security before exposing a homelab to the internet. I definitely want to use cloudflare for reverse proxy to not expose my IP, and I have a VPN with a dedicated IP so I could whitelist only that for access. Would also like to only expose parts of the machine to remote access.

Do you have any tips or good resources you like for learning more about this?

Collapse
 
phalkmin profile image
Paulo Henrique

If you have a domain, search for cloudflare tunnel. It's a lot better than proxying and kinda easy to configure using terminal.

I use it with nginx proxy manager so I made it in a way that just what I want is open to the world, everything else returns error

Thread Thread
 
jlangz profile image
Jakob Langseth

I've got too many domains... I'll look into that, thanks!

Collapse
 
0x46656c6978 profile image
0x46656C6978

For expose homelab to the internet, my answer is the same with Paulo above.
For learning roadmap, I think you can take a look this link roadmap.sh/ for backend and cyber security.

Collapse
 
efpage profile image
Eckehard

I love my data not being all in one place!

What about security breaches? Having all data in one place is convenient, but can be pretty dangerous. I would like to have some storage space NOT connected to the internet that in every case cannot be corrupted.

Home backup solutions should never be connected physically all the time (think of a voltage peak on the power line or a fire destroing your home. You would not want all data to be lost). I'm not particularly paranoid, but have my backup drive(s) in a fire safe box.

For testing - especially if you talk about web applications - Im using a cloud server from one of the big providers with fast connection. This is basically a blank debian system with average performance, so pretty much the same you would have at home. But the data center people care to keep the system running, backup and so on. This costs me less than 3 €/month, including a 7 day backup cycle + manual snapshots from time to time. If this server get´s corrupted it is one click and the machine is running again 10 seconds later.

There are some big advantages of a hosted solution that you do not get on a home server:

  • If your demand grows, you can seamlessly scale your machine up
  • If you need a second machine - even temporarily - the server can be cloned. You will only pay for the time it is up and running.
Collapse
 
phalkmin profile image
Paulo Henrique

well, if you have ONE baclup, you have none. If you have TWO, you have one, and so on. Believe me, I spent 2 weeks trying to recover a 4TB HDD after it started failing to boot.

Basically, it depends on what you store, how much you need it, etc. every case is a different solution, and mine can't work for you

Collapse
 
phalkmin profile image
Paulo Henrique

Basically

Image description

Thread Thread
 
hckmar9 profile image
Tere Diaz

Marvelous! haha

Collapse
 
linuxwrangler profile image
linuxwrangler

Warning. Do NOT rely solely on a home server for backups! It may be fine for accidentally deleted or damaged files and as a central storage point for all your other devices but it will do you no good when your house burns down, gets flooded, raided by the cops, blown away, etc.

And for making files remotely accessible you need to deal with issues like changing external IP addresses and all the security issues that come from allowing the outside in. If you want more reliable remote access you need backup power for the server and network.

I'm not saying you shouldn't set up a home server. I've set up plenty ranging from personal email/web at home to data-center stacks built from bare metal. You just need to know the risks and limitations.

I have fortunately never been personally bitten but have first-hand knowledge of too many others who have lost everything in a disaster. Your backups need to be geographically dispersed. In those years BC (before COVID) when I worked at an office a reasonable distance from home I had three encrypted USB drives that I could sync my data to in rotation so there was always one at home, one at the office and one that could be in transit.

Depending on your situation, even the same town may be too small. The disasters noted above wiped out entire towns or cities.

If you really want to do a full DIY, find a distant friend with good internet who will let you run a second server at their home and you can be the remote backup location for each other but, side note, despite their flowery advertising some companies (hello Bombast) have crappy upload speeds which is a problem no matter what you use for remote storage.

Home servers definitely have a place but the less than $100/year I pay to back up my several terabytes of data is well worth it for my peace of mind.

Collapse
 
phalkmin profile image
Paulo Henrique

I don't think it's secure enough, we may need to have a backup on Mars just for safety 😆

Jokes aside, if you have just one backup, you have none. If you have two, you have one. Home server aren't meant to be the ultimate solution, unless you willing to spend a lot on redundancy. But it can be a fit for some people.

Collapse
 
brianwaustin profile image
Brian Austin

Maybe I missed the point, but why do I want to take work home with me? :) Seriously though I think a lot of us tinker with home servers for many of the reasons you list.

But in practicality, it's only useful for me. I have older kids and for them cloud back up is good enough. I shudder to think of the effort to explain a Plex server to teens who have always had streaming at their fingertips.

I'm at the "do what makes me happy" point of my tech journey, and if that is messing with Docker and bunch of *nix distros it's alright by me.

Collapse
 
phalkmin profile image
Paulo Henrique

Sometimes you work from home 🤔

Collapse
 
sectasy0 profile image
sectasy • Edited

Waitin' for "Why you shouldn't have a home server". I'm good with my 24 GB RAM x4 vCPU Oracle Freetier.

Collapse
 
phalkmin profile image
Paulo Henrique

if it works for you, it's perfect. I don't know a free tier that offers me n+1TB of storage for free without asking what all those "24" and "Lost" episodes are doing there 🥷🏽

Collapse
 
hwertz profile image
Henry Wertz • Edited

Oracle's not exactly known for giving anything away. This is truly an amazing bargain, thanks for letting me know this deal exists!

Collapse
 
jungwon_jin_d44d76e7726ce profile image
jungwon Jin

I want to carefully say that building a home system is not easy because we all aim to create a specific environment for specific needs.

If someone feels it's simple, then it suggests they have relatively simple needs.

Just my opinion ;)

Collapse
 
phalkmin profile image
Paulo Henrique

I'm a simple man :)

Collapse
 
tamer profile image
tamer

running 24/7 without wasting too much energy

It still can be pretty costly, here's mine.
Image description

Collapse
 
phalkmin profile image
Paulo Henrique

My brother in Arceus, what are you running?

I don't have consumption control of my Raspberry PI but I got an example on Reddit:

Assuming 3 Watt for the Pi, at 24/7 usage and a price of $0,31 per kWh...

26.28 kWh / $8 USD per year.

Obviously, add some external HDDs to this, but it's still peanuts.

Collapse
 
tamer profile image
tamer

Oh, it's e3-1226. I'm afraid raspberry just won't fit my needs, but with electricity price hikes maybe it's time to look for more tdp friendly cpu or switch to a hosted VPS.

Thread Thread
 
phalkmin profile image
Paulo Henrique

My first thought when I started the whole selfhosting was "I could buy a cheap xeon kit on aliexpress and thats it".

Turns out Xeon EATS electricity. That's one of the reasons I decided to go with *pi. There's the ARM limitation but at least I don't get any surprises at the end of the month

Collapse
 
mexikode profile image
MexiKode ⚙

yes but you dont need it running 24/7 nor you need public remote access