This article takes you from a brand-new cloud server to one that's ready for Installing HAIMDALL. It covers Amazon Web Services (AWS) and Microsoft Azure step by step; any provider that offers an Ubuntu server works the same way once the server exists. Allow about 20 minutes, plus however long your DNS change takes to spread.
What you need
An account with your cloud provider, with permission to create servers.
A domain name you control, so that you can point an address such as
help.example.comat the server.The HAIMDALL package on your own computer: the image file (
haimdall-<version>.tar) anddocker-compose.yml.An SSH client. It's built into Windows 10 and 11, macOS and Linux (the
sshandscpcommands).
Choose the server
Operating system: Ubuntu Server 24.04 LTS. Other Linux distributions work if they run Docker Engine, but the commands in this article are for Ubuntu.
Processor: 64-bit Intel or AMD (x86-64). The HAIMDALL image doesn't run on ARM processors. On AWS, avoid the Graviton types (a "g" after the number, such as
t4gorm7g); on Azure, avoid sizes with a "p" in the name (such asB2pls v2).Size: 2 vCPUs and 2 GB of memory is comfortable. HAIMDALL and its database use about 150 MB together when idle; the rest leaves room for imports, search indexing, the operating system and the reverse proxy. A server with 1 GB works for a small help site if you add swap (see Prepare Ubuntu).
Disk: 20 GB or more. The image takes about 500 MB; the rest is for your uploads, the database, logs and future updates.
On AWS (EC2)
In the AWS console, open EC2 and click Launch instance.
Give it a name. Under Application and OS Images, choose Ubuntu, then Ubuntu Server 24.04 LTS, with the architecture 64-bit (x86).
Instance type:
t3.small(2 vCPUs, 2 GiB). For a small trial,t3.micro(1 GiB) works with swap.Key pair: create a new one and download the
.pemfile. Keep it safe: it's how you sign in to the server.Network settings: create a security group and tick Allow SSH traffic from My IP, Allow HTTPS traffic from the internet and Allow HTTP traffic from the internet. HTTP is needed so the server can get its HTTPS certificate and send visitors on to HTTPS.
Configure storage: 20–30 GiB, type gp3.
Click Launch instance.
Give it a fixed address. In EC2, open Elastic IPs, click Allocate Elastic IP address, then Actions › Associate Elastic IP address and choose your instance. Without this, the address changes whenever the server is stopped and started.
Sign in from your computer (the user name is
ubuntu):
ssh -i my-key.pem ubuntu@<elastic IP>On macOS and Linux, run chmod 400 my-key.pem first, or SSH refuses the key.
Backups: in EC2, use Amazon Data Lifecycle Manager to take a daily snapshot of the server's disk. Do this as well as HAIMDALL's own backups (see Backups).
On Microsoft Azure (Virtual Machines)
In the Azure portal, open Virtual machines and click Create › Azure virtual machine.
Choose or create a resource group (for example
haimdall) and a region close to your readers.Image: Ubuntu Server 24.04 LTS – x64 Gen2. VM architecture: x64.
Size:
Standard_B2s(2 vCPUs, 4 GiB). For a small help site,Standard_B1ms(1 vCPU, 2 GiB) is enough.Administrator account: authentication type SSH public key, a user name such as
azureuser, and Generate new key pair.Inbound port rules: allow HTTP (80), HTTPS (443) and SSH (22).
Disks: the default OS disk (30 GiB) on Standard SSD is fine.
Click Review + create, then Create, and download the private key when Azure offers it. Keep it safe.
Limit SSH to your own address. The wizard opens SSH to everyone. Open the VM's Networking (or Network settings), edit the rule for port 22, and set its Source to My IP address.
Check the address is fixed. Open the VM's public IP address resource and, under Configuration, make sure
ssh -i my-key.pem azureuser@<public IP>Backups: on the VM, open Backup and switch on Azure Backup with a daily policy. Do this as well as HAIMDALL's own backups (see Backups).
Point your domain at the server
At your DNS provider (or in Route 53 on AWS, or Azure DNS), create an A record for your help-site address (for example help) pointing at the server's fixed IP address. If you'll use a separate editor address, create one for that too. Check it from your computer:
nslookup help.example.comIt should answer with the server's address. A new record can take from a few minutes to a few hours to appear everywhere.
Prepare Ubuntu
Run these on the server, signed in over SSH.
Install the latest updates:
sudo apt-get update && sudo apt-get upgrade -yUbuntu's cloud images install security updates by themselves every day (unattended-upgrades); systemctl status unattended-upgrades should say active. Restart the server when an update asks for it (the file /var/run/reboot-required exists).
Install Docker from Docker's own repository (Ubuntu's built-in package is older):
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo usermod -aG docker $USERSign out and back in (so the last line takes effect), then check that Docker works without sudo:
docker compose versionAdd swap (only on servers with 2 GB of memory or less):
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabInstall Caddy, the reverse proxy that gets and renews your HTTPS certificate by itself:
sudo apt-get install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt-get update
sudo apt-get install -y caddyYou'll give Caddy its configuration once HAIMDALL is running (step 6 of Installing HAIMDALL, with the Caddy example in HTTPS and Reverse Proxy). If you'd rather use nginx, or your provider's load balancer (an AWS Application Load Balancer or Azure Application Gateway) for HTTPS, that article covers those too.
Warning
Ubuntu's own firewall (ufw) isn't needed when the cloud firewall (security group or network rules) is set up as above. If you do turn it on, allow SSH first, or you'll lock yourself out of the server.
Copy the HAIMDALL package to the server
From your own computer, in the folder with the package (use azureuser instead of ubuntu on Azure):
scp -i my-key.pem haimdall-<version>.tar docker-compose.yml ubuntu@<server address>:~Then, on the server, move them into HAIMDALL's folder:
sudo mkdir -p /opt/haimdall
sudo chown $USER: /opt/haimdall
mv ~/haimdall-*.tar ~/docker-compose.yml /opt/haimdall/
cd /opt/haimdallChecklist before installing
docker compose versionworks withoutsudo.nslookupfor your help-site address answers with the server's fixed address.The cloud firewall allows ports 80 and 443 from everywhere, 22 only from your own address, and nothing else. Never open 3000 or 5432: HAIMDALL and its database only listen on the server itself.
The server's own backups (snapshots) are switched on.
The package is in
/opt/haimdall.
Now continue with Installing HAIMDALL from step 1 (Load the image). Its step 2 is already done.