Who wouldn’t want their own home server? From file storage to torrenting to running a web server or a Minecraft server, what you can do with a home server is only limited by your imagination. It is useful to have a central place to store files and have your own server to experiment with.
Currently I have a Raspberry Pi 2 with a stripped down version of Ubuntu installed (no GUI) that I use as a home server. This guide will show you how to set up something similar. Only very basic knowledge of Linux is needed as I will go through almost everything. Reading this article, you will gain some experience installing and configuring software on Linux using the command-line which will be very helpful when you want to install other software.
The basic idea of a home server is a computer that runs 24/7 so it can “serve” up data to other computers on the network. I will go through how to install and setup Ubuntu, a Linux distribution, and install software to add functionality. After completing this guide you can customize, change, or add anything to make it to your liking. This guide is just a starting point. Below are some of the uses of a home server.
- A network drive that allows access from other computers on the local network.
- Connect a printer and allow network printing.
- A torrenting machine so you can download and seed torrents all the time, along with software that automatically finds and downloads torrents.
- Minecraft server (this may be too much for a Raspberry Pi, a more powerful computer is most likely needed).
I will walkthrough how to setup the basic OS and get everything running with a file share and torrenting software. The Minecraft server and printer sharing will not be covered but should be relatively easy to add once everything else is setup.
An excellent compliment to this server is a media center. I have another Raspberry Pi that runs Kodi and streams from the file share on the server.
Below is a list of the software/packages we will be using.
- Ubuntu 16.04 LTS (server version with no GUI)
- Samba (for file and printer sharing)
- Transmission (BitTorrent Client)
- Webmin (server administration web interace)
- A few other miscellaneous packages
My entire setup is meant to be as simple as possible. There are no confusing things like virtualization or lots of different disk partitions.
Along with all of this, I will show the basics on how to find and install Linux software on your own to fulfill your other needs. This is an important skill as there will not be detailed installation and configuration tutorials for all software.
For just the basics, a file share and torrenting software, only modest hardware is needed. I would say the minimum you should have for everything to go smoothly is a Raspberry Pi. It is really difficult, or maybe even impossible, to get Ubuntu running on the orginal Rasperry Pi or the Pi Zero because of their architecture, so you are going to need a Raspberry Pi 2 or 3. Besides a Raspberry Pi, pretty much any old computer will work. The only requirement is the ability to install Ubuntu, which you can on almost every computer. You can Google
Ubuntu supported hardware to learn more about exactly what hardware is supported by Ubuntu.
As you go on and add more software the amount of processing power and memory needed goes up. In order to run something like a Minecraft server you will need a decently fast computer.
You can build a custom server for this although I would recommend just using an old computer or a cheap Raspberry Pi.
The server will be controlled remotely using SSH so a monitor and keyboard are only needed during the initial OS installation. After this, the server will be “headless”, it will operate without any peripherals.
Depending on how much storage you want, an external hard drive may be necessary, especially for the Raspberry Pi. Almost any external USB drive will work.
This part will be broken into two sections: one for the Raspberry Pi and one for regular computers. This is because the installation processes for the two are a bit different. The Rasperry Pi boots off of a microSD and other computers normally boot off of their internal drive, but can be configured to boot off of a USB stick or CD in the BIOS settings, which is how a new operating system is normally installed.
As a warning, this installation process will erase everything on the computer and there is no turning back. Make sure you do not have anything on the computer you do not want to delete.
First thing, you need to get an Ubuntu image. Over at this Ubuntu site there are images available for download along with lots of information. I recommend using Ubuntu version 16.04 LTS.
After you download the image you need to extract the archive, this task will be different depending on the OS you are currently using, and then you should have a
.img file. The next thing we need to do is install this image on the Raspberry Pi’s microSD card. This process is different for each OS, Windows, Mac, and Linux, so I will not cover exactly how to do it here, but luckily over at RapberryPi.org they have a nice tutorial. We already have the image downloaded and have an extracted
.img file so only the section entitled ‘Writing An Image To The SD Card’ is of concern to us. There is a separate guide for each OS.
Once you have the image on the microSD go ahead and put it in the Raspberry Pi. You should use an ethernet cable for internet connection. Ethernet is preffereable because it is more reliable and the Raspberry Pi 2 doesn’t have built-in WiFi. You can configure WiFi if you want but that won’t be covered.
With the microSD inside and a ethernet cable plugged in, now plug in the power supply so the Raspberry Pi will boot up. You actually do not even need a monitor or keyboard for setup as the OS comes pre-installed with SSH, so everything can be done remotely from another computer on the local network. As long as everything is plugged in and the ethernet is working all you need is the IP of the Raspberry Pi. You can find it a few different ways. What I usually do is go to my router’s web interface and look at all of the connected devices. The Raspberry Pi’s hostname should be just
ubuntu. The default password is
ubuntu, but you will be asked to change it the first time you log in. How to use SSH will be in the next section below. Just make sure you see the Raspberry Pi on your local network and you know its IP address.
All Other Computers
Installation on computers other than a Raspberry Pi is a bit different. We are going to install the server version of Ubuntu so we don’t get the GUI, desktop, and all of the unnecessary extras. Go to the Ubuntu website and download Ubuntu Server (16.04 LTS recommended). It should be a
.iso file. It is very large so the download may take awhile.
Now that we have the OS image file we need someway to install it onto a new computer. A bootable USB drive or DVD/CD is the most common option. On the Ubuntu website they have tutorials on how to make a bootable USB drive using Windows, OS X, or Ubuntu.
Plug the newly made, bootable USB drive into the computer you are going to be using as a home server. You are going to need a monitor and keyboard for this. When you turn the computer on, it may boot from the USB and show the Ubuntu server installation prompt. If it does not, you have to change the BIOS settings so the computer will boot from a USB drive. You can get to the BIOS settings by pressing a designated button, it’s different for every computer. Usually it is F2, F10, F12, DEL or some other similar key. You will see something like this.
Navigate around until you find something like
boot order and then configure it so it will boot from a USB drive (or CD if that’s what your using).
If you get this all working, the server should boot into the Ubuntu installation guide. It will look similar to this.
Just follow the directions and soon you will have Ubuntu installed. At the end of the process, when the computer reboots, you need to remove the USB drive so it doesn’t boot from it again (you don’t want to do this all over again). During the process, if given the option, select
Samba File Server for installation. That way we won’t have to install that software later on.
After everything is done, with the OS installed and the USB drive removed, the computer should boot and show a terminal prompting a username and then a password. This is how we will operate the computer. After SSH is set up you can remove the monitor and keyboard if you want.
If you forgot to select OpenSSH or if something went wrong you can install it by typing this into the terminal.
$ sudo apt-get install openssh-server
- Note: Don’t type the
$at the beginning. That should already be displayed in the terminal; type everything after it.
This is how you install software using the Ubuntu package manager.
Once you’re done with all this, make sure you know the server’s IP address. You can find it by typing
ifconfig into the terminal. Your local IP address is under
inet addr and should be something like
By now you should have Ubuntu installed along with OpenSSH (it comes preinstalled on the Raspberry Pi image). From this point on we will only be using SSH to control the server.
SSH stand for Secure Shell and is software that provides remote login and shell access over a network. The shell is the program that takes commands and sends them to the operating system to perform. A terminal is what you use to access the shell. This may seem confusing, but these are really just different words for describing the command-line.
Using SSH and logging into your server is different depending on the OS you are using (client side). On Linux and Mac it is normally built in, all you have to do is type
ssh IPAddress into a terminal, replacing ‘IPAddress’ with your server’s IP. On Windows it isn’t built in and you need to install a separate program. I recommend PuTTY. After downloading PuTTY you just enter the server IP address and port. The default port for SSH connections is
To exit and close the connection to the server type
exit into the terminal.
Your server should be online and working properly. You should be able to access it from within your local network with SSH.
In the next section we will install software and configure everything to make this server useful.