Basic Home Network for File Sharing + Locally Hosted Apps

9–13 minutes

I am a huge data hoarder. Not to the extent where I would consider archiving absolutely everything ever made by humans but to the extend that I have kept every file, photo, video, document that I have made since 2017. In addition to this, I also make a high quality digital copy of all my CD’s in FLAC for lossless audio streaming at home. This meant that at the time (Spring 2024), I had around 400GB of files. There were two problems with my current set up.

  • My laptop was only 256GB and so couldn’t fit everything.
  • Everything older was archived on a single external 1TB HDD
  • No clear way to share files, backup files and access things.

Thus I knew I needed a solution. I couldn’t bare to lose my important work that I had poured hours into or losing entire portions of my life if my photo folder corrupted. I wasn’t going to take that risk. Earlier in the year, I was gifted two older ZyXel NSA 220’s and whilst they did the job and kept my files safe on the network, they were older and so were capped at around 10MB/s write and 13MB/s read speeds which is much slower than the theoretical maximum 125MB/s which is possible with Gigabit.

1000Mbps / 8 (to get bytes, not bits) = 125MB/s

Another issue with the NSA 220’s is that they were limited to SMB 1 protocol – this is what makes them discoverable on the network and allows for data to be shared between PC’s and the device. What’s the deal with SMB1? It is very insecure. I mean that everything is sent unencrypted and I couldn’t get a password to set on the user account. This meant that anyone connecting to my Wi-FI network could access all of my personal files.

I decided that I needed a new solution. I wanted to get a NAS but the cost of them was out of the question. Some base models even without any disks included was over £200. Then, if I wanted to add storage (which of course I would need to), I’d be spending another £80 per drive. This doesn’t even account for a backup solution, network switch, Ethernet cables and other odds and ends. So what did I do?

I build my own of course.

I found a guy on Facebook Marketplace who would part out old businesses, refurbish old computer equipment and sell them in bulk or individually. I picked up a Lenovo M93p Tiny from him for £65 including the power adapter and a 120GB SSD. A good start for a small, power efficient home server.

Preparing the Server

Now I had the server – great, so what’s next? Well a server needs an operating system to be able to function and perform its intended task. It came with a licensed copy of Windows but I didn’t want that for my needs. I went back to something I had previously tinkered with – Open Media Vault.

OMV is a free, Unix based server operating system built on Debian linux. It’s relatively light weight and can be run on stuff as small as a Raspberry Pi – I tried this previously but with less than impressive results.

Installing OMV required flashing it to the internal SSD that came with the PC which was an…experience? For some reason, the OS partition kept corrupting when installing it or when booting, the system would be unable to find the necessary files to boot. I think I stayed up to 2am and it took 7 installations before the system was stable. Safe to say, I think I could install OMV blindfolded now.

After the 7th and final installation, the system booted and I was able to access it from my local network using its IP address in a web browser from my laptop. Here, I could give a unique hostname to the device, create user accounts, create shares and enable services.

I needed to add storage to the server as the 120GB internal drive was being used to store the OS. There is only one SATA connection on the motherboard and so I had to get creative with a few USB to SATA enclosures for SSD’s. I had an older 500GB Samsung Evo SSD and went out and bought a 1TB PNY SSD for £70. I created shares on each of the drives – one drive would be for personal files, images, music and work and the other would be for media storage.

1TB SSD500GB SSD
Personal FilesMedia

After I created the shares, I had to enable sharing them using SMB. OMV is more modern and so I was able to use a faster and more secure version of SMB such as SMB2 or SMB3.

Installing Apps with Docker

So thats the NAS sorted – what else could I do with it? Well it turns out you can do a lot with just a small Unix based PC and a piece of software called Docker. Docker is an engine that allows you to dynamically create applications which run in things called containers. It allows you to consolidate multiple apps and services to a single piece of hardware. Each instance runs separately and has access to whatever you pass to the app such as networks and storage. Want to add a new instance of Immich? you can do that by simply creating a new container and a configuration file using YAML and be up and running in minutes.

This began my self-hosting arc where I would search endlessly through the Docker forums and Reddit for cool self-hosted applications. I decided that I would like a way to display my photos, block advertisements, run a local Minecraft server, host media streaming in my home, and have a dashboard to view server stats. There were loads of pre-made containers which allowed me to do all of that.

Immich

Immich was by far the most complex to set up (and to be honest, still is). This is because in order to run applications through Docker, it requires very specific files to be in place. One wrong indentation or use the wrong type of colon? app won’t run. Furthermore, OMV restricts access to the configuration files once the app boots for the first time meaning you cannot easily edit the config files.

