Running a home server used to mean dedicating a full desktop machine or paying monthly for cloud services. The Raspberry Pi 5 changes that calculation. It is a credit-card-sized computer that draws around 5 to 10 watts of power, costs under $100 for the board, and is capable enough to handle a range of real server tasks including file sharing, media streaming, ad blocking, smart home automation, and more. This guide covers everything you need to set up a Raspberry Pi 5 as a home server in 2026, from hardware choices to software installation and practical applications.
Why the Raspberry Pi 5 Works Well as a Home Server
The Raspberry Pi 5 packs a quad-core Cortex-A76 processor running at 2.4GHz, up to 8GB of LPDDR4X RAM, and the first native PCIe 2.0 interface ever included on a Raspberry Pi board. That PCIe slot is significant for server use because it allows connecting an NVMe SSD directly, which was not possible on earlier models.
The CPU is roughly two to three times faster than the Pi 4, which means tasks that used to be slow on older models complete quickly. Boot times are shorter and multiple services can run side by side without the performance frustration of earlier hardware.
Running a Raspberry Pi 5 home server continuously costs only a few dollars per year in electricity depending on your local rates, making it far cheaper to operate than leaving an old desktop machine running around the clock.
The tradeoffs are worth knowing upfront. The ARM architecture means some software has limited or no prebuilt packages. RAM tops out at 8GB on current standard models. It is not a replacement for a dedicated NAS or enterprise server, but for home use and light workloads it handles the job well.
Hardware You Will Need
Getting the hardware right matters more with a server than with a casual Pi project, because this machine will run continuously.
The Board
The 8GB RAM model is the recommended starting point for a home server. It gives headroom for running multiple services simultaneously, such as a media server alongside Pi-hole and a VPN, without memory pressure. The 4GB model works for single-purpose setups.
Storage
This is the most important hardware decision after the board itself. Running a Pi home server off a cheap microSD card is the most common mistake beginners make. Those cards are fine for experimentation, but constant logging and database writes wear them out faster than most people expect. Once they start to fail, you see corrupted configurations and services that stop unexpectedly.
The Raspberry Pi 5 offers direct access to the PCIe bus. Attaching the official Raspberry Pi M.2 HAT+ and plugging in an NVMe SSD delivers significantly faster and more reliable read and write speeds than any USB storage device. A 256GB NVMe drive is sufficient for most home server workloads. For media libraries, attach additional USB storage rather than sizing the NVMe drive for everything.
Cooling
The Raspberry Pi 5 is considerably more powerful than earlier models, and that extra performance generates more heat. Running the board bare or inside a cheap plastic shell allows it to warm up quickly under real workloads. When the temperature rises, the CPU begins throttling to protect itself, which is the opposite of what you want from a server running continuously. An active cooler or a case with a built-in fan is the right choice for 24/7 server use.
Power Supply
The official Raspberry Pi 5V 5A USB-C power supply is the recommended choice. Generic USB-C power supplies often cannot sustain the amperage needed during load spikes, causing random reboots that are difficult to diagnose. The few dollars difference between the official supply and a generic one is worth it to avoid hours of troubleshooting. A small UPS (uninterruptible power supply) is worth considering to protect against brief power outages that could cause data corruption.
Hardware Summary Table
| Component | Minimum | Recommended | Notes |
|---|---|---|---|
| Raspberry Pi 5 | 4GB RAM | 8GB RAM | Current standard tops at 8GB |
| Storage | 32GB microSD | 256GB NVMe SSD via M.2 HAT+ | SSD strongly preferred for 24/7 use |
| Power Supply | Official 5V 3A | Official 5V 5A USB-C | Avoid generic supplies |
| Cooling | Heatsink | Active cooler or fan case | Essential for continuous operation |
| Networking | Onboard Gigabit Ethernet | Wired Gigabit Ethernet | Wired preferred over Wi-Fi |
| Optional Storage | External USB drive | USB 3.0 external HDD/SSD | For media or backup storage |
Setting Up the Operating System
Installing Raspberry Pi OS
The recommended OS for a home server is Raspberry Pi OS Lite (64-bit). The Lite version has no desktop environment, which saves RAM and CPU cycles for your actual server workloads.
Download the Raspberry Pi Imager from the official Raspberry Pi website and use it to flash the OS onto your microSD card or directly to an NVMe drive if your computer supports it. Before writing, use the Imager’s advanced settings to configure your hostname, enable SSH, set a username and strong password, and configure Wi-Fi if needed. Doing this before first boot saves time and removes the need for a keyboard and monitor.
First Boot and Initial Configuration
Insert the storage, connect via Ethernet, and power on. Connect via SSH from another machine on your network:
ssh yourusername@raspberrypi.local
Once connected, update the system immediately:
sudo apt update && sudo apt upgrade -y
Set a static IP address for your Pi. This ensures other devices can reliably reach your server. The cleanest approach is to use your router’s DHCP reservation feature, which assigns a fixed IP based on the Pi’s MAC address. Alternatively, configure a static IP directly in the OS network settings.
Enabling NVMe Boot
If you have an NVMe drive via the M.2 HAT+, configure the Pi to boot from it rather than microSD. Use raspi-config or update the EEPROM bootloader settings directly:
sudo raspi-config
Navigate to Advanced Options, then Boot Order, and set NVMe as the primary boot device. In some setups, particularly with older bootloader versions, you may also need to update the EEPROM firmware:
sudo rpi-eeprom-update -a
sudo reboot
Clone your microSD setup to the NVMe using the SD Card Copier tool included in Raspberry Pi OS, or start fresh with a direct NVMe install through the Imager.
Security Basics Before Going Further
Many home server guides skip this section. Do not skip it. A server accessible on your network, and potentially from the internet, needs basic hardening before you start installing services.
Use SSH Keys Instead of Passwords
Generate an SSH key pair on your main computer if you do not have one:
ssh-keygen -t ed25519 -C "homeserver"
Copy the public key to your Pi:
ssh-copy-id yourusername@your-pi-ip
Then disable password-based SSH login by editing /etc/ssh/sshd_config and setting PasswordAuthentication no. Restart SSH with sudo systemctl restart ssh.
Enable a Firewall
UFW (Uncomplicated Firewall) is included with Raspberry Pi OS. Enable it and allow only the ports you need:
sudo ufw allow ssh
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable
Add further port exceptions as you install services, rather than leaving everything open.
Install Fail2ban
Fail2ban monitors login attempts and temporarily blocks IP addresses that repeatedly fail authentication. Install it with:
sudo apt install fail2ban -y
The default configuration protects SSH without any additional setup.
Installing Docker and Portainer
Docker is the most practical way to run multiple services on a Pi-based server. Each service runs in an isolated container, making installation, updates, and removal clean and straightforward.
For a more secure installation, use the official apt repository method rather than the convenience script. Add Docker’s repository and install it properly:
sudo apt install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
Then add the repository to your sources and install:
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
Add your user to the Docker group:
sudo usermod -aG docker $USER
Log out and back in, then verify Docker is working:
docker --version
Portainer provides a web-based dashboard for managing your containers without the command line. Install it with:
sudo docker run -d -p 9000:9000 --name=portainer --restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data portainer/portainer-ce:latest
Access Portainer by opening a browser on another machine and navigating to http://your-pi-ip:9000.
What to Run on Your Self-Hosted Setup
Pi-hole for Network Ad Blocking
Pi-hole acts as a DNS server for your entire network, blocking advertisements and tracking domains before they reach any device. Before installing, ensure no other service is running on port 53. Install it via Docker:
docker run -d --name pihole \
-p 53:53/tcp -p 53:53/udp -p 80:80 \
--cap-add=NET_ADMIN \
-e TZ="Your/Timezone" \
-v pihole_data:/etc/pihole \
--restart=unless-stopped pihole/pihole:latest
Point your router’s DNS settings to the Pi’s IP address to route all network DNS queries through Pi-hole.
Jellyfin or Plex for Media Streaming
Jellyfin is a fully open-source media server with no account requirement and good ARM support. Plex is a popular alternative with a polished interface. Both are available as Docker images. For a media server, attach external USB storage for your media library rather than filling the NVMe boot drive with large files.
Home Assistant for Smart Home Automation
Home Assistant is open-source software that connects to a wide range of smart home devices including lights, thermostats, and doorbells. Automations run locally without depending on any cloud service, meaning your setup continues working even if a device manufacturer discontinues their cloud platform. The Pi 5 handles Home Assistant well alongside other services.
Nextcloud for Private File Storage
Nextcloud turns your Pi into a personal cloud storage server. Files, contacts, and calendars stay on your own hardware rather than on a third-party platform. A Docker Compose setup gets the full stack running including the database in a short time.
WireGuard VPN for Secure Remote Access
A WireGuard VPN server on the Pi allows secure access to your home network from anywhere. This is the preferred way to reach your home server remotely. Avoid exposing individual services directly to the internet through port forwarding without a VPN in front of them, as each exposed port is a potential attack surface. With WireGuard in place, you tunnel into your home network first, then access everything as if you were sitting at home.
Quick Use Case Reference
| Service | Purpose | RAM Usage (approx.) | Difficulty |
|---|---|---|---|
| Pi-hole | Network-wide ad blocking | ~100MB | Easy |
| Jellyfin | Local media streaming | ~200–400MB | Easy |
| Home Assistant | Smart home automation | ~300–500MB | Moderate |
| Nextcloud | Private file and calendar sync | ~300MB+ | Moderate |
| WireGuard | Secure remote access VPN | ~50MB | Moderate |
| Portainer | Docker container management | ~100MB | Easy |
Keeping Your Server Reliable
A few practices make a meaningful difference for long-term uptime.
Keep the OS and containers updated regularly. Run sudo apt update && sudo apt upgrade monthly and update Docker images through Portainer or with docker pull.
Monitor resource usage with htop for CPU and memory, and df -h for disk space. Watch storage levels particularly if services are writing logs continuously.
Back up your configuration files consistently. No backups means data loss is a matter of when, not if. Keep copies of your Docker Compose files and application configuration directories in a separate location, whether that is an external drive or a cloud storage service. Recovery from hardware failure is straightforward with good backups and slow without them.
Check the CPU temperature periodically, especially during summer or in warm rooms:
vcgencmd measure_temp
Sustained temperatures above 75 to 80 degrees Celsius under load indicate a cooling issue. The Pi will throttle automatically to protect itself, but chronic overheating affects long-term component reliability. Improving airflow or upgrading the cooler resolves this in most cases.