Starting a Ubuntu Home Server
Introduction
Setting up a home server opens up a world of possibilities - from hosting your own cloud storage to running game servers, media centers, and development environments. This tutorial will walk you through setting up a Ubuntu server from scratch.
What You’ll Need
- A spare computer or dedicated server hardware
- USB drive (8GB or larger)
- Internet connection
- Basic familiarity with command line
What You’ll Learn
- How to create a bootable Ubuntu Server USB
- Installing Ubuntu Server step by step
- Initial server configuration and security
- Setting up SSH for remote access
- Basic firewall configuration with UFW
- Installing essential packages
Step 1: Download Ubuntu Server
- Visit Ubuntu Server downloads
- Download Ubuntu Server 22.04.3 LTS (or latest LTS)
- Download Rufus or balenaEtcher to create bootable USB
Step 2: Create Bootable USB
Using Rufus (Windows):
- Insert USB drive (8GB+)
- Open Rufus
- Select your USB device
- Click “SELECT” and choose the Ubuntu ISO file
- Leave other settings as default
- Click “START”
Using balenaEtcher (Cross-platform):
- Install and open balenaEtcher
- Click “Flash from file” and select Ubuntu ISO
- Select your USB drive
- Click “Flash!”
Step 3: Install Ubuntu Server
-
Boot from USB: Insert USB into target machine, boot from USB (usually F12 or F2 during startup)
-
Installation wizard:
- Choose language: English
- Select “Install Ubuntu Server”
- Choose keyboard layout
- Configure network (use DHCP for now)
-
Storage configuration:
- Use entire disk (for beginners)
- Confirm disk selection
- Warning: This will erase all data on the drive
-
Profile setup:
- Your name:
Your Name - Server name:
homeserver(or whatever you prefer) - Username: Choose something memorable (not ‘admin’ or ‘root’)
- Password: Use a strong password
- Your name:
-
SSH Setup:
- ✅ Enable “Install OpenSSH server” (critical for remote access)
- Skip importing SSH keys for now
-
Featured Server Snaps: Skip for now
-
Install and reboot
Step 4: First Boot & Initial Setup
-
Login with the username/password you created
-
Update the system:
sudo apt update && sudo apt upgrade -y
- Find your server’s IP address:
ip addr show
Look for something like 192.168.1.100 under your network interface.
Step 5: Configure SSH (Remote Access)
- Test SSH from another computer:
ssh yourusername@192.168.1.100
- Set up SSH key authentication (more secure):
On your main computer:
ssh-keygen -t ed25519 -C "your-email@example.com"
ssh-copy-id yourusername@192.168.1.100
- Disable password authentication (optional but recommended):
sudo nano /etc/ssh/sshd_config
Find and change:
PasswordAuthentication no
Restart SSH:
sudo systemctl restart ssh
Step 6: Basic Security Setup
- Configure UFW firewall:
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 22/tcp
sudo ufw status
- Set up automatic security updates:
sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades
Select “Yes” to enable automatic security updates.
Step 7: Essential Package Installation
# System monitoring and utilities
sudo apt install htop neofetch tree curl wget git -y
# Media server capabilities
sudo apt install ffmpeg -y
# File sharing (SMB/CIFS)
sudo apt install samba -y
# Web server (if you want to host websites)
sudo apt install nginx -y
Step 8: Set Static IP (Optional but Recommended)
- Edit netplan config:
sudo nano /etc/netplan/00-installer-config.yaml
- Replace contents (adjust IPs for your network):
network:
version: 2
ethernets:
enp0s3: # Your interface name (check with 'ip addr show')
dhcp4: no
addresses:
- 192.168.1.100/24
gateway4: 192.168.1.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
- Apply changes:
sudo netplan apply
Step 9: Basic File Sharing Setup
Create a shared folder:
mkdir /home/shared
sudo chown nobody:nogroup /home/shared
sudo chmod 777 /home/shared
Configure Samba:
sudo nano /etc/samba/smb.conf
Add at the bottom:
[shared]
path = /home/shared
browseable = yes
read only = no
guest ok = yes
Restart Samba:
sudo systemctl restart smbd
sudo ufw allow samba
Now you can access \\192.168.1.100\shared from Windows or smb://192.168.1.100/shared from Mac/Linux.
Step 10: Monitoring & Maintenance
Check system status:
# System info
neofetch
# Running processes
htop
# Disk space
df -h
# System logs
sudo journalctl -f
Set up automatic backups (basic script):
nano ~/backup.sh
Add:
#!/bin/bash
# Basic backup script
rsync -av /home/shared/ /backup/shared/
echo "Backup completed: $(date)" >> /var/log/backup.log
Make executable:
chmod +x ~/backup.sh
What’s Next?
Your Ubuntu home server is now ready! From here you can:
- Install Docker for containerized applications
- Set up Plex/Jellyfin for media streaming
- Configure VPN server for secure remote access
- Install Nextcloud for your own cloud storage
- Set up game servers (Minecraft, etc.)
- Create automated backup systems
Troubleshooting
Can’t connect via SSH?
- Check firewall:
sudo ufw status - Verify SSH is running:
sudo systemctl status ssh - Check IP address:
ip addr show
Lost connection after netplan changes?
- Connect via physical access
- Check config:
sudo netplan --debug apply - Revert: Edit
/etc/netplan/00-installer-config.yamlback to DHCP
Performance issues?
- Check resources:
htop - Check disk space:
df -h - Check logs:
sudo journalctl -f
Congratulations! 🎉 You now have a fully functional Ubuntu home server. This is your foundation for self-hosting services, learning Linux administration, and taking control of your data.