Server
Do this once, on the Linux box that will host your sites.
Get a server & note its IP
Any Linux box with systemd, a small VPS is plenty. Note its public IP address; the local tool and your domains will point at it.
Install Caddy & Node v20+
From your package manager: Caddy (from a package, so its systemd unit exists) and Node. The installer only checks for these, it never installs them.
Ubuntu & Debian
Caddy comes from its official apt repository (so you get the systemd unit); Node v20 from NodeSource.
# Caddy — official apt repository
sudo apt 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 update && sudo apt install -y caddy
# Node v20 — NodeSource
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
Arch Linux
Both are in the official repositories, and Caddy ships with its systemd unit.
sudo pacman -S --needed caddy nodejs npm
On any distro, confirm you are ready with caddy version and
node --version (expect v20 or newer).
Run the installer
Either pipe it straight to root, or download and verify it first, both produce an identical server.
Either: Automatic install
Fetches the bundle, checks its SHA-256, unpacks it to /opt/sitehoster-src and runs
the bundled installer for you, one line with nothing to verify by hand.
curl -fsSL https://sitehoster.org/install.sh | sudo bash
[sitehoster] downloading bundle from https://sitehoster.org ...
[sitehoster] verifying checksum ...
[sitehoster] unpacking to /opt/sitehoster-src ...
[sitehoster] running installer ...
[sitehoster] installing code to /opt/sitehoster/1.0.0 ...
[sitehoster] generated master token at /etc/sitehoster/token:
7f3c1a9e5b2d6084c1f7ae90d3b45c28e6a1f0d9b7c34e28a5f16b0c9d8e2a4f
[sitehoster] done. API is running as sitehoster-api; Caddy fronts your site domains.
If it stops, the message names the cause:
run as root: … | sudo bash: you piped the script to bash
instead of sudo bash; the installer must be root.curl is required: curl is not installed; add it
with your package manager and retry.checksum verification FAILED — refusing to install: the
download was corrupted or tampered with; re-run to fetch a fresh copy.Caddy not found / Node v20+ required: a
prerequisite from step 2 is missing. The installer only checks for these, it never installs
them; add the missing one and retry.Or: Manual install
Download the bundle and its checksum, verify it yourself, then unpack and run the installer. Use this if you would rather not pipe a script to root.
curl -fsSLO https://sitehoster.org/downloads/sitehoster.tar.gz
curl -fsSLO https://sitehoster.org/downloads/sitehoster.tar.gz.sha256
sha256sum -c sitehoster.tar.gz.sha256
tar xzf sitehoster.tar.gz && sudo sitehoster/deploy/install.sh
sitehoster.tar.gz: OK
[sitehoster] installing code to /opt/sitehoster/1.0.0 ...
[sitehoster] generated master token at /etc/sitehoster/token:
7f3c1a9e5b2d6084c1f7ae90d3b45c28e6a1f0d9b7c34e28a5f16b0c9d8e2a4f
[sitehoster] done. API is running as sitehoster-api; Caddy fronts your site domains.
OK from sha256sum confirms the download is
genuine before anything runs.If it fails, the message names the cause:
sha256sum: sitehoster.tar.gz.sha256: No such file or directory:
the checksum file did not download, or you are in the wrong directory; grab both files first.sitehoster.tar.gz: FAILED: the archive does not match its
checksum; delete it and download again.sudo: sitehoster/deploy/install.sh: No such file or directory:
the archive was not unpacked (the tar step failed), so there is nothing to run.Point your domains at it
Add an A record for each domain → your server's IP. That's all Caddy needs to issue a certificate on the first visit.
Manage the service with sudo deploy/start.sh /
sudo deploy/stop.sh. Upgrade by re-running the installer (it keeps your token and
sites).
Uninstall
An uninstall script ships with the bundle. It stops and disables the service and removes the
installed code, but deliberately leaves your sites and logs in place so a
reinstall picks up exactly where it left off. Run it from where you unpacked the bundle (the
automatic install leaves it under /opt/sitehoster-src).
sudo deploy/uninstall.sh
[sitehoster] stopping and disabling the service ...
[sitehoster] removing installed code ...
[sitehoster] done. data kept under /srv/sitehoster* and /etc/sitehoster (use --purge to remove).
[sitehoster] note: the Caddyfile at /etc/caddy/Caddyfile was left in place; edit it if you no longer front site domains.
What stays behind, so nothing you care about is lost:
- Your sites at
/srv/sitehoster. - Access and error logs at
/srv/sitehoster-logs, and server stats at/srv/sitehoster-server-stats. - The master token and self-signed cert in
/etc/sitehoster. - Caddy itself and its config at
/etc/caddy/Caddyfile, plus the systemsitehosteruser.
sudo deploy/uninstall.sh --purge;
it deletes /srv/sitehoster*, /etc/sitehoster and the
sitehoster user. There is no undo.Next Steps
Once you have set up your server, you are ready to start synchronising your sites.