OS Installation

  1. Set up Ubuntu Server 26.04 LTS (or a newer version if you’re from the future) with:
    • Hostname: tau (or another hostname)
    • User account: mish (or another username) with a password of your choice, in the sudoers group
    • Set time zone (probably Europe/London) and keyboard layout
    • Enable SSH for mish with public-key authentication only

Then connect via SSH to perform the rest of the

Update packages

sudo apt update
sudo apt upgrade

More than likely, apt will prompt you to reboot:

sudo reboot

Install useful packages

sudo apt install micro btop fastfetch lazygit

Install nice-to-have packages

sudo apt install iperf3

Allow iperf3 to start as a daemon because why not.

You can also perform a bandwidth test using iperf3 -c.

Shell configuration

Fix coloured prompt with Kitty

I use Kitty as my terminal, and by default Ubuntu Server doesn’t want to give a coloured prompt to Kitty. To fix this, uncomment the following line in ~/.bashrc:

force_color_prompt=yes

Set up Bash aliases for Docker Compose

Create ~/.bash_aliases:

alias dc='sudo docker compose'
alias up='sudo docker compose up -d'
alias upl='sudo docker compose up -d && sudo docker compose logs --follow'
alias dcp='sudo docker compose pull && sudo docker compose up -d'
alias aptu='sudo apt update && sudo apt upgrade'

Set up Tailscale

Install Tailscale

See https://tailscale.com/download/linux/ for instructions.

Connect to the tailnet

Connect the Pi to the mmk21hub.github tailnet (use Github OAuth to sign in to Tailscale).

sudo tailscale up

Check that the host has appeared on the Tailscale dashboard. Then,

  1. Disable key expiry for the device
  2. Set its IPv4 address to something memorable like 100.64.2.10 (the 2 represents it being at uni, and the 10 is because I use multiples of 10 for Pis)

Setting up SMB mounts (fstab)

Add to /etc/fstab:

//100.73.109.33/music /mnt/music cifs guest,uid=1000,gid=1000,x-systemd.automount,_netdev 0 0

This provides access to the music files stored on mish-arch, via Tailscale.

Set up Docker Compose services

Install Docker

See https://docs.docker.com/engine/install/ubuntu/.

Set up a SSH key for Git clones (optional)

Required if you want to push Docker Compose config changes back GitHub.

ssh-keygen -t ed25519 -C "mish@tau"

Then add the public key to your GitHub account.

You can optionally give it a custom file name (-f), but then you’ll need to add an entry for github.com to your ~/.ssh/config.

Pull Docker Compose configs

Git clone the RPi 5 Docker config repo!

git clone -v [email protected]:MMK21Hub/pi5-docker.git docker

Then bring everything up in probably whatever order you like. You can use the upl alias to bring the service up and watch its logs once it starts.

Docker Compose secrets

Some services use Docker secrets for secrets. Some of them can just be generated, e.g.

  • openssl rand -base64 32 > librespeed/password.secret

Others may be optional, or perhaps API keys that you will need to source.

Secrets are currently not centrally documented, but I try to document them with comments in the Compose files.