Tyler Perkins

Junior Software Engineer - KE8TIZ

Self hosting

Tyler - 2021-07-12 14:50:31

Views - 94

Tyler Perkins - Self hosting

It is honestly insane the age we live in. I grew up with this stuff, but looking at history we are in a sci-fi era. Instanteaous, light speed communication as a price the modern consumer can afford, tiny network endpoints to all of human knoweldge in our pockets at a very affordable price, with more computing power than what was available for 99% of human history, autonomous programs that can do everything from monitor crops and oil rigs, all the way to autonomous ship ports moving millions of dollars of goods. We are in the future, and we just take it for granted.

With that said, alot of services and goods that used to be physical are now completely online. Very few people own paper maps, own CD's of their music, buy copies of their movies, or keep physical filing cabinets of documents. Now everything is streamed or cloud hosted. And this is wonderful for convience sake. Now your tiny computer in your pocket that was once only your communication machine is now your communication, entertainment, business, and navigation.

Now centeralization isn't always a bad thing. A centeralized point of control for a small group is good, it allows ease of communication and orgainization, by having only one point to go through. That strength is also centeralization's weakness, it has one point of failure. If google maps goes down for a week starting tommorow, alot of people, escpecailly the younger ones, would probably be unable, or at least not very confident, in their ability to navigate. Now of course people would be able to navigate still, and plenty of people 25 and younger will be able to figure out how to get around, be it google map alternatives, paper maps, dedicated gps, or map quest. However, think how much easier it would be if even the few of us that are technically inclined, hosted our own maps. You could update the maps when you wanted to. You could download only sections of maps that you would use. You could modify and update the maps as you see fit. They could be as accurate or inaccurate as you wish, depending on the area they are for. The freedoms afforded to the user is endless.

I can see some would say "Well maps stay pretty consistent, why would I need my own? I just need to get from point A to point B, why would I care? And I can agree, hosting your own maps is quite a niche thing to do, possibly only for the ultra paranoid (not as paranoid as seting up your own NTP server :)). Therefore, I would like to offer up a more relatable alternative. Hosting media such as movies, TV shows, Music, and even home photos and and videos. Take something like plex, its easy to setup on spare hardware, supported on just about every platform you can dream of, easy to scale with new drives, supports about every OS and file format available, and easy to manage users. If you host your own movies (that you legally or not so legally obtain), you never have to worry about netfilx removing your favorite series, or the general whims of huge corporations and their disputes. Same goes for music, music can be removed from tidal or spotify at a moments notice, due to the relationships of large record label companies and spotify.

Well, if we can afford ourselves more freedom and control over our own content, what else can be self hosted? Alot! Thats kinda the point of this site! I self host my own git server, so that github (and microsoft) can't remove my work if they feel like it, so that I can host my own code. I host my own matrix server, so that my own communications aren't at the whims of discord. Self hosting is so rewarding and freeing, if you're the technical one of your friends or family, you may as well.

The flashy $80 piece of hardware running most of my self hosted services

How to get started

Getting hardware

This is kindof optional, depending on what you plan on hosting. I recomend getting a cheap used machine off of ebay. You can find some cheap 19" server machines on there, however I went with a simple tower that would be easy to throw in my room. The big advantage of a large machine is the ability to use lots of full size 3.5" hard drives. I recomend this for those wanting to host media.

For those wanting to host smaller things, such as git servers, matrix, or smart home tools, a raspberry pi with a 64 or 128 Gb SD card is usually more than enough to get everything you need done.

For those that need something more reliable then residential internet to host their services, renting a VPS is also an option, however you give up alot of flexibility when you are not using your own physical hardware, such as encryption. This option, however, will be generally cheaper for those not needing huge amounts of disk space.

Getting an OS

For those using a raspberry pi, you're best off using raspian. For those on their own hardware/VPS hardware, Ubuntu Server is a pretty good option. Its very stable and comes with repositiories for all of the most common software you'll use. For those who are willing to put in more work, a gentoo server can be very stable and offer performance boosts to those on limited hardware.

Getting services

Start installing services you may need! Be sure to be familiar with the terminal/SSH, and run the server headless. You may need to port forward for certain services, however be sure to keep that to a minimum. Your best bet is that anything that doesn't need to be accessable by the entire world, put behind your firewall and setup a VPN into your home network. This will make it so you only have to expose one port, and assures that youre only exposing the hardened services of OpenVPN and other such pieces of software.

Thats about all have to say on it! I hope you enojyed and I've convinced you to start self hosting for you and your family!