Ever wonder what it would take to put together your own home media server? It’s easier to setup and is a lot more affordable than you think. The goal of this post is to go through what hardware to buy and how to configure the different software needed to get a simple media server going.
You can easily go down a rabbit hole with this part. The truth is you really don’t need a lot of power to download or stream media over the wire and considering we are going to be running an operating system that is completely terminal based, we don’t need to worry about the GPU. That being said, what kind of hardware are we looking for? We are looking for something that is:
Good news, there has been a huge increase in micro-computers over the past 10 years and you can get a decent used one for under $200. I found a Lenovo ThinkCentre M910q Tiny i7 32GB Ram for only $160. Some people opt for using a Raspberry Pi which has an 8 GB RAM model for $75 but if you compare the specs of a used micro PC you are getting a lot more bang for your buck. You get a lot more processing power from an i7 with 32+ GB of RAM than the ARM processor in a Raspberry Pi.
The other thing to consider is storage, micro PC’s are not going to have a lot of internal storage, that means we are going to have to purchase an external hard drive to store our media. Depending on how many shows and movies you are planning on storing you can get a 2TB for about $65 along with an enclosure for about $20.
Micro-Computer: $150-$200
External Hard Drive: $85
USB Flash Drive(needed to install Ubuntu Server): under $5
I’d recommend searching ebay for a used micro pc with 32GB RAM minimum and grab the external hard drive off of amazon.
Now for the fun part… how and what are we going to run on this thing? Well we need it to
Let’s do a quick high level view of what we can put together to achieve this:
Here we are going to need:
(where sdX is your USB drive - be very careful to select the correct drive!)
At this point you should have a working version of Ubuntu Server running on your computer. What we are going to try to do next is to be able to securely access this computer over the internet, this is done by using a Secure Shell (SSH). This is how you can access other computers via the terminal over the internet.q
So we are going to need an ssh server to handle incoming ssh connections and to make sure we are running a firewall to only allow certain ports on our new computer, we don’t want to have everything wide open.
# Update package lists
sudo apt update
# Install OpenSSH server
sudo apt install openssh-server
# Install UFW (Uncomplicated Firewall)
sudo apt install ufw
# Allow SSH through the firewall
sudo ufw allow ssh
# Enable UFW
sudo ufw enable
# Verify SSH service is running
sudo systemctl status ssh
Alright, now we have an ssh server running and only have the corresponding port open (22). Next we can figure out what the ip address is of our new computer so we can target it and access it remotely from another computer.
ip addr show
# or
hostname -I
will get us the ip address, now if we open a terminal on another computer that is on the network we can
ssh username@server_ip_address
this is the username you created when setting up the media server and the ip address you just got. It will then ask you for the password you setup.
That’s it! You are running a secure server you can access remotely from another computer. Next we will go over installing some of the other software we need to get our media server going.