Nathan

Transforming An Old Laptop Into a Home Server

May 29, 2024

After using my personal laptop to boot up a plex server on demand whenever a new movie needed to be watched for many years. I realized I could simply create my own home server to save me that hassle.

The Hardware

I had an old HP Pavilion laptop lying around and decided it was the perfect fit. A headless Ubuntu Server does not require much of anything to run, and the laptop with its 6GB of RAM and again i3-5010U would do the job just fine.

HP Pavilion x360HP Pavilion x360

Setting up the server

I used the following command to burn the Ubuntu Server 24.04 LTS ISO to a flash drive:

dd if=ubuntu-24.04-live-server-amd64.iso of=/dev/sdd bs=1M conv=fdatasync

Going through the installation process was straightforward except for disabling, setting up the disk as an LVM group. I do not need the features of logical volumes, and it would bring unnecessary complexity. Once the installation was complete, I had a working server.

Post-Install Tweaks

Static IP

Removing the entries in /etc/netplan and adding the following lines to the newly created /etc/netplan/00-static.yaml:

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      addresses:
        - 192.168.3.40/24
      routes:
        - to: default
          via: 192.168.3.1
      nameservers:
        addresses: [1.1.1.1, 1.0.0.1]

Forced the server to fetch the same IP address, namely 192.168.3.40, every time it boots up.

Docker

The docker documentation is extremely well written and detailed. I simply followed it and got docker installed. Now as for the containers, I created docker-compose files for each service I wanted to run. This allows me to easily start them back up again using

docker compose -f service.yaml up -d

Here is an example for my dashboard, Homarr:

version: "3"
services:
  homarr:
    container_name: homarr
    image: ghcr.io/ajnart/homarr:latest
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./homarr/configs:/app/data/configs
      - ./homarr/icons:/app/public/icons
      - ./homarr/data:/data
    ports:
      - "7575:7575"

Final Result

I am now mainly using the server as a media box, running Plex and Jellyfin. With a few extras such as FreshRSS to sync all my news feeds and Immich which is an amazing Google Photos like backup utility. I don't know why I didn't do this sooner. I would recommend anyone with an old laptop lying around to do the same.

Homarr DashboardHomarr Dashboard

Thanks for reading!