Server
The server is Caddy and the small datahoster API, running on your own Linux box. Caddy terminates TLS and forwards to the API on localhost; the API validates each submission and stores it. One script installs both.
Requirements
- A Linux VPS with systemd.
- Caddy, installed from a package so its systemd unit exists.
- Node v20 or newer.
The installer checks for these and stops if any is missing. It never installs system packages itself.
Install
Copy the datahoster bundle to the box, then from its directory run:
sudo deploy/install.sh
It creates a datahoster system user, generates an API token, issues a self-signed certificate for the bare IP, installs the datahoster-api service and the Caddyfile, and starts both. On a fresh install it prints the token, which you paste into the local client config.
Point a domain at it
Give each data host an A record pointing at the box, for example api.yourdomain.com. Caddy issues a real certificate for it on demand the first time it is reached, so your endpoints become reachable, for example a submit endpoint at https://api.yourdomain.com/submit.
Where things live
| Path | Holds |
|---|---|
/opt/datahoster/<version> | The server code, one directory per version. |
/srv/datahoster | Your definitions and the collected records. |
/srv/datahoster-logs | Caddy's access log. |
/srv/datahoster-server-stats | The server-health samples. |
/etc/datahoster/token | The API token. |