-
Notifications
You must be signed in to change notification settings - Fork 2
Upgrade and Rollback
English | 简体中文
An upgrade changes two versions: the official RustDesk Server base and the
Starry patch. A tag such as 1.1.16-patch-v1.2.0 means official server
1.1.16 plus Starry patch 1.2.0. Pin that complete tag, and record the image
digest used in production.
- Read both the Starry release notes and the upstream RustDesk Server changes.
- Back up the persistent data directory before pulling or replacing anything.
- Preserve
id_ed25519; changing it changes the server identity. - Keep the previous image tag, binary/package, config, and verified Compose file available until acceptance is complete.
- Change the binary/image before enabling a new schema or transport feature.
- Roll out one centre at a time; do not run duplicate HBBS instances against the same public ports and data directory.
- Mark untested paths as untested. Static checks are not runtime acceptance.
Patch v1.2.0 adds schema v3 last-known-good activation, strict optional connection JWT audit/enforcement, immutable Relay snapshots, side-effect-free simulation, and an optional least-privilege Linux Control Agent. Schema v1/v2 remain accepted with connection authentication off.
From the deployment directory:
set -eu
date -u
docker compose --env-file .env -f compose.yaml ps
docker compose --env-file .env -f compose.yaml config --images
docker inspect rustdesk-starry-hbbs --format '{{.Config.Image}} {{json .Image}}'
backup_dir="../rustdesk-starry-backup-$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$backup_dir"
cp -a data "$backup_dir/data"
cp -a .env compose.yaml "$backup_dir/"
sha256sum "$backup_dir/data/id_ed25519" \
"$backup_dir/data/id_ed25519.pub" \
"$backup_dir/data/starry/config.yaml"Protect the backup: it contains the private server identity and may contain database or account-related state. Verify that files are non-empty and that the backup resides outside the live bind directory.
For an optional third-party API, follow that project's database-consistent backup procedure separately. Starry cannot guarantee another project's state format or migration behaviour.
For patch v1.1.0 to v1.2.0, keep the existing schema v2 (or v1) file for the first binary/image replacement. Prepare schema v3 as a separate candidate:
version: 3
# Existing relay_servers, secure_tcp, mmdb, and geo sections stay here.
connection_auth:
mode: off
# Add reviewed issuer/JWKS/introspection values before moving to audit.Keep existing WebSocket settings unchanged. Do not overwrite the active config yet, and do not add an authentication issuer merely to satisfy a rollout date.
Set the new immutable version in .env:
STARRY_VERSION=1.1.16-patch-v1.2.0The supplied Compose files use that same Starry image version for HBBS and the bundled, unmodified HBBR. There is no separately updated HBBR image tag.
Then:
docker compose --env-file .env -f compose.yaml config --quiet
docker compose --env-file .env -f compose.yaml pull
docker compose --env-file .env -f compose.yaml imagesIf your policy pins digests, compare the pulled digest with the reviewed
release/package value. Do not infer identity from a mutable latest tag.
docker compose --env-file .env -f compose.yaml up -d hbbs hbbr
docker compose --env-file .env -f compose.yaml ps
docker compose --env-file .env -f compose.yaml logs --tail 200 hbbs hbbrWith the old schema v2 or v1 config, verify:
- both services remain stable and use the existing key;
- native registration works;
- API-authenticated native Secure TCP works when an API is deployed;
- P2P and native Relay work; and
- the expected native Geo and failover decisions remain unchanged.
Stop here if the native baseline regresses.
Install the candidate as data/starry/config.yaml, then invoke the authenticated
Control Agent POST /control/v1/runtime:reload operation and inspect logs:
docker logs --tail 200 rustdesk-starry-hbbsThe response and logs must report a new generation, matching source/effective digests, and successful subsystem acknowledgements. Validate native and every previously enabled WSS/mixed path again. Process survival alone is not acceptance; an invalid candidate retains the prior last-known-good generation.
- Deploy the Linux Control Agent with
write_enabled: falseand a private listener. Verify mTLS CA/URI-SAN and service-JWT audience/azp/scope denies. - Verify read-only status/Relay/config endpoints and repeated side-effect-free allocation simulation. Do not enable writes yet.
- In staging only, enable writes and exercise apply, rollback, HBBS outage, Agent restart, disk drift, and recovery blocking.
- Deploy the compatible client token issuer, public Ed25519 JWKS, and mTLS
introspection endpoint. Keep HBBS
connection_auth.mode: audit. - Run audit for a full business cycle and complete native TCP, Secure TCP, WSS, direct Relay, logout/revoke/disable/password-reset, key rotation, and dependency-failure tests.
- Canary
enforceon one instance or user cohort. Expand only with measured evidence; UDP initiation stays unsupported and must never allocate.
Use the complete checklist in Operations and Verification.
If only WebSocket Signal regresses and native behaviour remains sound:
- set
websocket_signal.enabled: false; - run the authenticated
POST /control/v1/runtime:reloadoperation; - confirm the management response and HBBS drain log;
- disable WebSocket on clients or remove the rollout policy; and
- re-verify native registration, P2P, Secure TCP, and native Relay.
Keep the public Nginx locations closed or unused according to your rollback policy. Existing WSS sessions are drained when the feature is disabled.
For connection-authentication regression, make the local controlled change
from enforce to audit and require a synchronous reload acknowledgement.
There is intentionally no remote one-click authentication bypass. Stop or
return the Agent to read-only independently; HBBS/HBBR continue using the last
active configuration. An operation in manual_intervention_required blocks
new writes until disk bytes and runtime digests are reconciled.
Restore the previous .env and configuration from the reviewed backup:
cp -a ../rustdesk-starry-backup-YYYYMMDDTHHMMSSZ/.env .env
cp -a ../rustdesk-starry-backup-YYYYMMDDTHHMMSSZ/compose.yaml compose.yaml
cp -a ../rustdesk-starry-backup-YYYYMMDDTHHMMSSZ/data/starry/config.yaml \
data/starry/config.yaml
docker compose --env-file .env -f compose.yaml config --quiet
docker compose --env-file .env -f compose.yaml up -d hbbs hbbr
docker compose --env-file .env -f compose.yaml logs --tail 200 hbbs hbbrReplace the placeholder backup path only after verifying its resolved location and contents. Do not copy an entire old data directory over a live deployment unless data-format compatibility requires it and the services are stopped. Usually preserving the current key/state and restoring only the compatible config plus previous image is the safer first rollback.
After rollback, repeat the native and applicable API/Relay acceptance tests. Before starting patch-v1.1.0, the restored file must be schema v2 or v1; patch-v1.1.0 does not understand schema v3. Preserve the v1.2 Agent audit and transaction state separately until the incident is closed.
For DEB packages, download the matching architecture, verify the release
checksum, back up /var/lib/rustdesk-server-starry, then install the packages
with your package manager. Restart and inspect one service at a time:
sudo systemctl restart rustdesk-server-starry-hbbs
sudo systemctl status rustdesk-server-starry-hbbs --no-pager
sudo journalctl -u rustdesk-server-starry-hbbs -n 200 --no-pager
sudo systemctl restart rustdesk-server-starry-hbbr
sudo systemctl status rustdesk-server-starry-hbbr --no-pagerThe HBBR package is an unmodified upstream HBBR built from the pinned official revision. Rollback requires the previous package files or repository snapshot; do not assume a package cache still contains them.
For standalone binaries, keep versioned filenames and atomically update a service symlink or service path. Never overwrite the only known-good binary before its checksum and backup are recorded.
- the Starry config is rejected or unexpectedly falls back;
- existing keys change or persistent files disappear;
- native registration or native Relay regresses;
- Secure TCP fails for previously working authenticated clients;
- no eligible Relay exists for a required transport;
- WSS health never becomes ready after the documented threshold; or
- a connection-auth request bypasses the shared gate or an expected client is unexpectedly denied;
- JWKS/introspection failure appears to fail open;
- Agent apply lacks a matching runtime acknowledgement or enters
manual_intervention_required; or - a two-client session cannot complete the required control/data test.
Publication checks and CI results are useful release evidence, but they do not replace acceptance on your DNS, certificates, proxies, networks, and clients.
- Documentation home
- Getting started
- Docker image usage
- Docker deployment
- Native deployment
- Multi-node deployment
- Reverse proxy and TLS
- Client configuration
- Account/API integration
- Configuration reference
- Connection authentication
- Control Agent
- GEO rules: basics
- GEO rules: advanced
- Operations and verification
- Troubleshooting
- Upgrade and rollback
- Architecture and build
- 文档主页
- 快速开始
- Docker 镜像使用
- Docker 部署
- 原生部署
- 中心与 Relay 多节点部署
- 反向代理与 TLS
- 客户端配置
- 账户与 API 服务接入
- 配置参数详解
- 连接认证
- Control Agent
- Geo 规则:入门
- Geo 规则:进阶
- 运维与完整验证
- 常见问题排查
- 版本升级与回滚
- 架构与构建