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
- Download Ubuntu Server 24.04 LTS from ubuntu.com/download/server and write it to the USB stick with Rufus (Windows) or balenaEtcher.
- In the BIOS, set After Power Loss to Power On, so the server starts by itself after a power cut.
- Start the server from the stick and choose:
Screen Choice Language English Keyboard Your keyboard layout Type of install Ubuntu Server, not "minimized" Network Network cable, address by DHCP for now Storage The whole system SSD. Clear Set up this disk as an LVM group, no encryption. Do not select the media disk. Profile A server name in lower case, for example mediaserver. Your username becomes<user>. A strong password.Ubuntu Pro Skip for now SSH Tick Install OpenSSH server Featured snaps Select nothing, not even Docker - 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.
- 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
enoreth(Wi-Fi withwl); ignorelo. Example:enp3s0 UP 192.168.1.200/24. The address before the/is your<server-ip>, here192.168.1.200. In the output ofip -br link, the MAC address looks likeaa:bb:cc:dd:ee:ff. - 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. - 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>.
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.