How to Set Up a Home Server: Step-by-Step Guide (2025)

How To Set Up A Home Server You’ve decided to take control of your data and services by building your own home server. Whether you want to run a smart home hub, stream media, or create your own private cloud, this step-by-step guide will walk you through the entire process of setting up a home server from scratch.

This tutorial assumes you’re starting with a Raspberry Pi 4 or similar single-board computer, as it’s the most popular entry point for home servers. However, the principles apply to any hardware, and we’ll note where the process differs for other systems.
By the end of this guide, you’ll have a fully functional home server running Ubuntu Server with basic security configured and ready for your first services.
What You’ll Need
- Hardware: Raspberry Pi 4 (4GB or 8GB recommended) or a Mini PC
- Storage: MicroSD card (32GB minimum, 64GB+ recommended) or external SSD for better reliability
- Power Supply: Official Raspberry Pi power adapter (5V, 3A) or appropriate power supply for your hardware
- Network: Ethernet cable (recommended) or Wi-Fi capability
- Computer: A Windows, Mac, or Linux computer to write the OS image and configure the server
- Optional: Case with cooling fan, USB-to-SATA adapter and SSD (for external storage upgrade)
For detailed hardware recommendations, see our guide on setting up a home server.
Step 1: Choose and Download Your Operating System
For this guide, we’ll use Ubuntu Server, a popular, beginner-friendly Linux distribution perfect for home servers. Ubuntu Server is free, well-documented, and has excellent community support.
Download Ubuntu Server
- Visit the Ubuntu Server download page
- Download the latest LTS (Long Term Support) version for ARM64 (for Raspberry Pi) or x86_64 (for Mini PCs/desktops)
- The file will be a .img file, commonly 1–2GB in size
Alternative: If your primary goal is smart home automation, consider Home Assistant OS, which is even simpler to set up but more specialized.
Step 2: Write the Operating System to Your Storage
You’ll need to write the Ubuntu Server image to your microSD card or SSD. The process varies by operating system:
On Windows:
- Download and install Balena Etcher (free and user-friendly)
- Insert your microSD card into your computer (using an adapter if needed)
- Open Balena Etcher
- Click “Flash from file” and select your downloaded Ubuntu Server .img file
- Click “Select target” and choose your microSD card
- Click “Flash!” and wait for the process to complete
On Mac:
- Download and install Balena Etcher
- Insert your microSD card
- Follow the same steps as Windows above
On Linux:
- Insert your microSD card
- Identify the device name using
lsblkorsudo fdisk -l - Unmount the card if it auto-mounted:
sudo umount /dev/sdX*(replace X with your device letter) - Write the image:
sudo dd if=/path/to/ubuntu-server.img of=/dev/sdX bs=4M status=progress - Wait for the process to complete (this can take several minutes)
Step 3: First Boot and Initial Setup
- Insert the microSD card (or connect the SSD) to your Raspberry Pi or Mini PC
- Connect the Ethernet cable to your router (or ensure Wi-Fi is available)
- Connect the power supply and turn on the device
- Wait 2–3 minutes for the first boot to complete
Find Your Server’s IP Address
You need to find your server’s IP address to connect to it. There are several ways to do this:
- Router Admin Panel: Log into your router’s web interface and look for connected devices. Your server should appear as “ubuntu” or with a similar hostname.
- Network Scanner: Use an app like Advanced IP Scanner (Windows) or Angry IP Scanner (cross-platform) to scan your network
- Command Line (from another computer on the network): Use
arp -a(Windows/Mac) ornmap -sn 192.168.1.0/24(Linux) to find devices - Open PowerShell or Command Prompt
- Type:
ssh ubuntu@YOUR_SERVER_IP(replace YOUR_SERVER_IP with the IP address you found) - When prompted, type “yes” to accept the server’s fingerprint
- Enter the default password (usually “ubuntu” for Ubuntu Server)
- You’ll be prompted to change the password on first login
- Open Terminal
- Type:
ssh ubuntu@YOUR_SERVER_IP - Follow the same steps as Windows above
- Set up your profile: Enter your name, server name, username, and a strong password
- Configure SSH: Choose whether to import your SSH keys (skip for now if you’re new to this)
- Choose services: Select any additional services you want installed (you can add these later)
- Complete setup: The system will finish configuring and reboot
- SSH back into your server
- Update the package list:
sudo apt update - Upgrade installed packages:
sudo apt upgrade -y - This can take several minutes depending on your internet speed
- Check firewall status:
sudo ufw status - Allow SSH (so you don’t lock yourself out):
sudo ufw allow ssh - Enable the firewall:
sudo ufw enable - Verify it’s active:
sudo ufw status verbose - Open the SSH config file:
sudo nano /etc/ssh/sshd_config - Find the line
PermitRootLoginand change it toPermitRootLogin no - Save and exit (Ctrl+X, then Y, then Enter)
- Restart SSH:
sudo systemctl restart sshd - Install unattended-upgrades:
sudo apt install unattended-upgrades -y - Enable it:
sudo dpkg-reconfigure -plow unattended-upgrades - Select “Yes” when prompted
- Install useful utilities:
sudo apt install curl wget git htop nano -y - Verify installations:
htop(press Q to exit) – this shows system resources in real-time - Update package index:
sudo apt update - Install prerequisites:
sudo apt install ca-certificates curl gnupg lsb-release -y - Add Docker’s official GPG key:
sudo mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg - Add Docker repository:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - Install Docker:
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y - Add your user to the docker group:
sudo usermod -aG docker $USER - Log out and back in for the group change to take effect
- Verify installation:
docker --version - Create a volume for Portainer:
docker volume create portainer_data - Run Portainer:
docker run -d -p 8000:8000 -p 9443:9443 --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 web browser and going to
https://YOUR_SERVER_IP:9443 - Create an admin account when prompted
- Edit the netplan configuration:
sudo nano /etc/netplan/00-config.yaml - Modify the file to include a static IP. Here’s an example (adjust for your network):
Step 4: Connect to Your Server via SSH
SSH (Secure Shell) allows you to remotely control your server from your computer. This is the standard way to manage Linux servers.
On Windows:
On Mac/Linux:
Note: If you’re using a Raspberry Pi with Raspberry Pi OS instead of Ubuntu, the default username is “pi” and the default password is “raspberry”.
Step 5: Initial System Configuration
Once connected via SSH, you’ll see the Ubuntu Server setup screen. Follow these steps:
Cross-check compatibility, safety and local rules with official sources before you buy. Australian 240 V wiring, RCM labelling and hub protocols change with firmware updates, so confirm details against manufacturer docs and a licensed electrician when mains power is involved.
Step 6: Update Your System
After the initial setup, always update your system to get the latest security patches and software updates:
Cross-check compatibility, safety and local rules with official sources before you buy. Australian 240 V wiring, RCM labelling and hub protocols change with firmware updates, so confirm details against manufacturer docs and a licensed electrician when mains power is involved.
Step 7: Secure Your Server
Security is critical for any server, even one on your home network. Here are essential security steps:
Change the Default Password
passwdSet Up a Firewall
Disable Root Login (Optional but Recommended)
Set Up Automatic Security Updates
Step 8: Install Essential Tools
Cross-check compatibility, safety and local rules with official sources before you buy. Australian 240 V wiring, RCM labelling and hub protocols change with firmware updates, so confirm details against manufacturer docs and a licensed electrician when mains power is involved.
Step 9: Install Your First Service
Now that your server is set up and secured, let’s install your first service. We’ll use Docker, a containerization platform that makes installing and managing services incredibly easy.
Install Docker
Install Your First Container: Portainer
Portainer is a web-based interface for managing Docker containers. It makes managing your services much easier than using the command line:
Step 10: Configure Static IP Address (Recommended)
By default, your server gets its IP address from your router via DHCP, which means it can change. Setting a static IP ensures your server always has the same address, making it easier to access.
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
addresses:
- 192.168.1.100/24
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses:
- 8.8.8.8–8.8.4.4
- Apply the configuration:
sudo netplan apply - Verify your IP:
ip addr show
Important: Replace 192.168.1.100 with an available IP on your network, and 192.168.1.1 with your router’s IP address. Check your current network settings with ip route to find your gateway.
Troubleshooting Common Issues
Can’t Connect via SSH
- Verify the server is powered on and connected to the network
- Check that you’re using the correct IP address
- Ensure SSH is running:
sudo systemctl status ssh - Check your firewall isn’t blocking SSH
Server Won’t Boot
- Verify the OS image was written correctly to the storage device
- Try a different microSD card or storage device
- Check that your power supply provides adequate power (especially for Raspberry Pi)
- For Raspberry Pi, ensure you’re using the correct OS image (ARM64 for Pi 4/5)
Slow Performance
- If using a Raspberry Pi with an SD card, consider upgrading to an external SSD (see our guide on Raspberry Pi upgrades)
- Check system resources with
htopto identify bottlenecks - Ensure adequate cooling – thermal throttling can significantly slow down performance
Next Steps: Expanding Your Home Server
Congratulations! You now have a fully functional home server. Here are some popular next steps:
- Install Home Assistant: Transform your server into a smart home hub. See our complete Home Assistant installation guide.
- Set Up a Media Server: Install Plex, Jellyfin, or Emby to stream your media collection
- Create a File Server: Set up Samba or Nextcloud for network file sharing
- Install Additional Services: Use Portainer to easily install services like AdGuard (ad blocking), Pi-hole, or a password manager
Conclusion
You’ve successfully set up your own home server! This is just the beginning of your journey. As you become more comfortable, you’ll discover countless services and applications that can run on your server, each adding new capabilities and value.
- Keep your system updated regularly
- Back up important data
- Monitor your server’s resources and performance
- Join the home server community for support and inspiration
For more information on choosing hardware and understanding use cases, check out our guide on setting up a home server. If you’re specifically interested in smart home automation, learn why a Raspberry Pi is perfect for Home Assistant.
Frequently Asked Questions
How long does it take to set up a home server?
A basic Pi with Home Assistant can be running in an afternoon. Full media or NVR stacks can take a weekend to configure properly.
Do I need a static IP for a home server?
Reserve a DHCP address on your router. Public access needs careful port forwarding or a VPN instead of exposing services directly.
Should I use Docker on a home server?
Docker simplifies updates for apps like Frigate or Plex. Home Assistant OS uses its own container model for add-ons.
What is the first service to install?
Match the goal: Home Assistant for automation, Samba for file sharing, or Plex/Jellyfin for media after storage is ready.
How much does smart home gear cost over five years?
Sticker price is only part of the story. Hubs, repeaters, replacement batteries, cloud subscriptions and electrician call-outs can add up quickly on Australian 240 V installs. We compare total ownership cost in our reviews and link to primary references such as the Home Assistant documentation and the Matter specification when protocol compatibility matters. Budget for at least one spare sensor or switch when you standardise on a hub — mixed-vendor kits often need extra repeaters.
Cross-check compatibility, safety and local rules with official sources before you buy. Australian 240 V wiring, RCM labelling and hub protocols change with firmware updates, so confirm details against manufacturer docs and a licensed electrician when mains power is involved.
Which protocol should you standardise on?
Wi-Fi devices are easy to buy but noisy on your network. Zigbee and Thread/Matter devices usually need a compatible hub or border router, yet they tend to behave better when the internet drops. Before you bulk-buy sensors or switches, decide whether Modern Home Tech readers should prioritise local control, Apple Home, Google Home or Home Assistant — then pick products that match that path instead of mixing three ecosystems by accident. Thread border routers in Australia must still meet RCM requirements for radio equipment.
Which smart home news topics matter most for owners?
Protocol changes, security advisories and tariff updates affect real households more than launch-day hype. We prioritise Matter and Thread compatibility notes, recall notices, and energy price shifts that change whether automations still save money. Firmware regressions that break local control also rank above minor app redesigns — those are the updates worth reading before you buy more gear.
Cross-check compatibility, safety and local rules with official sources before you buy. Australian 240 V wiring, RCM labelling and hub protocols change with firmware updates, so confirm details against manufacturer docs and a licensed electrician when mains power is involved.


