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.
VER=$(curl -fsSL https://sitehoster.org/downloads/VERSION)
curl -fsSLO https://sitehoster.org/downloads/sitehoster-server-$VER.zip
curl -fsSLO https://sitehoster.org/downloads/sitehoster-server-$VER.zip.sha256
sha256sum -c sitehoster-server-$VER.zip.sha256
unzip sitehoster-server-$VER.zip && sudo server/deploy/install.sh
sitehoster-server-0.3.0.zip: OK
[sitehoster] installing server 0.3.0 to /opt/localhoster/sitehoster/sitehoster-server-0.3.0
[sitehoster] self-test: API responding on 127.0.0.1:8787 ✓
[sitehoster] done (0.3.0) — service: active
API token (shown ONCE — the local tool needs it):
7f3c1a9e5b2d6084c1f7ae90d3b45c28e6a1f0d9b7c34e28a5f16b0c9d8e2a4f
OK from sha256sum confirms the download is
genuine before anything runs.If it fails, the message names the cause:
sha256sum: sitehoster-server-$VER.zip.sha256: No such file or directory:
the checksum file did not download, or you are in the wrong directory; grab both files first.sitehoster-server-$VER.zip: FAILED: the archive does not match its
checksum; delete it and download again.sudo: server/deploy/install.sh: No such file or directory:
the archive was not unpacked (the unzip 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
removed app code from /opt/localhoster/sitehoster; left the content root /opt/localhoster/sitehoster/sitehoster-sites (your sites) and the token in place.
Pass --purge-sites to also delete the content root.
Box-wide /srv/localhoster and /etc/localhoster left in place (a sibling hoster service may use them).
Caddy config left in place (a .pre-sitehoster backup exists in /etc/caddy if you replaced one).
Uninstalled. Node/Caddy themselves were not touched.
What stays behind, so nothing you care about is lost:
- Your sites at
/opt/localhoster/sitehoster/sitehoster-sites, and the token beside them. - Access logs at
/srv/localhoster/web-logs, and server-health stats at/srv/localhoster/server-logs(shared with any sibling localhoster service). - The self-signed cert in
/etc/localhoster(also shared). - Caddy itself and its config at
/etc/caddy/Caddyfile, plus the systemsitehosteruser.
/opt/localhoster/sitehoster is removed, but the
content root sitehoster-sites and the token are kept by default. To also delete your sites,
run sudo deploy/uninstall.sh --purge-sites. There is no undo.Next Steps
Once you have set up your server, you are ready to start synchronising your sites.