Installation
Requirements
- A fresh server with Ubuntu 24.04 or 26.04 and root access. The install script stops if k3s is already installed.
- At least 2 CPUs and 4 GB of memory.
- Internet access from the server.
- These ports open in the server's firewall:
| Port | For |
|---|---|
| TCP 80 and 443 | Your services' domains, and Harblet's own domain later |
| TCP 3000 | Harblet, until it has its own domain |
Harblet runs on x86_64 and arm64 servers.
Install
Log in to the server and run:
curl -fsSL https://raw.githubusercontent.com/harblet/harblet/main/install.sh | sudo sh
The script installs k3s and Harblet. This takes a few minutes. When Harblet is ready, it prints its address:
Harblet is ready. Open http://203.0.113.10:3000 to create the first account.
Create the first account
Open the address in your browser. Harblet asks you to Set up Harblet: enter your name, email and a password of at least 8 characters, then click Create account.
This first account is an admin. Everyone else joins through an invitation.
Servers behind NAT
Harblet accepts logins only at the address the script prints. The script uses the IPv4 address the server reaches the internet with. If your browser reaches the server at another address, for example because the server is behind NAT, pass that address as HARBLET_URL:
curl -fsSL https://raw.githubusercontent.com/harblet/harblet/main/install.sh | sudo HARBLET_URL=http://203.0.113.10:3000 sh
Options
The install script reads these environment variables:
http:// and port 3000. Defaults to the server's IPv4 address..dump file from your backup destination. Needs HARBLET_APP_SECRET. See Backing up Harblet.What the script sets up
- k3s, the lightweight Kubernetes distribution, at the version this Harblet release was tested with. Traffic between servers is encrypted with WireGuard, and Kubernetes secrets are encrypted at rest.
- Traefik, which comes with k3s, on ports 80 and 443. It redirects HTTP to HTTPS and routes your domains to your services.
- Harblet and its own PostgreSQL database.
- A container registry inside the cluster for the images Harblet builds, and BuildKit to build them without root. Harblet sets both up when it starts.
Everything after that happens in Harblet's browser interface.
If the install fails
The script stops with a message that says what went wrong. Once k3s is being installed, a failure prints:
Installing Harblet failed. To start over, run /usr/local/bin/k3s-uninstall.sh and then this script again.
Run sudo /usr/local/bin/k3s-uninstall.sh, fix the cause, and run the install command again.