droboticflow/docs/drosync/installation.md
2026-08-20 19:47:43 +08:00

4.6 KiB

Installation

Common prerequisites

  • The control-plane base URL may use HTTP or HTTPS. HTTP is currently allowed for POC deployments, but it sends drosync credentials and control-plane metadata without transport encryption. Use an isolated network or accepted-risk POC endpoint only.
  • The management page may expose an explicitly labeled POC preview package before native signing credentials are available. Preview packages are manual-download only, must be verified with the displayed SHA-256, and are never returned by the automatic-update API. Production installation still requires the native signatures described below.
  • Add --require-https to configure and auth when a deployment must reject HTTP. The daemon persists this policy with the profile.
  • An administrator creates a scoped drosync Access Key ID/Secret in 对象存储 → 密钥验证. The scope fixes the allowed Space, relative prefix, and actions. The Secret is displayed only once.
  • drosync auth validates that Key/Secret directly and automatically registers the device for audit; there is no short-code or manual device approval.
  • For the initial headless authentication, read the drosync Secret from a 0600 file with --secret-file or inject it through DROSYNC_SECRET. After authentication, the daemon reads its bearer token from the OS credential store, DROSYNC_TOKEN, or a 0600 file named by DROSYNC_SECRET_FILE.
  • Do not put device credentials, BOS AK/SK, signing keys, or notarization profiles in the repository.

Ubuntu 22.04/24.04 x86_64

Install the signed DEB and enable either one mode:

sudo dpkg -i drosync_1.0.0_amd64.deb
systemctl --user enable --now drosync.service
# Or, for a managed machine:
sudo systemctl enable --now drosync.service

The portable tarball contains all three binaries and a user systemd unit. Validate the detached GPG signature and SHA-256 before extraction.

Ubuntu 22.04 ARM64 / RDK S100

Use only the linux-arm64 DEB or portable tar. These packages contain the CLI and daemon, omit the desktop GUI and identify themselves as releasePlatform=linux-arm64.

The headless build deliberately does not depend on the desktop D-Bus keyring. Configure a writable token file in the daemon environment before authenticating:

sudo install -d -o drosync -g drosync -m 0700 /var/lib/drosync
sudo install -o drosync -g drosync -m 0600 /dev/null /var/lib/drosync/token
printf '%s\n' 'DROSYNC_SECRET_FILE=/var/lib/drosync/token' | sudo tee /etc/drosync/environment >/dev/null

drosync auth then writes the returned bearer token through a same-directory 0600 temporary file, fsync and atomic rename. Missing DROSYNC_SECRET_FILE, unsafe parent permissions, symlinks, special files or non-0600 files fail closed. The package and environment file never contain the token itself.

macOS 13+ arm64

Install the notarized .pkg. It installs /Applications/drosync.app, /usr/local/bin/drosync, a LaunchAgent, and a LaunchDaemon definition. Enable only the per-user agent or the administrator-managed daemon:

launchctl bootstrap gui/"$(id -u)" /Library/LaunchAgents/com.drobotics.drosync.agent.plist
sudo launchctl bootstrap system /Library/LaunchDaemons/com.drobotics.drosync.daemon.plist

The package must pass spctl --assess --type install and have a stapled notarization ticket.

Windows 10/11 x86_64

The Authenticode-signed MSI installs the CLI, GUI, and Windows Service. Run it elevated for system service mode. install-user.ps1 provides a non-admin per-user login-start alternative. Validate with:

Get-AuthenticodeSignature .\drosync-1.0.0-windows-x86_64.msi
Get-Service drosync

First configuration

drosync configure --server https://data.example.com
drosync auth --server https://data.example.com --profile default \
  --access-key-id dsk_example --secret-file /run/secrets/drosync-client-secret
drosync mapping add /data/capture --space oss_example --remote-prefix incoming
drosync doctor
drosync plan <mapping-id>
drosync sync <mapping-id>

For a strict profile, configure and authenticate with the same policy:

drosync configure --server https://data.example.com --require-https
drosync auth --server https://data.example.com --profile default \
  --access-key-id dsk_example --secret-file /run/secrets/drosync-client-secret \
  --require-https

When an http:// endpoint is accepted, CLI JSON and human-readable output include transportSecurity.encrypted=false and the corresponding accepted-risk message. This exception applies only to the control-plane endpoint. Public BOS presigned uploads and update artifacts remain HTTPS-only; loopback HTTP remains available for local test fixtures.