DOCUMENTATION

Deploy TucDesk in cloud or self-hosted mode

Operational documentation for installing agents, running the open source infrastructure, configuring the closed-source dashboard image, and understanding the encryption model.

GETTING STARTED

Cloud Quickstart

  1. Sign up at app.tucdesk.app.
  2. Install the agent on a machine.
  3. Pair with the displayed key.
  4. Open a browser, TUI, or mobile session.
curl -fsSL https://get.tucdesk.app/install.sh | bash

What happens during first install

The installer downloads the signed agent artifact, creates the service user, generates an ED25519 agent identity, writes the local config file, starts the system service, and prints the pairing key. In staging, every hosted endpoint resolves to staging infrastructure: installer from https://get.tucdesk.app/install.sh, API from https://api.tucdesk.app, and rendezvous from https://rendezvous.tucdesk.app.

SELF-HOSTING

Self-Hosted Quickstart

Self-hosting requires a Linux host, public IP, DNS records for dashboard, API, rendezvous, and relay, Docker with Compose v2, a Postgres database, Redis, SMTP, object storage for recordings, and inbound UDP+TCP access to the relay port.

cp .env.selfhosted.example .env.selfhosted
docker compose -f docker-compose.selfhosted.yml --env-file .env.selfhosted up -d

Public endpoint model

Internal service URLs can be Docker-network names such as http://api:8090. Public URLs must be internet reachable because agents and mobile apps use them from outside the Docker network.

TUCDESK_PUBLIC_API_URL=https://api.yourdomain.com
TUCDESK_PUBLIC_RENDEZVOUS_URL=https://rv.yourdomain.com
TUCDESK_PUBLIC_RELAY_ADDR=rv.yourdomain.com:4101
TUCDESK_DASHBOARD_URL=https://dash.yourdomain.com

Agent profile persistence

Self-hosted install commands pass explicit environment variables. The installer writes those values to the agent config file so the service does not depend on shell environment variables after reboot.

TUCDESK_MODE=self_hosted \
TUCDESK_API_URL="https://api.yourdomain.com" \
TUCDESK_RENDEZVOUS_URL="https://rv.yourdomain.com" \
TUCDESK_RELAY_ADDR="rv.yourdomain.com:4101" \
TUCDESK_RELAY_URL="https://rv.yourdomain.com" \
curl -fsSL https://get.tucdesk.app/install.sh | bash
ARCHITECTURE

How TucDesk works

API

REST and WebSocket control plane. Auth, teams, sessions, policy, recordings, and audit live here.

Rendezvous

Agent registration, discovery, and signaling. Agents prove identity with signed payloads.

TURN Relay

UDP/TCP relay fallback. It carries ciphertext only and cannot decrypt sessions.

Dashboard

Next.js web control plane. Self-hosters run the same image with TUCDESK_API_URL at runtime.

ServerProfile

Client boundary object that resolves cloud defaults, env overrides, or saved self-hosted endpoints.

Recordings

Tenant-prefixed object paths under recordings/{team_id}/{session_id}/ for isolation and deletion.

Mobile apps enter one dashboard URL, call /api/platform/profile, validate the returned profile, then save it in secure storage.
GET https://app.tucdesk.app/api/platform/profile

{
  "mode": "self_hosted",
  "api_url": "https://api.tucdesk.app",
  "rendezvous_url": "https://rendezvous.tucdesk.app",
  "relay_addr": "rendezvous.tucdesk.app:4102",
  "relay_url": "https://rendezvous.tucdesk.app"
}
INSTALLATION

Agent and client installation

SurfaceInstall pathNotes
Linux Agentcurl shell installer, .deb, .rpm, .apkamd64, arm64, and armhf rollout paths.
macOS Agentshell installer, Homebrew, signed packageApple Silicon and Intel supported.
Windows AgentPowerShell, ZIP, MSI, setup EXESigned Windows packages for managed rollout.
iOS AppApp Store / beta channelFirst launch supports cloud or self-hosted dashboard URL.
Android AppGoogle Play / APKEncrypted profile storage and biometric unlock.
TUI ClientGo release binaryFive-screen terminal client for operators.
AGENT RUNBOOKS

Install, operate, and recover every TucDesk surface

Each platform has the same operational shape: install, pair, verify connectivity, then keep a short recovery checklist close to the operator.

Linux Agent

Use the Linux agent for servers, containers hosts, and long-running fleet workers. It installs as a system service and keeps its TucDesk identity on disk.

Walkthrough

  1. Install the signed agent artifact with the shell installer or package manager.
  2. Pair the machine with a dashboard-generated key.
  3. Tag the agent by role, region, and environment for fleet policy.
  4. Verify that command execution and encrypted session consent match team policy.

Runbook checks

  • systemctl status tucdesk-agent
  • journalctl -u tucdesk-agent -n 200 --no-pager
  • tucdesk status

