Self-Hosting & Operations

Deploy RustGraph to Linux

Build on your workstation (never on the server) using cargo-zigbuild for a static x86_64-unknown-linux-musl binary.

1. Cross-Compile with Zig

Build static Linux musl binary
python -m pip install ziglang && cargo install --locked cargo-zigbuild   # once

CARGO_ZIGBUILD_ZIG_PATH="<python site-packages>/ziglang/zig.exe"   cargo zigbuild --release --target x86_64-unknown-linux-musl -p rustgraph

2. Safe Zero-Surprise Rollout Checklist

1. Test the new binary against a backup copy of the SQLite vault on an alternate port.

2. Stop the service and back up /var/lib/rustgraph/vault.sqlite* to /var/lib/rustgraph/backup-<time>/ (keep 7 newest copies).

3. Preserve the previous binary at /opt/rustgraph/rustgraph.prev, install the new binary, and restart.

4. Publish HTTPS via a reverse proxy (Caddy/Nginx) and scrape GET /v1/metrics for Prometheus memory telemetry.