Skip to content

ThinkWatch Core 0.78.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 13:59
· 43 commits to main since this release

This release adds configuration packs, import and export, local backups, and sync between devices.

Upgrade notes

  • The control-plane protocol version is now 50. Use the ThinkWatch Lite release that ships with 0.78.0; earlier Lite releases cannot connect.
  • The request store's schema is unchanged; nothing is cleared.
  • Local backups replace the change history. The old history files (history/*.yaml) are removed when the first backup is kept. GET /config/history and POST /config/rollback are gone; use /backups.
  • Upstream addresses that contain a backslash, or a user name or password before the host, are now rejected. A configuration that has one starts in safe mode; move the credential into the key or a header.
  • control.config_not_repairable is replaced by control.config_unrepairable.
  • For crates that embed tw_bedrock: sign_service is new and signs requests for any AWS service.

Configuration packs. A pack is one .twconfig file that holds the configuration, the plugin scripts and the app's general preferences. Exports, shared upstreams, backups and sync versions all use it. A pack can be encrypted with a passphrase.

Export and import.

  • Export the whole configuration or chosen items; items they refer to come along. Secrets are included by default and can be left out.
  • Import adds what is new. An item with the same name and different content is a conflict; each one is overwritten, imported under a new name, or skipped. Global settings are taken as they are when the device never changed them.
  • A pack without secrets keeps this device's secret for an item only when the destination is the same: scheme, host, port, AWS region, OAuth token endpoint and outbound proxy. Otherwise the item arrives disabled and marked as missing its key.
  • Imported plugins arrive disabled. ChatGPT logins and rotating OAuth refresh tokens never leave the device.
  • Packs from older releases are repaired the way safe mode repairs a configuration, and the preview lists each fix. Packs from newer releases ask for an update.
  • CLI: twcore export, twcore import.

Backups. Every configuration change keeps a version with the plugins included, and the last 10 are kept. A restore can bring back the whole version or chosen items, and the preview and the write follow the same plan. The device's own settings (listening, control key, retention, sync) and current logins stay as they are, and a restore can itself be undone. Backups can be restored from safe mode. CLI: twcore backup list | restore.

Sync between devices.

  • A folder (iCloud Drive, Dropbox, OneDrive, Syncthing, a network share), a WebDAV server or S3-compatible storage keeps one configuration for several devices, remote cores included.
  • Versions are only ever added. Changes merge item by item against the last version both sides share; only the same part of the same item changed in two ways is a conflict. A conflict travels with the versions and is resolved once, on any device, by taking either side or keeping both.
  • Encryption with a sync passphrase is chosen when sync is turned on and is on by default. An encrypted location never accepts plain versions and never turns itself off.
  • Upstreams can be kept off sync, together with the routes, aliases and groups that refer to them. Gateway keys used by clients this device has taken over are never removed by sync or a restore.
  • The sync location keeps the latest and the previous version as an off-site backup.
  • CLI: twcore sync status | now | enable | disable | republish.

Downloads

Platform Binary Archive for server installation
Linux, x86_64 twcore-x86_64-unknown-linux-gnu twcore-x86_64-unknown-linux-gnu.tar.gz
Linux, aarch64 twcore-aarch64-unknown-linux-gnu twcore-aarch64-unknown-linux-gnu.tar.gz
macOS, Apple silicon twcore-aarch64-apple-darwin —
Windows, x64 twcore-x86_64-pc-windows-msvc.exe —
Windows, ARM64 twcore-aarch64-pc-windows-msvc.exe —

Each file is published with a .sha256 file beside it. A Linux archive contains twcore, the systemd unit twcore.service and LICENSE. ThinkWatch Lite includes its own copy of twcore; the files here are for running core separately, such as on a server.

Server installation

On Linux (x86_64 or aarch64), the install script sets up twcore as a systemd service. This installs 0.78.0:

curl -fsSL https://raw.githubusercontent.com/ThinkWatchProject/ThinkWatch-Core/main/scripts/install.sh | sudo sh -s -- --version 0.78.0

An installation made with the script switches to 0.78.0 with:

sudo twcore upgrade --version 0.78.0 --restart

Configuration, the remote control port and connecting ThinkWatch Lite are described in docs/server.md.

Verifying a download

A .sha256 file holds the SHA-256 of the file followed by its name. With both files in the current directory, on Linux:

sha256sum -c twcore-x86_64-unknown-linux-gnu.tar.gz.sha256

On macOS:

shasum -a 256 -c twcore-aarch64-apple-darwin.sha256

On Windows, in PowerShell, the following prints True when the binary matches:

(Get-FileHash .\twcore-x86_64-pc-windows-msvc.exe).Hash -eq (Get-Content .\twcore-x86_64-pc-windows-msvc.exe.sha256).Split()[0]

The install script and twcore upgrade check the SHA-256 themselves.

What's Changed

  • Sync and backup: config packs, import and export, local backups, multi-device sync by @fylorn in #352

Full Changelog: v0.77.0...v0.78.0