Wiki notes

  • Service: tucdesk-agent.service
  • Config: /etc/tucdesk/agent.env
  • Identity: /var/lib/tucdesk/identity.json
curl -fsSL https://get.tucdesk.app/install.sh | bash

macOS Agent

Use the macOS agent for Apple Silicon and Intel workstations. The installer registers a launchd service and stores the agent profile locally.

Walkthrough

  1. Run the installer from Terminal on the target Mac.
  2. Approve the generated pairing key in the dashboard.
  3. Grant any required local permissions for the workflows your team enables.
  4. Confirm the launchd agent reconnects after logout or reboot.

Runbook checks

  • launchctl print gui/$UID/com.pth.tucdesk.agent
  • log show --predicate 'process == "tucdesk-agent"' --last 30m
  • tucdesk status

Wiki notes

  • Service: com.pth.tucdesk.agent
  • Config: /Library/Application Support/TucDesk/agent.env
  • Identity: /Library/Application Support/TucDesk/identity.json
curl -fsSL https://get.tucdesk.app/install.sh | bash

Windows Agent

Use the Windows agent for managed desktop and server fleets. The service is designed for signed MSI rollout and policy-controlled pairing.

Walkthrough

  1. Install with MSI, setup EXE, or PowerShell on the target host.
  2. Pair with a dashboard key and assign environment tags.
  3. Verify Windows service startup type and outbound access to rendezvous.
  4. Test operator approval before enabling broad fleet commands.

Runbook checks

  • Get-Service TucDeskAgent
  • Get-EventLog -LogName Application -Source TucDeskAgent -Newest 50
  • tucdesk.exe status

Wiki notes

  • Service: TucDeskAgent
  • Config: C:\ProgramData\TucDesk\agent.env
  • Identity: C:\ProgramData\TucDesk\identity.json
irm https://get.tucdesk.app/install.ps1 | iex

iOS App

Use the iOS app for approvals, fleet triage, recordings, and secure operator workflows from iPhone or iPad.

Walkthrough

  1. Open the app and select cloud or self-hosted mode.
  2. For self-hosted mode, enter the dashboard URL so the app can fetch its server profile.
  3. Sign in, enable Face ID or Touch ID, and verify push notification delivery.
  4. Approve a low-risk test session before using production agents.

Runbook checks

  • Check /api/platform/profile from the dashboard URL.
  • Confirm APNs permissions are enabled for TucDesk.
  • Use Settings to reset the saved server profile when moving environments.

Wiki notes

  • Storage: Keychain, WhenUnlockedThisDeviceOnly
  • Auth: Face ID / Touch ID
  • Discovery: dashboard profile endpoint and saved ServerProfile
Install TucDesk from the App Store, then choose TucDesk Cloud or enter your dashboard URL.

Android App

Use the Android app for mobile fleet operations with biometric unlock, encrypted profile storage, and Google Play distribution.

Walkthrough

  1. Open the app and select cloud or self-hosted mode.
  2. Enter the dashboard URL for self-hosted deployments.
  3. Sign in, enable Android biometrics, and confirm Firebase push delivery.
  4. Open a test agent and review the consent prompt before production use.

Runbook checks

  • Check /api/platform/profile from the dashboard URL.
  • Confirm notification permissions and battery optimization settings.
  • Use Settings to reset encrypted profile storage when switching servers.

Wiki notes

  • Storage: EncryptedSharedPreferences
  • Auth: Android biometric framework
  • Discovery: dashboard profile endpoint and saved ServerProfile
Install TucDesk from Google Play, then choose TucDesk Cloud or enter your dashboard URL.

TUI Client

Use the terminal UI for keyboard-first operators who need agent search, session review, fleet runs, and audit inspection from a shell.

Walkthrough

  1. Install the CLI or download the release binary.
  2. Authenticate with a team-scoped API token.
  3. Use tags and saved filters to narrow fleet actions.
  4. Review audit output after every command or session workflow.

Runbook checks

  • tucdesk login
  • tucdesk agents list --tag prod
  • tucdesk fleet run --tag canary --command "uptime"

Wiki notes

  • Screens: agents, sessions, recordings, fleet, settings
  • Auth: team API token or operator login
  • Transport: API and rendezvous endpoints from ServerProfile
curl -fsSL https://get.tucdesk.app/install.sh | bash
ENVIRONMENT VARIABLES

Self-hosted configuration

