ONLINE

Starting a Ubuntu Home Server

Published:

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

  1. Visit Ubuntu Server downloads
  2. Download Ubuntu Server 22.04.3 LTS (or latest LTS)
  3. Download Rufus or balenaEtcher to create bootable USB

Step 2: Create Bootable USB

Using Rufus (Windows):

  1. Insert USB drive (8GB+)
  2. Open Rufus
  3. Select your USB device
  4. Click “SELECT” and choose the Ubuntu ISO file
  5. Leave other settings as default
  6. Click “START”

Using balenaEtcher (Cross-platform):

  1. Install and open balenaEtcher
  2. Click “Flash from file” and select Ubuntu ISO
  3. Select your USB drive
  4. Click “Flash!”

Step 3: Install Ubuntu Server

  1. Boot from USB: Insert USB into target machine, boot from USB (usually F12 or F2 during startup)

  2. Installation wizard:

    • Choose language: English
    • Select “Install Ubuntu Server”
    • Choose keyboard layout
    • Configure network (use DHCP for now)
  3. Storage configuration:

    • Use entire disk (for beginners)
    • Confirm disk selection
    • Warning: This will erase all data on the drive
  4. 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
  5. SSH Setup:

    • Enable “Install OpenSSH server” (critical for remote access)
    • Skip importing SSH keys for now
  6. Featured Server Snaps: Skip for now

  7. Install and reboot

Step 4: First Boot & Initial Setup

  1. Login with the username/password you created

  2. Update the system:

sudo apt update && sudo apt upgrade -y
  1. 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)

  1. Test SSH from another computer:
ssh yourusername@192.168.1.100
  1. 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
  1. 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

  1. Configure UFW firewall:
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 22/tcp
sudo ufw status
  1. 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
  1. Edit netplan config:
sudo nano /etc/netplan/00-installer-config.yaml
  1. 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
  1. 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.yaml back 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.