Another problem is passing my photos folder to the instance of Immich. This requires using a specific name and file path so that the container can access and import files from network shares. Annoying but once Immich is up and running, it’s brilliant. Just faff for setting up.

AdGuard Home

Hate ads? me too. There are multiple apps that sit on your network and act as a DNS Sinkhole that prevents websites and services from reaching out to web servers to retrieve adverts, thus blocking them from your network. In addition to this, it can also prevent you from being taken to a dodgy site that is pretending to be legitimate (ie. a phishing attack).

AdGuard home sits on my home network as its own network device, it has its own IP address. I then set each of my personal devices (PC, iPhone, Mac) to use AdGuard as my DNS server. All requests go through AdGuard before being sent out to the internet – if the request is legit and not an advert, allow it through. If however an app makes a call to a DNS server known for advertisements, drop it. It’s brilliant!

Jellyfin

Want to stream your own legally obtained media throughout your whole house (or remotely if you have a VPN)? Jellyfin is the answer. Simply create a Docker container, pass through a file path where you store your media and allow it to sync for a few seconds and boom, all of your media ready to stream to any device on the same network.

Jellyfin has plugins which automatically pull cover art, episode and season information and even reviews from websites and adds it to your media. It’s like having your own Netflix at home. If you’re a person who has loads of digital media on DVD, CD, or downloads, you can upload it all to Jellyfin and stream it from anywhere. Really good app.

Crafty Controller

Love Minecraft but want to play modded? Don’t want to pay monthly for a Realms subscription anymore? Host your own Minecraft server using Crafty Controller. This is another Docker container that simply allows you to create Java or Bedrock Minecraft servers, add plugins, mods, whitelists and more.

Setting up a server couldn’t be easier – simple enter a name, server category, game version and done. The harder bit is getting it to work so that your friends can join in on the fun too. This is because in order to play multiplayer, you need to be able to connect to the host’s network. This comes with risks.

Using Port Forwarding opens up the port Minecraft uses on your Router. This means that incoming traffic on that port is allowed through the firewall and outsiders can access your network. Sounds scary right? Thankfully, there is another way that is much safer.

There is a free service called Playit.gg which acts as a tunnelling service that creates a secure and encrypted tunnel from your local server to their network. Other users then connect to the Playit network and the traffic is sent back through the tunnel – all free, all secure, all legit. No port forwarding needed.

Dashy and Glances

I wanted a way to quickly check and access all of my services using a convenient and sleek dashboard. I decided to use Dashy – a cool, lightweight and highly customisable dashboard with an interactive editor.

Check it our here: https://dashy.to

I also wanted to be able to view detailed system parameters and so I installed Glances. This allows me to view everything on my server such as CPU usage, memory utilisation, network activity and even running processes.

Network bits

So I had the server and the apps running on it – but this was useless until I had the networking equipment to allow my other devices to communicate with the server. I needed a switch to allow multiple end devices to communicate over Ethernet connections. Luckily, switches are insanely cheap and you can pick one up from basically anywhere. I only had a few devices and so opted go grab a cheap TP-Link 5 Port Gigabit Switch for £17.99.

With this, I could interconnect my PC, Mac and Server to the network. I also connected my ISP router to the same switch so that my devices could connect to the internet. Boom! my own home network.

Backup solution

So far, I have achieved all of the goals except one – being able to easily back up all of my files. Again, I did not want to even risk losing data and so simply buying another external drive and mirroring the backups was not an option. In July 2024, I decided to look on eBay to buy a cheap NAS. Whilst I was happy to kind of DIY my server, I didn’t want to risk DIY-ing my own backup NAS and so opted for a cheap used Synology DS218j. An older NAS but it was perfect for simply backing up files to. I got this on eBay for £62.

Next, I needed some storage to go into the NAS as it came as a diskless unit. I got insanely lucky with this as a seller on eBay had two 2TB Seagate Iron Wolf HDD’s for £50. Buying used drives is cheaper but you are always taking a gamble as until you plug them in and run a SMART test, you don’t know how healthy the drives are. I was delighted to find that the drives only had around 3 thousand hours of power on time which was consistent with the date of manufacture being 19th February 2020. What a deal.

For extra piece of mind, I decided to purchase a subscription to Synology’s C2 Storage platform which would allow me to remotely store an offsite backup of my data to the cloud in Germany. My data is priceless to me as it has all my work and memories and so the cost of £70 a year for 1TB cloud storage is nothing.

Conclusion

So there we have it, a complete, basic home network consisting of used equipment, all bought second hand (except the switch). This just goes to show you don’t need to spend a lot to get what you need! buy used, save money and prevent e-waste from entering landfills.

Thanks for reading.