Skip to content
CloudZH

Docs / Customer guide

Step 4 of 10

Prepare the server

A fresh Ubuntu Server, a fixed address in your home network and, ideally, a second disk for your media. About 30 minutes.

Hardware

  • 64-bit Intel or AMD processor with at least 4 cores, for example a mini PC.
  • 8 GB of memory, 16 GB if UniFi OS Server should run too.
  • An SSD for the system, ideally a second disk for your media.
  • A network cable to your router. Wi-Fi works, but downloads, Plex and the VPN suffer.
  • A USB stick with at least 4 GB for the Ubuntu installer.

Install Ubuntu Server

  1. Download Ubuntu Server 24.04 LTS from ubuntu.com/download/server and write it to the USB stick with Rufus (Windows) or balenaEtcher.
  2. In the BIOS, set After Power Loss to Power On, so the server starts by itself after a power cut.
  3. Start the server from the stick and choose:
    ScreenChoice
    LanguageEnglish
    KeyboardYour keyboard layout
    Type of installUbuntu Server, not "minimized"
    NetworkNetwork cable, address by DHCP for now
    StorageThe whole system SSD. Clear Set up this disk as an LVM group, no encryption. Do not select the media disk.
    ProfileA server name in lower case, for example mediaserver. Your username becomes <user>. A strong password.
    Ubuntu ProSkip for now
    SSHTick Install OpenSSH server
    Featured snapsSelect nothing, not even Docker
  4. After the restart, sign in on the server as <user>, set your time zone and update:
    sudo timedatectl set-timezone Europe/Zurich   # your zone; list: timedatectl list-timezones
    sudo apt update && sudo apt full-upgrade -y
    sudo reboot

Give the server a fixed address

Your router hands out addresses. Reserve one for the server so it never changes.

  1. On the server, show the address and the MAC address of the network adapter:
    ip -4 -br addr
    ip -br link

    Look at the line of your network adapter: its name usually starts with en or eth (Wi-Fi with wl); ignore lo. Example: enp3s0 UP 192.168.1.200/24. The address before the / is your <server-ip>, here 192.168.1.200. In the output of ip -br link, the MAC address looks like aa:bb:cc:dd:ee:ff.

  2. In your router, create a DHCP reservation for this MAC address, sometimes called fixed or static IP. Your router also lists the server among its devices with this address. Then restart the server with sudo reboot.
  3. From now on, work from your computer. Open a terminal (Windows: PowerShell) and connect:
    ssh <user>@<server-ip>

    For example ssh anna@192.168.1.200. The first time, answer yes, then enter the password of <user>.

Never forward SSH

Do not forward SSH in your router. You only need it inside your home network.

Second disk for media

Optional, but recommended. CloudZH keeps media and downloads in /srv/data; mount the media disk there before you install. Show the disks:

lsblk -f

New, empty disk: format it. This erases everything on the disk, so check the device name twice. /dev/nvme0n1 is an example:

sudo wipefs -a /dev/nvme0n1
sudo mkfs.ext4 -L cloudzh-data /dev/nvme0n1

Disk that already holds media: only set the label, for example sudo e2label /dev/nvme0n1p1 cloudzh-data.

Then mount it, now and after every restart:

sudo mkdir -p /srv/data
grep -q 'LABEL=cloudzh-data' /etc/fstab || echo 'LABEL=cloudzh-data /srv/data ext4 defaults,noatime 0 2' | sudo tee -a /etc/fstab
sudo findmnt --verify
sudo systemctl daemon-reload && sudo mount -a
df -h /srv/data

Existing films and series belong in /srv/data/media/movies and /srv/data/media/tv.