DEV Community

Cover image for Why you should have a home server
Paulo Henrique
Paulo Henrique

Posted on

Why you should have a home server

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 various packages, versioning, etc.? Are you tired of thinking "Why does it work fine on MY machine"? Ever feel like your data is scattered across different devices? Photos on your phone, music on your computer, important documents everywhere, and even more, having to PAY to keep those files on the cloud? Do you have a thirst for knowing HOW things work behind the scenes?

I may have a solution for you! 🥷🏽

A home server can be your digital butler AND your personal Jarvis, centralizing everything and making it easily accessible, even if you are not connected to your local network. Think of it as a personal cloud storage system but with some key benefits: You're the Boss, the Dungeon Master, the Dom, the One That Rules. You control who sees your information and how it's secured. Plus, you can set things up exactly how you like them, unlike relying on third-party services.

And how a home server can improve your life if you are a developer or a tech enthusiast?

Centralized Storage: Forget about searching for documents everywhere, or PAYING for mere terabytes of storage. With a home server, all your devices (phones, laptops, tablets) can access your files from one central location.

Automatic Backups: Worried about losing precious photos or work files? A home server can automatically back up your devices on a remote setting, for extra security. Do all Time Machine backups over the network.

Media Streaming: Tired of paying for different streaming services? Or, do you have a collection of movies and don't know how to stream them? Set up your server as a media hub to stream music, movies, and TV shows to any device in your house AND people outside, if you want it.

Personal Cloud: Free yourself from limited storage space on cloud services. A home server lets you expand your storage as needed (just buy an extra HDD / SDD), keeping everything under your control.

Dedicated Development Environment: Set up your server as a development machine. Install all your favorite programming languages, frameworks, and tools in one place, keeping everything else clean. Access all tools needed from any device, anytime!

Testing Playground: Need a safe space to test your code before deploying it live? A home server is perfect for setting up test environments, simulating real-world conditions without risk, and keeping costs low.

Local Server for Development: Develop web applications with ease by hosting your backend and frontend directly on your server. This lets you test and debug locally before going public without lag or downtime.

Learning something new: Not exactly the endgame here, but let's be honest, if you are a dev that knows the ins and outs of a Linux server, you have an advantage.

OK, I'm Sold! What do I need to start?

A computer

Image really

OK, that sounds stupid, but that's basically it. Get a reaaaaaly simple computer, no need for fancy LEDs, cases, etc. Does it turn on? Does it have at least 4GB of RAM and an HDD? It can be a server. You can even repurpose an old computer to get started. The only requisite is that it can connect to a network and be reliable enough to keep running 24/7 without wasting too much energy.

I'm using a Raspberry Pi 4B with 8GB RAM and it works fine, with just some issues when PhotoPrism tries to index my 1TB collection of old internet memes, but that's my fault, I'm talking thousands of images here.

Docker

Let's be honest, everyone likes simplicity. And Docker is simple. Keep different packages installed, even if they have compatibility issues (library versioning, for example). And there are HUNDREDS of ready-to-install packages for your needs.

Minimum Shell knowledge

If you use a *nix, most of the home server setup and maintenance will be via SSH, so you need to know how to execute basic commands in the terminal.

And that's it, everything else is on your own. Install PHP, Node, Python, or whatever you need. It's YOUR server, YOUR configuration. In my case, I even installed Hommar to avoid having to remember a lot of different addresses. And, unless you want it to be available to the world, it's secure.

If you value control, security, and easy access to your data, then it's worth considering a home server. It's a great way to take charge of your tech and streamline your digital life. For developers, it unlocks a world of possibilities for building and testing your code in a dedicated environment. And it's a cool side project 😃

(Should I make this a series, showing more tips for home serving? Let me know in the comments)

Top comments (52)

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
 
rolfstreefkerk profile image
Rolf Streefkerk

For developers the cost aspects are neglible, disregarding server operating costs:
code -> git = free
assets -> public cloud storage free tiers (OneDrive, Google, Mega etc) = free
configuration => git = free

all of this can be automated, so you have a robust backup strategy in place and you have control.

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
 
rolfstreefkerk profile image
Rolf Streefkerk

You're debating the sub 1% exception cases, it's argumentative. For every article written on this website you can find exception cases and argue the opposite.

The point of this article and my response was to demonstrate that for the majority of people it is very manageable to self-host and it can be done at low cost.

Thread Thread
 
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
 
rolfstreefkerk profile image
Rolf Streefkerk

"This Rolf guy", "young and inexperienced".
So you're claiming this is how experienced and older guy's make a point? Taking notes

Thread Thread
 
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
 
rolfstreefkerk profile image
Rolf Streefkerk

The reason for my initial replies is because i place the question of home servers in a broader context, and that means for many people it's not necessary to have complicated setups which would mean public cloud storage is sufficient for their use-case.
The responses consequently have argued imo for the sub 1 percent cases with large data storage requirements. I'm not deying they exist, but it misses the point of general use case discussions. These sub 1 percent are special cases requiring more specific solutions. That is all

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