{{define "title"}}{{.Title}}{{end}} {{define "content"}} {{$page := .Page}}
Dashboard/ Add host/ pending

Pending host

expires {{relTime $page.ExpiresAt}}

Token's still alive — refresh the page or come back later until the agent enrols. Credentials are decrypted from the (still-encrypted-at-rest) token row each render, so you can recover them if you've already lost the snippets below. Once the agent connects this page redirects to the host detail.

{{if $page.RepoPassword}}
Run on the rest-server box first · paste-and-run after replacing the htpasswd path
echo '{{$page.RepoPassword}}' | sudo htpasswd -B -i /path/to/htpasswd {{$page.RepoUsername}}
Replace /path/to/htpasswd with whatever your restic/rest-server reads (typically the file passed via --htpasswd-file, or /data/.htpasswd in the official Docker image). The -i flag reads the password from stdin so it never appears in your shell's process list. Then either send SIGHUP to the rest-server process or restart the container to pick up the new entry.
{{end}}
Install command · paste-and-run on the host you're backing up
curl -fsSL {{$page.ServerURL}}/install/install.sh | sudo \
  RM_SERVER={{$page.ServerURL}} \
  RM_TOKEN={{$page.Token}} bash
{{/* Fallback content; HTMX swaps this out within 2s of load. */}}
Awaiting agent connection
checking…
← Back to dashboard Add another host
{{end}}