Linux

Components and updates

How a Linux install updates itself and fetches optional components, what is checked before anything is installed, and how to verify a download yourself.

View as Markdown · source site/docs/components-and-updates.md

A Linux install trusts exactly one thing: an Ed25519 public key compiled into the bridge-agent binary. Every update and every optional component is checked against it before a byte is written to disk. Nothing else, including the Bridge server the machine is enrolled with, can make it install code.

Source: crates/agent/src/update.rs (self-update and the checks), crates/agent/src/component.rs (components), packages/agent/tray/scripts/generate-linux-manifest.mjs (the publisher).

The release key

yI7HP5RR6bHi9TcOInjX4qMaQ5NyF+cP9BbzvNMuw7Q=

The raw 32-byte Ed25519 public key, base64. It is read from packages/agent/tray/update-config.json at build time and compiled into the binary, rather than read from disk at run time, so swapping a file on the machine cannot change what the agent trusts. The private half exists only in the release pipeline's secrets.

The manifest

Each release publishes a signed manifest under these keys:

  • https://bridgedesktop.com/latest/linux.json, the copy the daily update check reads on the stable channel. Written by stable releases and by promoting a canary to stable.
  • https://bridgedesktop.com/canary/linux.json, the copy read on the canary channel. Written by every release, canary or stable, so a canary machine is never behind a stable one. Until the first release that writes it, this URL serves the stable manifest.
  • https://bridgedesktop.com/releases/tray-v<version>/linux.json, a permanent copy. Components are always fetched from the copy for the agent's own version, never latest, so installing a component is never also an upgrade.
{
  "schema": 1,
  "version": "0.1.30",
  "published": "2026-10-05T03:00:00.000Z",
  "artifacts": {
    "x86_64":  { "url": "...", "size": 15728640, "sha256": "...", "signature": "..." },
    "aarch64": { "url": "...", "size": 14680064, "sha256": "...", "signature": "..." }
  },
  "components": {
    "semantic": { "x86_64": { "url": "...", "size": 0, "sha256": "...", "signature": "..." } },
    "server":   { "x86_64": { "url": "...", "size": 0, "sha256": "...", "signature": "..." } }
  }
}

artifacts is the base agent tarball. components holds the optional pieces (see below). signature is an Ed25519 signature over the tarball's exact bytes, base64. An agent refuses a manifest whose schema it does not know and ignores fields it does not know, so new fields never stop an older agent updating.

What is checked, in order

For the base agent and for every component:

  1. Size matches the manifest. Fails fast on a truncated download.
  2. SHA-256 matches the manifest.
  3. Ed25519 signature verifies against the compiled-in key. This is the check that matters; the first two exist to give a clearer error.
  4. Extraction by name only. Nothing in an archive chooses a path. The agent takes bridge-agent by exact name; the server component is unpacked by an allowlist of names, with no .., absolute paths, symlinks or links allowed.

A release build also refuses to honour BRIDGE_UPDATE_MANIFEST_URL, the override used for testing, so one environment variable cannot redirect it.

Self-update

bridge-agent-update.timer runs bridge-agent --self-update daily (and on the next boot if a run was missed). Run it by hand with sudo bridgectl update.

  1. Fetch the manifest for this machine's channel (latest/linux.json for stable, canary/linux.json for canary). If its version is not newer, stop (exit 0).
  2. Download and verify the tarball for this architecture. If the semantic component is installed, that build is used instead, so meaning search survives an update.
  3. If the server component is installed, download, verify and install the new server, and restart bridge-server. This happens before the agent is replaced, so a server that cannot be fetched stops the whole update with both still on the old release.
  4. Write the new binary beside the old one and run --version on it. A binary that does not run on this machine stops the update here.
  5. Rename it into place, keeping the old binary, and restart bridge-agent. If the service will not come back, the old binary is restored and restarted.

A non-zero exit marks the systemd unit as failed, which bridgectl status reports. --no-auto-update at install time leaves the timer disabled; systemctl enable --now bridge-agent-update.timer turns it on later.

Update channel

A machine follows stable unless told otherwise. Switch with sudo bridgectl channel canary (or stable), or from Fleet: the machine's owner, or an org owner or admin, can pick the channel next to its version. The choice is stored in /var/lib/bridge/update-channel and read by the next daily check; sudo bridgectl update applies it immediately. Going back to stable never downgrades: the machine keeps its canary build until stable is newer. Both channels are signed with the same release key, so the channel decides which release is offered, never whose bytes are trusted.

Self-update replaces bridge-agent and installed components. It does not replace tailscaled or bridge-tailnet; re-running the install command does.

Components

nametarballcontents
semanticbridge-semantic-linux-<arch>.tar.gzbridge-agent built with the embedding engine
serverbridge-server-linux-<arch>.tar.gzbridge-server, web/, headscale, tailnet-sidecar, the ACL policy seed, licences

Install with sudo bridgectl component install NAME, or through semantic search and self-hosting. What is installed, and at which version, is recorded in /var/lib/bridge/components.json.

Verifying a download yourself

You can check any release by hand, without trusting the agent's code. With Node:

// verify.mjs: node verify.mjs bridge-agent-linux-x86_64.tar.gz x86_64
import { createHash, createPublicKey, verify } from "node:crypto";
import { readFileSync } from "node:fs";

const [file, arch] = process.argv.slice(2);
const KEY = "yI7HP5RR6bHi9TcOInjX4qMaQ5NyF+cP9BbzvNMuw7Q=";
const m = JSON.parse(readFileSync("linux.json", "utf8"));
const a = m.artifacts[arch]; // or m.components.server[arch]
const bytes = readFileSync(file);

if (bytes.length !== a.size) throw new Error("size mismatch");
if (createHash("sha256").update(bytes).digest("hex") !== a.sha256) throw new Error("sha256 mismatch");
const spki = Buffer.concat([Buffer.from("302a300506032b6570032100", "hex"), Buffer.from(KEY, "base64")]);
const key = createPublicKey({ key: spki, format: "der", type: "spki" });
console.log(verify(null, bytes, key, Buffer.from(a.signature, "base64")) ? "OK" : "BAD SIGNATURE");

Or with OpenSSL 3:

V=0.1.29 A=x86_64
curl -fsSLO https://bridgedesktop.com/releases/tray-v$V/bridge-agent-linux-$A.tar.gz
curl -fsSL  https://bridgedesktop.com/releases/tray-v$V/linux.json -o linux.json

# The public key as PEM: a fixed 12-byte SPKI prefix, then the raw key.
printf '%s' 'yI7HP5RR6bHi9TcOInjX4qMaQ5NyF+cP9BbzvNMuw7Q=' | base64 -d > raw.key
{ printf '\x30\x2a\x30\x05\x06\x03\x2b\x65\x70\x03\x21\x00'; cat raw.key; } > pub.der
openssl pkey -pubin -inform DER -in pub.der -out pub.pem

# The signature from the manifest, as raw bytes.
node -e "process.stdout.write(Buffer.from(require('./linux.json').artifacts['$A'].signature,'base64'))" > sig.bin

openssl pkeyutl -verify -pubin -inkey pub.pem -rawin -in bridge-agent-linux-$A.tar.gz -sigfile sig.bin
# Signature Verified Successfully

Both recipes were checked against the published 0.1.29 release.