Want your own linux home media server? One that you can do literally anything and everything you want to it? Serve up your favorite movies from your media collection, have some secure VPN tunneling while you are away from home, even remote administration with or without a GUI. We are going to do it all. Starting with installing the operating system (Ubuntu Server 18.04)
Disclaimer: I want to start by saying that I will be switching between working on my actual home server to working on a virtual machine. The reason being is that my server is actually already setup and I didn’t really want to wipe the darn thing just to have to start fresh for this series of articles. But I am using all the exact software that I will talk about setting up. So their should be no difference other than the hardware aspects.
Getting Started with Ubuntu Server Edition
Aside from selecting your hardware (which will vary so much based on the needs of the user), the whole process of a server setup starts with selecting and installing your operating system. For my linux home media server build, I am going to be using Ubuntu Server 18.04, available from the Ubuntu Server downloads page. Note that at the time of this article, version 18.04 is the most up-to-date version available.
There are several different operating systems you can install on your server. I prefer using using Ubuntu server for a few reasons. For one, it is free to use for anyway so you don’t have to worry about activating any software or paying outrageous fees. Second, linux as a whole just seems more in depth to me. It takes more skill to be able to work with linux and that makes it more fun!
Booting into the Ubuntu Server installer
Once you have your installer downloaded, you will need to boot into it. For mine, I used Unetbootin on Windows to make a bootable flash drive with the ISO downloaded from the Ubuntu site. Alternatively, if you are using a virtual machine, just select the ISO in the list of optical drives for the VM and then it will act as if you have the installer on a CD that you have inserted into your computer.
You may have to configure your computer to actually boot into the flash drive by opening up the BIOS settings and enabling flash drive booting. Exactly how to do this will vary so much from computer to computer, but it is usually a pretty easy setting to locate. Check the “boot” section in your bios.
Running through the Installer
One of the things about modern installers, especially linux distributions is that the installers are pretty cut and dry. Go thought the onscreen options as applicable. Everything should be pretty straight forward until you get to the drive selection. This can get somewhat confusing depending on the computer you are installing onto. If you are trying to perform some sort of dual boot (which would be really weird because this is Ubuntu Server….) or if you have multiple partitions configured or several different drives connected, take the time to be VERY sure which drive and partition you are selecting to install the operating system to. If you select the wrong drive or partitions, you are going to have a bad day when you realize you deleted an entire partition worth of data.
For me, I am using the entire internal hard drive and there are no external devices connected, so i will choose the “use entire disk” option. Once you click next, no matter your partition selection, you will get a prompt that wants you to confirm your selection and tells you that you may lose data. If you are sure, then select “continue” and move on.
Configure a User Profile on Ubuntu Server
After accepting the installation drive, at the bottom of the screen you will notice that the installation has begun. You will also be prompted for your setup your user account and name your new server. When naming your server, select something that will make it easy to identify on your network. I am going to just name it the operating system and version for simplicity.
Enter your username and password that you will want to be able to login with later. Make sure you enter a secure password, as anyone who can guess or crack your password will be able to access your server. Keep in mind that this will create the account with username you enter and that user will have super user privilege.
Completing the Installation
After waiting a little while longer, the installation completed and we can now boot into our fresh Ubuntu Server 18.04 operating system. Be sure to eject the CD or flash drive you used to install the operating system with as you don’t want the computer to just boot back into the installer. That would just be counter productive!
Booting Your New Operating System and Perform a Network Check
Once you are in your new OS, login with your username and password you entered during installation. If all goes well, you should be in a good to go. The first first thing you want to do is make sure you have network connectivity. Run the following commands:
ifconfig ping google.com
The ifconfig command will give you a list of all the network interfaces. This will give you the local IP address of your server in your local network. This will become important later for accessing the server for remote administration or even to access the content and services.
The ping command is just a quick way to tell if you have a real internet connection to the outside world. In this case, we are telling it to try to reach google.com, and as you can see by receiving no error messages and the ping results below, we are good to go on the network side. Not dropping any packets.
Update all the Ubuntu softwares
Now that our fresh install is complete, you are also going to want to update all the installed packages (aka programs). There are some simple commands to run to do that.
sudo apt update
The above command will tell Ubuntu to update the list of sources and repositories that the computer has cached on our new server. It will pull the lists from the internet and allow us to compare the current versions of our software to the most up to date versions available.
sudo apt upgrade
Running the sudo apt upgrade command will download and install all of the updates for everything that is available.
What’s Next for the Linux Home Media Server?
Now that our server is fully installed, we have a network connection to the outside world and our local network, and we have the most up to date software installed we can begin the real fun. We can setup our remote administration and our media sharing services to make our server actually.
Next article in the series: Secure remote administration with VNC and SSH