VariableRequiredDescriptionExample
TUCDESK_API_URLyesInternal URL the dashboard container uses to reach the APIhttp://api:8090
TUCDESK_PUBLIC_API_URLyesPublic API URL returned to clientshttps://api.yourdomain.com
TUCDESK_PUBLIC_RENDEZVOUS_URLyesPublic rendezvous URL for agent registration and signalinghttps://rv.yourdomain.com
TUCDESK_PUBLIC_RELAY_ADDRyesRelay host and port reachable from agentsrv.yourdomain.com:4101
TUCDESK_PUBLIC_RELAY_URLnoHTTPS relay service URL when separate from rendezvoushttps://rv.yourdomain.com
TUCDESK_DASHBOARD_URLyesPublic dashboard URL used by mobile first-run discoveryhttps://dash.yourdomain.com
TUCDESK_POSTGRES_PASSWORDyesPostgres password for the self-hosted stackgenerated secret
TUCDESK_AUDIT_KEY_SECRETyesHex key used to sign and verify audit entriesopenssl rand -hex 32
SMTP_HOSTyesSMTP host for invites and password resetsmtp.yourdomain.com
SMTP_PORTyesSMTP port used by the API mailer587
SMTP_USERNAMEyesSMTP username for transactional mailnoreply@yourdomain.com
SMTP_PASSWORDyesSMTP password or provider app passwordprovider secret
TUCDESK_RECORDING_KEYrecommendedKey used for session recording encryptionopenssl rand -base64 32
TUCDESK_SERVER_CERT_FINGERPRINToptionalsha256 certificate pin exposed to clients and installerssha256:<64 hex chars>
SECURITY

Encryption architecture

Identity

ED25519 agent identity, signed registration, and operator-signed control actions.

Session

X25519 ECDH, HKDF label tucdesk-session-v1, and AES-256-GCM encrypted payloads.

Audit

Immutable signed audit records with exportable actor, action, and session context.

RUNBOOKS

Operational runbooks for humans and AI agents

Runbooks are written as deterministic procedures so an on-call engineer, an AI assistant, or an automation job can follow the same recovery path.

Staging deploy failure

Check GitHub Environment secrets, rerun deploy-staging, inspect /home/ubuntu/tucdesk-staging logs, and verify health at api-stag.

curl -fsSL https://api.tucdesk.app/healthz

Audit signing key recovery

Use docs/runbooks/staging-audit-signing-key-recovery.md before rotating TUCDESK_AUDIT_KEY_SECRET.

docker compose --project-name tucdesk-staging --env-file .env.staging logs api

Agent cannot pair

Verify dashboard runtime config, rendezvous health, relay port 4101, and pairing key expiration.

curl -fsSL https://rendezvous.tucdesk.app/healthz

Recording playback failure

Check recording path prefix, object storage credentials, encryption key, and presigned URL generation.

recordings/{team_id}/{session_id}/session.cast
WIKIS + KNOWLEDGE GRAPH

How TucDesk documents itself for operators and AI

The documentation model is a graph: concepts link to config keys, runbooks, API endpoints, service ownership, risk controls, and verification commands.

TucDesk Knowledge Graph

ServerProfile
  ├─ Agent resolver: config file → env vars → cloud defaults
  ├─ Dashboard resolver: team runtime config → TUCDESK_API_URL → cloud defaults
  └─ Mobile resolver: Keychain/SecureStorage → first-run wizard

Runtime Config
  ├─ API: /v1/team/runtime-config
  ├─ Validate: /v1/team/runtime-config/validate
  ├─ Dashboard proxy: /api/team/runtime-config
  └─ Install command: generated from saved team config

Security Controls
  ├─ ED25519 identity
  ├─ X25519 session exchange
  ├─ AES-256-GCM transport
  ├─ ACL policy
  └─ Signed audit log
MCP INTEGRATION

AI-agent safe fleet operations

MCP clients should use the same documented APIs and runbooks. Tools are scoped by API key permissions and all high-risk operations require policy evaluation and audit logging.

Tool groupToolsSafety boundary
Inventorylist_agents, get_agent, get_security_postureRead-only scopes and team_id isolation
Sessionsconnect_session, list_sessions, get_recordingConsent gate, recording policy, audit entry
Executionrun_command, list_fleet_runsACL evaluation and human approval for high risk
Configurationmanage_acl, list_address_book, pair_agentAdmin scope and signed request proof
{
  "mcpServers": {
    "tucdesk": {
      "command": "npx",
      "args": ["-y", "tucdesk-mcp"],
      "env": {
        "TUCDESK_API_URL": "https://api.tucdesk.app",
        "TUCDESK_API_KEY": "tdk_..."
      }
    }
  }
}
API REFERENCE

Authenticated API surface

AreaPurpose
AuthenticationOperator login, refresh, invite, API key, and signed request verification.
AgentsList, pair, label, tag, and inspect online machines.
SessionsOpen, end, audit, record, and replay remote sessions.
FleetRun approved commands across tagged machines and inspect history.
WebhooksTeam-scoped event delivery for external systems.
MCP IntegrationAI-safe tools for fleet status, sessions, audit, ACL, and pairing.
TucDesk