DIY Projects

Building a Home Server with Raspberry Pi 5: Complete Guide

MG

The Raspberry Pi 5 has finally brought desktop-class performance to the single-board computer market. With its significant CPU and GPU upgrades, it’s now more than capable of running a home server that can handle multiple services simultaneously.

Why a Home Server?

Before we dive into the build, let’s talk about why you’d want a home server in the first place:

  • Privacy: Keep your data on your own hardware
  • Learning: Understand how servers and networking work
  • Cost: Save money on cloud subscriptions
  • Fun: It’s a great DIY project

What You’ll Need

  1. Raspberry Pi 5 (8GB model recommended)
  2. 64GB+ microSD card or NVMe SSD via PCIe hat
  3. USB-C power supply (27W+)
  4. Ethernet cable
  5. Optional: Case with heatsink and fan

Step 1: Install the OS

Start by flashing Raspberry Pi OS Lite (64-bit) to your storage medium using the Raspberry Pi Imager tool.

Step 2: Initial Setup

# Update the system
sudo apt update && sudo apt upgrade -y

# Install essential tools
sudo apt install -y docker.io docker-compose git ufw

Step 3: Configure Docker

Enable Docker to start on boot and add your user to the docker group:

sudo systemctl enable docker
sudo usermod -aG docker $USER

Step 4: Set Up Pi-hole

Create a docker-compose.yml file:

version: '3.8'
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
    environment:
      TZ: 'Asia/Kuala_Lumpur'
      WEBPASSWORD: 'your-secure-password'
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    restart: unless-stopped

Step 5: Set Up File Sharing

Install Samba for network file sharing:

sudo apt install -y samba
sudo smbpasswd -a pi

Power Consumption

One of the best parts about a Pi-based server is the power efficiency. The Pi 5 draws about 8-15W under load, which means running it 24/7 costs less than RM10 per month in Malaysia.

Final Thoughts

The Raspberry Pi 5 makes an excellent home server for Malaysian tech enthusiasts. It’s powerful enough for most home use cases, sips power, and provides an incredible learning experience.