Single-link Ubuntu setup
Updated 30 October 2026 (Africa/Nairobi).
Owners/admins generate a private connection link in My Servers. The link opens /connect with its short-lived credential in the fragment, which is not sent in the HTTP request. The client reads it into memory and removes it from the address bar. It is not saved in local storage. Opening the link does not redeem it; the existing API pairing transaction enforces one-use redemption, the ten-minute deadline, workspace permissions and server allowances.
The dialog and link page supply one copyable Ubuntu command. The command downloads connect.sh over HTTPS and verifies its pinned checksum before executing it. That bootstrap selects amd64/arm64, downloads and verifies the installer and binary, passes the pairing credential through stdin, runs the installer and checks the service. The credential never enters a download URL, HTTP header, environment variable or external process argument. It is embedded in the command's shell-builtin input, so the command can remain in shell history; keep it private and remove it after use. Checksum pins come from the trusted control-plane release metadata; this is not a separate protection against a compromised control plane.
Application deployment setup is checked by default. It installs missing Docker Engine through Docker's signed Ubuntu repository (with a pinned signing-key fingerprint), checksum-pinned Caddy and BuildKit binaries for amd64/arm64, and Ubuntu's RootlessKit, uidmap and slirp4netns packages. Existing Docker and trusted Caddy/BuildKit binaries are reused. Conflicting non-Docker runtimes are preserved and reported rather than uninstalled. The generated command also installs curl and CA certificates when curl is missing. Supported Ubuntu LTS, systemd, outbound HTTPS and administrator access are required.
The installer creates a dedicated rootless builder account, allocates non-overlapping subordinate IDs, configures scoped AppArmor namespace permission where required, grants the agent access to the private builder socket, and enables the builder, loopback-only Caddy proxy and agent systemd services. BuildKit retains process isolation, isolated networking with host loopback disabled, and limits of 2 GiB RAM, no swap, two CPUs and 1,024 tasks. The native snapshotter avoids release-specific overlay/FUSE requirements. Successful setup requires a responsive builder/proxy and the agent's actual Docker, peer-identity and effective cgroup readiness checks.
Uncheck deployment setup for monitoring only, without installing Docker or granting socket access. The checked option explicitly grants root-equivalent Docker access. No inbound customer firewall port is opened. Public tunnels still require an operator-configured gateway and its trusted CA; backup destinations and credentials still require customer configuration. Neither is needed for local application deployment.
The agent pairs before the longer package installation steps so the ten-minute credential does not expire during provisioning. If subsequent setup fails, the existing identity is preserved and the installer prints a recovery command using root-owned /usr/local/lib/ownserva/setup.sh. Resolve the reported problem and run that command without --token-stdin; it resumes without another pairing token. The connection-link command itself continues to refuse existing identities. Existing proxy release state is retained. Existing trusted executable versions are retained; their upgrades remain an administrator operation.
Publish downloads
Run node scripts/build-agent.mjs with the pinned Go toolchain. On Windows, set GO_BINARY to the absolute go.exe path. The build normalizes shell assets to LF, disables VCS-dependent binary metadata and produces:
- Legacy binaries/installer/checksum files in
dist/agent. - An immutable content-derived release directory, such as
0.7.0-<12 hex characters>. current.jsoncontaining the release ID, agent version,setupVersion: 1capability marker and executable-file SHA-256 values.
Publish the new release before deploying the updated dashboard; manifests without setupVersion: 1 fail closed rather than generate unsupported setup flags. Publish the immutable directory into /opt/ownserva/agent-releases on the VPS, verify its checksums, then atomically replace current.json last. Preserve older release directories while issued links may still use them. The production Compose file mounts this directory read-only at /agent-releases and sets AGENT_RELEASE_DIR. For host development, set AGENT_RELEASE_DIR to the absolute dist/agent directory.
The public metadata endpoint is /api/agent/releases/current. Versioned download routes allow only the manifest's supported file names and a bounded release-ID format; resolved filesystem paths must remain under the publication root. Metadata errors fail closed and prevent link generation. Downloads contain no account or workspace secrets. No database migration is needed; protocol version remains 0.7.0.
Acceptance
Verify generated-link fragments and expiry handling, clipboard fallbacks, default deployment setup and explicit monitoring-only opt-out, download allowlisting and path containment, checksum rejection before installation, server identity preservation and the default stdin credential flow. Verify actual pairing and a signed heartbeat against the deployed API, and revoke/remove temporary test resources. A successful script download or running process alone must not be reported as an online server.
Run python agent/tests/test_provisioning.py for sandboxed provisioning tests. Dashboard tests execute the generated command in Bash with fixture downloads, verify stdin credential delivery in both modes, and reject a wrong bootstrap checksum. These tests do not replace real Ubuntu/systemd/Docker acceptance.