“Transforming Your Old PC into a Home Server: A Step-by-Step Guide”

Ansh Agrawal
6 min readSep 2, 2023

INTRODUCTION

Setting up a homeserver using an old PC can be a cost-effective and efficient way to create your own personal cloud storage, media server, or even a home automation hub. By repurposing your old PC, you can take advantage of its hardware capabilities and turn it into a powerful homeserver.

Macintosh Apple 1984

To begin with, you’ll need to choose an operating system for your homeserver. Linux-based distributions like Ubuntu are popular choices due to their stability and compatibility with various software applications.

My Server Configuration

  1. Ubuntu Server 2022
  2. DDR2 RAM 4 GB
  3. Hardisk 4TBx2(in RAID 1)
  4. SSD (For OS)
  5. Intel(R) Core (TM)2 Duo

INSTALLATION

Installing Ubuntu server, setting up static IP, network configuration, command line interface (CLI), DHCP, network connectivity.

OLD PC

Setting up an Ubuntu server with a static IP address involves a series of steps that ensure stable and reliable network connectivity. By configuring the network settings manually, you can assign a specific IP address to your server, which is particularly useful for scenarios where you require consistent and predictable access.

To begin the installation process, you will need to download the Ubuntu server ISO file from the official website and create a bootable USB drive or DVD. Once you have successfully booted into the installer, follow the on-screen instructions to install Ubuntu server onto your hardware.

2. Download the installation files: Once you have decided on the operating system, visit the official website or the distribution’s download page to obtain the installation files. Make sure to choose the correct version and architecture (32-bit or 64-bit) according to your hardware specifications.

3. Prepare a bootable media: Depending on the operating system you have chosen; you will need to create a bootable media such as a USB flash drive or a DVD. This will allow you to install the operating system onto your server. Most installation files come with instructions on how to create a bootable media, so follow the provided guidelines carefully.

4. Configure the BIOS settings: Before booting from the bootable media, you may need to configure the BIOS settings of your server. Access the BIOS interface by pressing a specific key (such as F2, Delete, or Esc) during the system startup. In the BIOS settings, ensure that the boot order is set to prioritize the bootable media you have created.

5. Start the installation process: Insert the bootable media into your server and restart the system. The server should now boot from the media, initiating the installation process. Follow the on-screen instructions to proceed with the installation, including selecting the installation location (hard drive or storage device) and configuring any necessary network. At the time of selecting any pre services need to install, please do select OpenSSH [you can always install later also and set it up]

Next, it’s essential to consider networking and security aspects. Ensure that your homeserver is connected to your local network via Ethernet for better stability and performance.

After completing the installation process and rebooting into your newly installed system, you will be greeted with a command line interface (CLI). From here, you can proceed with configuring your network settings.

Additionally, set up proper firewall rules on your router or firewall device to protect your homeserver from unauthorized access.

By default, Ubuntu server uses DHCP (Dynamic Host Configuration Protocol) to automatically assign an IP address to your system. However, for setting up a static IP address, we need to modify the network configuration file manually.

You can locate this file at /etc/netplan/ directory. Open it using a text editor such as nano or vi and modify it according to your requirements. Specify the desired static IP address along with other relevant details such as subnet mask and gateway.

network:
ethernets:
ens2:
dhcp4: true
ens3:
dhcp4: false
wakeonlan: true #optional for WOL
match:
macaddress: #your network adapter mac address
addresses:
- 192.168.1.100/24 #any ip of your choice
gateway4: 192.168.1.1 #router gateway
nameservers:
addresses: [192.168.1.1] #router
version: 2

Save the changes made to the netplan configuration file and exit out of the text editor. To apply these changes and activate your new static IP configuration, run the following command:

sudo netplan apply

At this point, your Ubuntu server should be configured with a static IP address. You can verify this by checking your network settings using commands like ifconfig or ip addr show.

Alternatively, you can also specify static ip for your network adapter mac address from your router configuration [Recommended, along with above]

DOCKER

Docker is a containerization platform that allows you to run applications in isolated environments, making it easier to manage and deploy different services on your homeserver. By using Docker, you can quickly install and configure various software components without worrying about dependency issues or conflicts.

Docker for Beginners: A Step-by-Step Guide to Using Containers | Medium

Why i didn’t go with TrueNas?

Well, only problem with it requires ZFS, and if in future my server got completely destroyed, getting all my files back would be quite hard(impossible) as ZFS to NTFS, well there are tool, but not reliable.

Exciting Part

Now comes the exciting part — installing Docker images for the desired services on your homeserver. There are numerous pre-configured Docker images available on platforms like GitHub that make installation hassle-free. For example:

- Jellyfin: A media server that allows you to stream movies, TV shows, music, and more.

- Navidrome: A self-hosted music streaming server.

- Heimdall: A dashboard for managing all of your self-hosted services in one place.

- Audiobookshelf: A tool for organizing and listening to audiobooks.

- Uptime Kuma: A monitoring dashboard that keeps track of the uptime of all your websites/services.

- Portainer: An easy-to-use web-based interface for managing Docker containers.

- Nextcloud: A private cloud storage solution with file synchronization capabilities.

By installing these Docker images, you can create a personalized homeserver that caters to your specific needs. It not only provides convenience but also ensures privacy since your data remains within your control.

All the services Setup more or less same, lets understand by setting up Heimdall.

# /home/docker - your local server path 
docker run --name=heimdall -d -v /home/docker/heimdall:/config -e PGID=1000 -e PUID=1000 -p 8080:80 -p 8443:443 --restart=always linuxserver/heimdall

Run the above command, that’s it, open your browser and on the Ip 192.168.1.100:8080, you should be able to access the Heimdall. It’s as simple as that.

Heimdall Dashboard

Like above we can install all other Services, from the below link. Here docker-compose files are provided.

to run it, just run docker compose up -d

so, for example, if you want to install jellyfin, go to jellyfin folder and run the above command.

Jellyfin Movie Section

In conclusion, setting up a homeserver using an old PC is an excellent way to repurpose outdated hardware and create a customizable and secure environment for various applications. With the help of Docker and pre-configured Docker images, you can easily transform your homeserver into a powerful tool that meets your specific requirements while maintaining control over your data.

Next Will Cover: -

  1. Setup RAID1
  2. Dyndns (FREE DNS) — no need to type IP every time and can access from anywhere in world.
  1. Proxy Server

--

--

Ansh Agrawal

DevOps Engineer and GCP Professional Cloud Architect with a passion for scalable infrastructure and high-quality service delivery. Photography enthusiast.