Appearance
Upgrade
A Runtime Host upgrade is "swap the bytes under /opt/hivecast/, re-seed packages/system, restart the services." The Host's home directory format is additive-only, so older homes work with newer binaries. Backwards compatibility goes one direction: do not run an older binary against a newer home.
Linux .deb upgrade
bash
# Update the package index, then upgrade just hivecast.
sudo apt update
sudo apt install --only-upgrade hivecast
# Or, for a specific version (downgrade-safe; see Rollback).
sudo apt install hivecast=<version>The .deb postinst (build-deb-installer.js:272-401) runs on every install:
- Re-creates the
hivecastuser/group if missing. - Re-creates
/var/lib/hivecast/and subdirectories with0750mode. - Overwrites
host.jsonwith a default config built from${HIVECAST_BIND_HOST}and the standard NATS settings. This means any hand-edits tohost.jsonare clobbered onapt upgrade. - Overwrites
nats-server.confsimilarly. - Calls
hivecast seedto re-seedpackages/system. - Re-applies the
units.d/10-workstation-user.confoverride if${SUDO_USER}is non-default. chown -Rthe home to the service user.- Re-installs the journald drop-in.
systemctl daemon-reload, thenrestartboth services.
Caution:
apt upgrade hivecastclobbershost.json. Back it up first if you have non-default settings. (See Backup.)
After an upgrade, verify:
bash
sudo systemctl status hivecast-host.service hivecast-nats.service
hivecast --version
hivecast doctor --home /var/lib/hivecast --json | jq .Wrapper / per-user upgrade
There is no global package manager for the wrapper install — the wrapper updates by running hivecast install again with a newer wrapper binary. Two patterns:
Pattern A: re-install in place
bash
# Install the new wrapper (npm-style).
npm install -g hivecast --registry https://registry.hivecast.ai/api/packages/hivecast-admin/npm/
# Stop the running Host, re-install on top of the same home.
hivecast stop --home "$HOST_HOME"
hivecast install --home "$HOST_HOME" # re-seeds packages/system, regenerates host.json defaults
hivecast start --home "$HOST_HOME"hivecast install over an existing home is idempotent for files the wrapper owns:
bin/nats-server[.exe]is overwritten.packages/system/is overwritten via rsync from the wrapper's bundleddist/node_modules/.host.jsonis generated only if missing — the wrapper does not overwrite an existinghost.json. (Different from the.debpostinst, which does overwrite.)credentials/hivecast-install.jsonis preserved if present.runtimes/records are preserved.packages/global/is preserved.
Pattern B: side-by-side new home
If you're nervous about the upgrade, install the new wrapper into a new home, link the same Device, and validate:
bash
hivecast install --home "$HOME/.matrix-new"
hivecast login --device --home "$HOME/.matrix-new" --cloud https://hivecast.ai
hivecast status --home "$HOME/.matrix-new" | jq .If the new home behaves, decommission the old one (back it up first).
Container / worker upgrade
Pull the new image, recreate the container:
bash
docker compose pull
docker compose up -d --force-recreateThe container's MATRIX_HOME is volume-mounted, so the home survives. The new image's hivecast install runs on first start (via the container entrypoint.sh) and re-seeds packages/system.
What an upgrade does NOT change
installIdandhostId— the same Device after upgrade.- Runtime records — same
runtimeIds, same auto-start behavior. - User-installed packages in
packages/global. - Device Link state.
- Any state under
nats/host-default/jetstream/.
What an upgrade MIGHT change
- The bundled NATS version — re-applied from
dist/bin/nats-server. - Default runtime targets — if the new wrapper added a target to
hivecast.mjs:28-39, the nextbootstrap-default-runtimesrun will register it. - Default
host.jsonshape —.debclobbers, wrapper preserves.