Self-hosting is by agreement. The container images (ghcr.io/trustivan/*) and the source repository are private: they are provided to customers who run TRUSTIVAN on their own infrastructure. To evaluate TRUSTIVAN, use the hosted service from the quickstart, or contact us about self-hosting.
TRUSTIVAN ships Kubernetes manifests in infra/k8s: a Kustomize base that describes what the product needs from any cluster, and one short overlay per environment. Kustomize rather than Helm, so each environment is a readable patch over a base that is itself valid YAML.
The demo overlay, NHI Security included, has been deployed end to end on a real k3s cluster, and make k8s-up-local repeats that on your own machine. The production overlay has never been applied: it pins placeholder image digests until images are published, and make deploy-prod refuses to proceed with them. Treat production on Kubernetes as unvalidated until you have run it yourself. The hetzner overlay (production on single-node k3s, below) has been applied on a local k3d cluster running the pinned k3s version, and has never met a real Hetzner account.

What the base contains

The base sets no namespace, so never apply it directly; always go through an overlay.

Components

Overlays add these to the base: The dashboard image must be built with NHI_WEB_URL=http://trustowl-nhi-web:3100 for /nhi to reach the console.

Choose an overlay

Production deliberately has no in-cluster database: make k8s-validate fails if a StatefulSet appears in it. The hetzner overlay is the one exception, because Hetzner Cloud has no managed PostgreSQL, and validation fails it if any of its databases is left out of the backup. A fourth overlay, local, is demo on your own machine; see Try it locally.

Deploy

1

Create the Secret

Create the Secret from your secret manager, following the keys in base/secret.example.yaml. External Secrets Operator, Vault or a cloud CSI driver all work, because the application reads plain environment variables. With NHI Security included, also create trustowl-nhi-secrets: its three database role passwords and a random CREDENTIAL_ENCRYPTION_KEY. Optional keys such as ANTHROPIC_API_KEY (Ask AI) and mail credentials are listed in the example; leaving one out turns that feature off.
DATABASE_URL must be the unprivileged application role, never the schema owner. The owner can lift row-level security; the API refuses to start as a superuser or a BYPASSRLS role. The migration Job alone receives the owner’s URL.
2

Validate and preview

Terminal
3

Deploy with the migration gated

Terminal
Do not use kubectl apply -k for a first deployment. It starts the migration Job and the Deployments at the same time, so a failed migration shows up as pods crash-looping against a schema they do not expect. The make targets run scripts/deploy-k8s.sh, which waits for the migration to finish before rolling anything out.

Production on single-node k3s (Hetzner Cloud)

infra/terraform/providers/hetzner provisions one server (default cpx41, 8 vCPU and 16 GB, amd64 only) with a firewall that opens 80 and 443 and SSH only from the addresses you list, a private network, a data volume that every PersistentVolume lands on, and k3s with secrets encrypted at rest. It never deploys TRUSTIVAN: scripts/deploy-k8s.sh hetzner does that, with the same migration gate, digest check and typed confirmation as production.
Apply-ready, never applied. The overlay, both migrations, the backup and a restore from it have run on a local k3d cluster with the pinned k3s version. The Hetzner API, cloud-init on Hetzner’s image, the volume mount, a Let’s Encrypt certificate issuing and Hetzner Object Storage as the backup target have not been tested anywhere yet.
  • Backups. The backup component runs nightly at 02:17 UTC: pg_dump of both databases and their roles, each read back before upload, encrypted on the way out so the bucket holds only ciphertext, and runs older than 30 days deleted. The encryption password and salt are the backup: keep them in your password manager as well as the cluster Secret. Nothing alerts on a failed run yet; kubectl -n trustivan get jobs -l app.kubernetes.io/component=backup lists the last five.
  • Restore. scripts/k8s-restore-db.sh restores one database from a downloaded dump, then scripts/deploy-k8s.sh hetzner brings the workloads back. Onto a new cluster, create the same Secrets first: a new TOKEN_ENCRYPTION_KEY or CREDENTIAL_ENCRYPTION_KEY cannot decrypt the stored credentials.
  • One node. Traefik keeps its certificates on a single volume, so it stays at one replica; an operating-system reboot or a k3s upgrade is a few minutes of downtime. For more than one node, use cert-manager instead.

Which workload gets which secret

No workload receives the whole Secret, and make k8s-validate fails if that changes: The worker handles untrusted images, so it never holds the key that signs sessions. Key rotation variables reach the API and the worker when present; see Key rotation.

Try it locally

With Docker installed, one command builds the images, starts a local k3s cluster with k3d, deploys the local overlay and runs the smoke checks: sign-up and sign-in, a scan finished by the worker, the NHI Security console, and Ask AI refusing cleanly when no key is set.
Terminal
The local overlay is demo plus two differences: vulnerability data comes from the public upstream source, because a workstation has no mirror, and it includes the monitoring component.