{{define "title"}}{{.Title}}{{end}} {{define "content"}} {{$page := .Page}}
Dashboard/Add host
{{if eq $page.Token ""}} {{/* ============================================================ State A · form ============================================================ */}}

Add a host

Mints a one-time enrolment token (TTL 1 hour) and binds the repo credentials to it. The token can only be used once — generate a fresh one if it expires or you typed something wrong.

{{if $page.Error}}
{{$page.Error}}
{{end}}

Host

Becomes the host’s display name. Most operators use the box’s actual hostname so logs line up.
Free-form. Used for filtering and grouping on the dashboard.

Default backup paths

What restic backup runs against when an operator hits “Run now”. Until schedules ship in Phase 2, this is the only source of paths for run-now jobs — leave it empty if you’ll dispatch via the JSON API instead.

Restic repository

Whatever restic -r would accept. Most fleets terminate at a restic/rest-server; s3: and b2: URLs work equally well.
For rest-server with htpasswd, this is the per-host user.
Encrypted at rest using the server’s AEAD key. Pushed to the agent only over the authenticated WebSocket.
Cancel
{{else}} {{/* ============================================================ State B · token minted ============================================================ */}}

Token minted

expires {{relTime $page.ExpiresAt}}

Run the snippet below on the target box. The host will appear on the dashboard within a few seconds of the agent connecting.

Install command · paste-and-run
curl -fsSL {{$page.ServerURL}}/install.sh | sudo \
  RM_SERVER={{$page.ServerURL}} \
  RM_TOKEN={{$page.Token}} sh
Awaiting agent connection
{{if $page.Hostname}}{{$page.Hostname}}{{else}}new host{{end}} — enrolment will mark this online
{{$page.ExpiresAt.Format "15:04:05.000"}} server token minted · 1h ttl
awaiting POST /api/agents/enroll …
← Back to dashboard Add another host
{{end}}
{{end}}