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 (55)

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.