Deploy ttstd relay and configure secure public WSS clients

This commit is contained in:
tongtong committed 2026-11-12 13:08:04 +08:00
1 parent 82adce545d
commit c38f067bea
16 files changed
+384 -24

No files matched your search

+3 -1
View File
@@ -1,9 +1,11 @@
# Process management examples
Actual `ttstd.com` deployment and startup commands are documented in `docs/deployment-ttstd.md`.
Examples are templates, not installed automatically. Replace paths, domain, user and tokens before use. Public endpoints require HTTPS/WSS.
- Linux: create a dedicated `ads` user and `/opt/ads`; protect `/etc/ads/*.env` so only the intended account/root can read them. `server.env` contains `ADS_AGENT_TOKEN=...` and `ADS_CLIENT_TOKEN=...`; `agent.env` contains only `ADS_AGENT_TOKEN=...`. Copy the respective systemd unit to `/etc/systemd/system/`, then enable it. The local client normally runs as the desktop user, so it shares that user's ADB server and keys.
- macOS: edit the launchd plist, restrict its file permissions, and install it as the appropriate user's LaunchAgent. It contains a credential, so do not publish the edited file. Client launchd configuration can use the same pattern with `ads-client` and `ADS_CLIENT_TOKEN`.
- Windows: the binaries run as foreground long-lived processes. Use Task Scheduler to launch them under the intended account at logon, with a startup wrapper that sets the token environment variable, and configure restart on failure. Keep wrapper/config files readable only by that account and administrators. Native Service Control Manager support and installers are not implemented; do not use `sc.exe create` directly on these binaries.
These templates have not been exercised on Linux/macOS yet. Test the binaries and process manager on each target platform before relying on unattended startup.
The Linux server unit has been deployed and verified on Debian 12. Agent service and macOS templates still require target-platform validation.