### Security Configuration Example Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md A JSON configuration example for integrating QuickDesk into an MCP server setup, including rate limits, timeouts, and device whitelisting. ```json { "mcpServers": { "quickdesk": { "command": "quickdesk-mcp", "args": [ "--rate-limit", "120", "--session-timeout", "7200", "--allowed-devices", "111222333,444555666" ], "env": { "QUICKDESK_TOKEN": "your-secret-token" } } } } ``` -------------------------------- ### Build and package QuickDesk on Windows Source: https://github.com/barry-ran/quickdesk/blob/master/README.md Requires Visual Studio 2022 + MSVC. Set ENV_QT_PATH to the Qt installation path, then run the build, publish, and package scripts with the Release configuration. Packaging requires Inno Setup. ```bash set ENV_QT_PATH=C:\Qt\6.8.3 # Build scripts\build_qd_win.bat Release # Package (requires Inno Setup) scripts\publish_qd_win.bat Release scripts\package_qd_win.bat Release ``` -------------------------------- ### Silent Installation Commands for Windows Source: https://github.com/barry-ran/quickdesk/blob/master/README.md Examples of using the Windows installer with various command-line switches for silent installation, task management, and custom directory selection. ```bat REM Default tasks (includes virtual display driver when selected in script defaults) QuickDesk-win-x64-setup.exe /VERYSILENT REM Explicit tasks QuickDesk-win-x64-setup.exe /VERYSILENT /TASKS="desktopicon,startmenuicon,vdd" REM Install without virtual display driver QuickDesk-win-x64-setup.exe /VERYSILENT /TASKS="desktopicon,startmenuicon" REM Custom install path QuickDesk-win-x64-setup.exe /VERYSILENT /DIR="D:\QuickDesk" ``` -------------------------------- ### Install Docker on CentOS/Rocky Linux Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Installs Docker CE and related tools using yum, starts and enables the Docker service, and verifies the installation with docker --version. ```bash # Install Docker sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install -y docker-ce docker-ce-cli containerd.io sudo systemctl start docker sudo systemctl enable docker # Verify installation docker --version ``` -------------------------------- ### Verify coturn installation Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Check the installed version of the turnserver binary. ```bash turnserver --version ``` -------------------------------- ### Remote Skill Host Tool Usage Examples Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Examples demonstrating how to discover available tools and execute specific remote operations like system info retrieval, shell commands, and file reading. ```text // Discover available tools on the remote host skill_list_tools(device_id=dev_id) → returns all tools with descriptions and parameter schemas // Get system information skill_exec(device_id=dev_id, tool="get_system_info", args={}) → OS, CPU, memory, disk, hostname, uptime // Run a command on the remote host skill_exec(device_id=dev_id, tool="run_command", args={"command": "ipconfig /all"}) → stdout, stderr, exit_code // Read a remote file skill_exec(device_id=dev_id, tool="read_file", args={"path": "C:\\Users\\admin\\config.ini"}) → file contents ``` -------------------------------- ### Install Go 1.24 on Linux Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Downloads and installs Go 1.24.0 for linux-amd64, configures PATH in ~/.bashrc, and verifies with 'go version'. ```bash # Download Go 1.24 cd /tmp wget https://go.dev/dl/go1.24.0.linux-amd64.tar.gz # Extract and install sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf go1.24.0.linux-amd64.tar.gz # Configure environment variables echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc source ~/.bashrc # Verify installation go version ``` -------------------------------- ### Install coturn on Ubuntu or Debian Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Use apt to update package lists and install the coturn package. ```bash sudo apt update sudo apt install -y coturn ``` -------------------------------- ### GET /v1/preset response Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Example JSON response from the preset endpoint, containing announcements, links, webclient URL, and minimum native-client version. ```json { "announcement": { "zh_CN": "...", "en_US": "..." }, "links": { "zh_CN": [...], "en_US": [...] }, "webclient_url": "https://web.quickdesk.cc", "min_version": "2.10" } ``` -------------------------------- ### Enable and Start Coturn on Ubuntu/Debian Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Enables the coturn service on Ubuntu/Debian by first setting TURNSERVER_ENABLED=1 in /etc/default/coturn, then enabling and starting the service and checking its status. ```bash # Enable the service (must also set TURNSERVER_ENABLED=1) sudo sed -i 's/^#TURNSERVER_ENABLED=1/TURNSERVER_ENABLED=1/' /etc/default/coturn sudo systemctl enable coturn sudo systemctl start coturn # Check status sudo systemctl status coturn ``` -------------------------------- ### Clone repository and prepare configuration Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Commands to clone the QuickDesk repository, navigate to the SignalingServer directory, copy the example environment file, and edit it with vim. ```bash git clone git@github.com:barry-ran/QuickDesk.git cd QuickDesk/SignalingServer # Copy and edit your configuration cp .env.example .env vim .env ``` -------------------------------- ### Health Endpoint Response Example Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Example JSON response from GET /health when all components are healthy. The version field defaults to "dev" if not set at build time. ```json { "status": "ok", "version": "v2.10.0", "components": { "postgres": "ok", "redis": "ok" } } ``` -------------------------------- ### Install Node.js 20 LTS for Frontend Build Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Installs Node.js 20 LTS via NodeSource RPM repository and verifies with 'node --version' and 'npm --version'. ```bash # Install Node.js 20 LTS curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash - sudo yum install -y nodejs # Verify installation node --version npm --version ``` -------------------------------- ### Configure and Run Signaling Server Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Copies the environment configuration, creates a systemd service, and starts the signaling server. ```bash # Copy configuration template to runtime directory sudo cp .env /opt/quickdesk-signaling/.env # Edit configuration as needed (database, TURN, API key, etc.) sudo vim /opt/quickdesk-signaling/.env # Create systemd service sudo cat > /etc/systemd/system/quickdesk-signaling.service << 'EOF' [Unit] Description=QuickDesk Signaling Server After=network.target docker.service Requires=docker.service [Service] Type=simple User=root WorkingDirectory=/opt/quickdesk-signaling ExecStart=/opt/quickdesk-signaling/quickdesk_signaling Restart=always RestartSec=5 [Install] WantedBy=multi-user.target EOF # Start the service sudo systemctl daemon-reload sudo systemctl start quickdesk-signaling sudo systemctl enable quickdesk-signaling # Check service status sudo systemctl status quickdesk-signaling ``` -------------------------------- ### Install coturn on CentOS or Rocky Linux Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Use yum to install the EPEL repository and the coturn package. ```bash sudo yum install -y epel-release sudo yum install -y coturn ``` -------------------------------- ### Enable and Start Coturn on CentOS/Rocky Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Enables and starts the coturn service using systemctl, then checks its status. This is for CentOS/Rocky Linux distributions. ```bash # Enable the service sudo systemctl enable coturn sudo systemctl start coturn # Check status sudo systemctl status coturn ``` -------------------------------- ### Build and package QuickDesk on macOS Source: https://github.com/barry-ran/quickdesk/blob/master/README.md Requires Xcode Command Line Tools. Set ENV_QT_PATH to the Qt installation path, then run the build, publish, and package scripts with the Release configuration. ```bash export ENV_QT_PATH=/path/to/Qt/6.8.3 # Build bash scripts/build_qd_mac.sh Release # Package bash scripts/publish_qd_mac.sh Release bash scripts/package_qd_mac.sh Release ``` -------------------------------- ### GET /v1/admin/device-bindings Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Lists device bindings. ```APIDOC ## GET /v1/admin/device-bindings ### Description Lists device bindings. ### Method GET ### Endpoint /v1/admin/device-bindings ### Response #### Success Response (200) - List of device bindings ``` -------------------------------- ### GET /v1/admin/devices Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Lists all devices. ```APIDOC ## GET /v1/admin/devices ### Description Lists all devices. ### Method GET ### Endpoint /v1/admin/devices ### Response #### Success Response (200) - List of devices ``` -------------------------------- ### Configure Nginx Reverse Proxy for Signaling Server Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Installs Nginx, creates the configuration file at /etc/nginx/conf.d/quickdesk.conf to handle WebSocket and HTTP traffic, and restarts the service. Ensure you replace 'your-domain.com' with your actual domain name. ```bash # Install Nginx sudo yum install -y nginx sudo systemctl start nginx sudo systemctl enable nginx # Configure reverse proxy sudo cat > /etc/nginx/conf.d/quickdesk.conf << 'EOF' # Dynamic Connection header for WebSocket support map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream signaling { server 127.0.0.1:8000; } server { listen 80; server_name your-domain.com; # Replace with your domain client_max_body_size 100M; # v1 realtime WebSocket endpoints (long-lived). # /v1/realtime/events — user device-state stream (Qt + WebClient) # /v1/realtime/signal — WebRTC SDP/ICE relay (host + client) # Server sends Ping every 60s; set proxy_read_timeout > Ping interval. # 300s gives ample margin for transient network slowdowns. location /v1/realtime/ { proxy_pass http://signaling; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; proxy_send_timeout 300s; proxy_buffering off; } # HTTP API (/v1/*) and static admin SPA (/admin/, /). location / { proxy_pass http://signaling; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 30s; # Pre-flight CORS — the WebClient lives on a different # subdomain in most deployments. Add the WebClient origin to # the admin-panel `allowed_origins` setting; the signaling # server emits the appropriate Access-Control-* headers. } } EOF # Test configuration sudo nginx -t # Restart Nginx sudo systemctl restart nginx ``` -------------------------------- ### Deploy multiple instances with explicit names Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Specify instance names and ports for multiple deployments. Each instance gets its own data directory. ```bash ./deploy-build.sh --name test --port 8000 ./deploy-build.sh --name prod --port 9000 ``` -------------------------------- ### CMake minimum version and Qt path setup Source: https://github.com/barry-ran/quickdesk/blob/master/CMakeLists.txt Sets minimum CMake version to 3.19 and configures CMAKE_PREFIX_PATH from Qt6_DIR environment variable or a hardcoded Qt path. ```cmake # For VS2019 and Xcode 12+ support. cmake_minimum_required(VERSION 3.19 FATAL_ERROR) if(DEFINED ENV{Qt6_DIR}) set(CMAKE_PREFIX_PATH $ENV{Qt6_DIR}) elseif(EXISTS "D:/Qt/Qt5.15.2/6.8.3/msvc2022_64") set(CMAKE_PREFIX_PATH "D:/Qt/Qt5.15.2/6.8.3/msvc2022_64") endif() ``` -------------------------------- ### GET /v1/admin/settings Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves the current settings. ```APIDOC ## GET /v1/admin/settings ### Description Retrieves the current settings. ### Method GET ### Endpoint /v1/admin/settings ### Response #### Success Response (200) - Settings ``` -------------------------------- ### GET /v1/admin/preset Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves the current preset configuration. ```APIDOC ## GET /v1/admin/preset ### Description Retrieves the current preset configuration. ### Method GET ### Endpoint /v1/admin/preset ### Response #### Success Response (200) - Preset configuration ``` -------------------------------- ### Deploy PostgreSQL and Redis with Docker Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Creates data directories and starts PostgreSQL and Redis containers. Redis is configured with --notify-keyspace-events Ex to enable keyspace notifications, which are required for device online/offline tracking. The default Redis image has notifications disabled. ```bash # Create data directories sudo mkdir -p /data/quickdesk/{postgres,redis} # Start PostgreSQL docker run -d --name quickdesk-postgres \ --restart=always \ -p 5432:5432 \ -e POSTGRES_USER=quickdesk \ -e POSTGRES_PASSWORD=quickdesk123 \ -e POSTGRES_DB=quickdesk \ -v /data/quickdesk/postgres:/var/lib/postgresql/data \ postgres:15 # Start Redis # IMPORTANT: keyspace notifications must be enabled so that # host heartbeat-TTL expiries surface as `device.online.changed` # realtime events. Pass `--notify-keyspace-events Ex` (uppercase E, # lowercase x) to redis-server, or set `notify-keyspace-events Ex` # in redis.conf for a config-file deployment. docker run -d --name quickdesk-redis \ --restart=always \ -p 6379:6379 \ -v /data/quickdesk/redis:/data \ redis:7 redis-server --appendonly yes --notify-keyspace-events Ex # Verify running status docker ps ``` -------------------------------- ### Audit Log Format Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Example of the audit log entries recorded in logs/quickdesk_audit.log, showing allowed and denied operations. ```text [2026-03-01 23:45:12.345] [ALLOW] client_1 method=screenshot params={"deviceId":"111222333"} [2026-03-01 23:45:13.456] [DENY] client_2 method=mouseClick params={"x":100,"y":200} reason=permission_denied [2026-03-01 23:45:14.567] [DENY] client_1 method=keyboardType params={"text":"shutdown /s"} reason=dangerous_operation ``` -------------------------------- ### GET /v1/preset Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Returns the unified preset bundle including announcements, links, WebClient URL, and minimum native-client version. Consumed by PresetManager and WebClient bootstrap. ```APIDOC ## GET /v1/preset ### Description Returns the unified preset bundle (announcements, links, WebClient URL, minimum native-client version). Consumed by PresetManager in Qt and by the WebClient bootstrap. ### Method GET ### Endpoint /v1/preset ### Response #### Success Response (200) - **announcement** (object) - Announcement messages keyed by locale, e.g., zh_CN, en_US - **links** (object) - Links keyed by locale, e.g., zh_CN, en_US - **webclient_url** (string) - WebClient URL - **min_version** (string) - Minimum native-client version #### Response Example { "announcement": { "zh_CN": "...", "en_US": "..." }, "links": { "zh_CN": [...], "en_US": [...] }, "webclient_url": "https://web.quickdesk.cc", "min_version": "2.10" } ``` -------------------------------- ### GET /v1/ice-config Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Returns the global ICE configuration, including STUN and TURN servers and the current TURN config version. ```APIDOC ## GET /v1/ice-config ### Description Returns the global ICE configuration. Auth: X-API-Key (or hosts may additionally present Authorization: Bearer ). ### Method GET ### Endpoint /v1/ice-config ### Response #### Success Response (200) - **ice_servers** (array) - List of ICE server configurations. - **urls** (array of strings) - URLs for the ICE server. - **username** (string, optional) - Username for TURN servers. - **credential** (string, optional) - Credential for TURN servers. - **turn_config_version** (integer) - Version of the TURN configuration. #### Response Example { "ice_servers": [ { "urls": ["stun:stun.l.google.com:19302"] }, { "urls": ["turn:turn.example.com:3478"], "username": "...", "credential": "..." } ], "turn_config_version": 4 } ``` -------------------------------- ### Screen.getUiState Source: https://github.com/barry-ran/quickdesk/blob/master/test/websocket/index.html Get unified UI state (resolution + OCR + window title). ```APIDOC ## Screen.getUiState ### Description Get unified UI state (resolution + OCR + window title). ### Method WebSocket JSON-RPC ### Endpoint WebSocket message with method: "getUiState" ### Parameters #### Request Body - **deviceId** (string) - Required - The ID of the connection. ### Request Example { "method": "getUiState", "params": { "deviceId": "conn_1" } } ### Response Returns unified UI state. ``` -------------------------------- ### Build QuickDesk MCP from source Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Commands to navigate to the project directory and compile the binary using Cargo. ```bash cd QuickDesk/quickdesk-mcp cargo build --release # Binary: target/release/quickdesk-mcp (or quickdesk-mcp.exe on Windows) ``` -------------------------------- ### GET /v1/settings/public Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Returns a subset of runtime settings safe for unauthenticated clients, such as site name, brand, login logo URL, and registration enabled flag. ```APIDOC ## GET /v1/settings/public ### Description Subset of the runtime settings safe for unauthenticated clients (site name, brand, login logo URL, registration enabled flag, etc.). ### Method GET ### Endpoint /v1/settings/public ### Response #### Success Response (200) - No explicit response schema provided in source. ``` -------------------------------- ### Read version and define project Source: https://github.com/barry-ran/quickdesk/blob/master/CMakeLists.txt Reads version from file, defines project QuickDesk with CXX language, and prints version status. ```cmake # Read version numbers from file file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/version QD_FILE_VERSION) # project通常指的是逻辑上相对独立、完整,能够独立编译的集合 # 一个project可以单独设置名称、版本和语言 # 一般你的项目中某一部分需要有独立的名称/版本/不同的语言,那么就可以放到单独的project中 project(QuickDesk VERSION ${QD_FILE_VERSION} LANGUAGES CXX) message(STATUS "QD_FILE_VERSION:${QD_FILE_VERSION}, CMAKE_PROJECT_VERSION:${CMAKE_PROJECT_VERSION}") ``` -------------------------------- ### GET /v1/features response Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Example JSON response from the feature flags endpoint, showing boolean flags for SMS and registration. ```json { "sms_enabled": true, "register_enabled": true } ``` -------------------------------- ### Build the Signaling Server Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Clones the QuickDesk repository, builds the Vue 3 frontend, downloads Go dependencies, and compiles the signaling server binary with embedded frontend assets. Note: GORM AutoMigrate is disabled by default; set RUN_AUTO_MIGRATE=true in .env for first initialization. ```bash # Clone the code to your server cd /opt git clone git@github.com:barry-ran/QuickDesk.git cd QuickDesk/SignalingServer # Build frontend (admin dashboard + user portal, Vue 3 + Element Plus) cd web npm install npm run build cd .. # Download Go dependencies go mod tidy # Build (frontend assets are embedded via go:embed) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ go build -a -ldflags="-s -w -extldflags '-static'" \ -o quickdesk_signaling ./cmd/signaling # Create runtime directory and deploy sudo mkdir -p /opt/quickdesk-signaling sudo cp quickdesk_signaling /opt/quickdesk-signaling/ ``` -------------------------------- ### GET /health response Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Example JSON response from the health endpoint. Returns 503 with status 'degraded' if any component is non-ok. The version field comes from the Version ldflag and defaults to 'dev' when unset. ```json { "status": "ok", "version": "v2.10.0", "components": { "postgres": "ok", "redis": "ok" } } ``` -------------------------------- ### Run quickdesk-mcp via CLI Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Execute the binary directly from the command line with optional WebSocket URL and authentication token. ```bash quickdesk-mcp [--ws-url ws://127.0.0.1:9600] [--token YOUR_TOKEN] ``` -------------------------------- ### Project Directory Structure Source: https://github.com/barry-ran/quickdesk/blob/master/README.md An overview of the QuickDesk repository layout, detailing the locations of the Qt client, Rust MCP bridge, and Go signaling server. ```text QuickDesk/ ├── QuickDesk/ # Qt GUI client │ ├── main.cpp # Application entry point │ ├── src/ │ │ ├── api/ # WebSocket API server + request handlers │ │ ├── controller/ # Main controller │ │ ├── manager/ # Business managers (Host/Client/Process/TURN/...) │ │ ├── component/ # Video rendering, key mapping, cursor sync │ │ ├── core/ # Config center, user data │ │ ├── viewmodel/ # MVVM ViewModel │ │ └── language/ # i18n │ ├── qml/ │ │ ├── views/ # Main window, remote desktop window │ │ ├── pages/ # Remote control, settings, about pages │ │ ├── component/ # Fluent Design component library │ │ └── quickdeskcomponent/ # QuickDesk-specific components │ ├── base/ # Base utilities │ └── infra/ # Infrastructure (database, logging, HTTP) ├── quickdesk-mcp/ # Rust MCP Bridge (stdio ↔ WebSocket) │ └── src/ │ ├── main.rs # Entry point, CLI args, MCP server startup │ ├── server.rs # MCP tools, prompts, resources │ └── ws_client.rs # WebSocket client for Qt API ├── quickdesk-skill-host/ # Rust host-side skill host (Cargo workspace) │ ├── agent/ # Skill host main binary │ ├── mcp-server-common/ # Shared MCP server framework │ └── skills/ # Built-in skill MCP servers │ ├── sys-info/ # System information skill │ ├── file-ops/ # File operations skill │ └── shell-runner/ # Shell execution skill ├── SignalingServer/ # Go signaling server │ ├── cmd/signaling/ # Entry point │ └── internal/ # Business logic ├── scripts/ # Build, package, publish scripts ├── docs/ # Documentation │ ├── mcp-integration.md # MCP integration guide (English) │ └── MCP接入指南.md # MCP integration guide (Chinese) ├── .github/workflows/ # CI/CD configuration └── version # Version number ``` -------------------------------- ### Install and Configure Certbot Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Commands to install Certbot on CentOS/RHEL systems, request an SSL certificate for a domain, and verify the auto-renewal process. ```bash # Install Certbot sudo yum install -y epel-release sudo yum install -y certbot python3-certbot-nginx # Request certificate (auto-configures Nginx) sudo certbot --nginx -d your-domain.com # Test auto-renewal sudo certbot renew --dry-run # Certbot automatically adds a cron job, no manual configuration needed ``` -------------------------------- ### Verify Deployment with systemctl, netstat, and curl Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Commands to check service status, port listening, and test the API. Run as sudo for systemctl and netstat. Replace your-domain.com with your actual domain. ```bash # Check service status sudo systemctl status quickdesk-signaling sudo systemctl status nginx # Check port listening sudo netstat -tlnp | grep -E '8000|80|443' # Test API (local) curl http://localhost:8000/health # Test API (domain) curl http://your-domain.com/health curl https://your-domain.com/health # HTTPS ``` -------------------------------- ### skill_exec JSON example for running a shell command Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Example of the skill_exec MCP tool call to run the 'systeminfo' command on a remote device with device_id '123456789'. ```json { "name": "skill_exec", "arguments": { "device_id": "123456789", "tool_name": "run_command", "arguments": { "command": "systeminfo" } } } ``` -------------------------------- ### POST /v1/admin/admins/me/2fa/setup Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Sets up two-factor authentication for the current admin. ```APIDOC ## POST /v1/admin/admins/me/2fa/setup ### Description Sets up two-factor authentication for the current admin. ### Method POST ### Endpoint /v1/admin/admins/me/2fa/setup ### Response #### Success Response (200) - 2FA setup initiated ``` -------------------------------- ### Raw JSON-RPC 2.0 Request Example Source: https://github.com/barry-ran/quickdesk/blob/master/test/mcp/index.html Example of a JSON-RPC 2.0 request to list tools. The 'id' field is required for requests; notifications omit it. This is sent to the HTTP endpoint. ```json { "jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {} } ``` -------------------------------- ### Configure QuickDesk Signaling Server .env for TURN Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Sets the TURN_AUTH_SECRET, TURN_URLS, and STUN_URLS in the signaling server's .env file to match the Coturn static-auth-secret and server address. ```bash # /opt/quickdesk/signaling/.env TURN_AUTH_SECRET=your-strong-secret-here TURN_URLS=turn:115.190.196.189:3478 STUN_URLS=stun:115.190.196.189:3478 ``` -------------------------------- ### Troubleshoot Service Startup Failures Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Commands to diagnose service startup issues by checking logs, port availability, and database connectivity. ```bash # View detailed logs sudo journalctl -u quickdesk-signaling -n 100 --no-pager # Check port usage sudo lsof -i:8000 # Check database connectivity docker exec -it quickdesk-postgres psql -U quickdesk -d quickdesk -c "SELECT 1;" docker exec -it quickdesk-redis redis-cli ping ``` -------------------------------- ### Mouse.mouseDrag Source: https://github.com/barry-ran/quickdesk/blob/master/test/websocket/index.html Drag from start to end. ```APIDOC ## Mouse.mouseDrag ### Description Drag from start to end. ### Method WebSocket JSON-RPC ### Endpoint WebSocket message with method: "mouseDrag" ### Parameters #### Request Body - **deviceId** (string) - Required - The ID of the connection. - **startX** (number) - Required - Starting X coordinate. - **startY** (number) - Required - Starting Y coordinate. - **endX** (number) - Required - Ending X coordinate. - **endY** (number) - Required - Ending Y coordinate. - **button** (string) - Optional - Mouse button (e.g., "left"). ### Request Example { "method": "mouseDrag", "params": { "deviceId": "conn_1", "startX": 0, "startY": 0, "endX": 100, "endY": 100, "button": "left" } } ### Response Returns drag result. ``` -------------------------------- ### Clipboard.getClipboard Source: https://github.com/barry-ran/quickdesk/blob/master/test/websocket/index.html Get remote clipboard content. ```APIDOC ## Clipboard.getClipboard ### Description Get remote clipboard content. ### Method WebSocket JSON-RPC ### Endpoint WebSocket message with method: "getClipboard" ### Parameters #### Request Body - **deviceId** (string) - Required - The ID of the connection. ### Request Example { "method": "getClipboard", "params": { "deviceId": "conn_1" } } ### Response Returns clipboard content. ``` -------------------------------- ### Basic Connect and Screenshot Workflow Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Sequence of steps to connect to a device, take a screenshot, interact, and disconnect. Uses get_host_info to obtain device_id and access_code, then connect_device, screenshot, and disconnect_device. ```plaintext 1. get_host_info → get device_id + access_code 2. connect_device → get device_id 3. screenshot → see what's on screen 4. ... interact ... 5. disconnect_device → clean up ``` -------------------------------- ### Connection.getConnectionInfo Source: https://github.com/barry-ran/quickdesk/blob/master/test/websocket/index.html Get details for a specific connection. ```APIDOC ## Connection.getConnectionInfo ### Description Get details for a specific connection. ### Method WebSocket JSON-RPC ### Endpoint WebSocket message with method: "getConnectionInfo" ### Parameters #### Request Body - **deviceId** (string) - Required - The ID of the connection. ### Request Example { "method": "getConnectionInfo", "params": { "deviceId": "conn_1" } } ### Response Returns details for the specified connection. ``` -------------------------------- ### Backup and write coturn configuration Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Backs up the default coturn configuration and writes a new configuration file with recommended settings for QuickDesk. The configuration includes external IP, ports, realm, TLS options, logging, and authentication mode using static-auth-secret. ```bash sudo cp /etc/coturn/turnserver.conf /etc/coturn/turnserver.conf.bak # backup sudo tee /etc/coturn/turnserver.conf > /dev/null << 'EOF' # ============================================================================= # coturn Configuration for QuickDesk # ============================================================================= # Public IP address of this server. # Replace with your actual server's external/public IP. # Required for proper TURN relaying behind NAT. external-ip=115.190.196.189 # If the server has a specific local (internal) NIC IP, specify it here. # Format: external-ip=/ # Example: external-ip=115.190.196.189/10.0.0.5 # --------------------------------------------------------------------------- # Network Ports # --------------------------------------------------------------------------- # STUN/TURN listening port (default 3478) listening-port=3478 # TLS listening port (default 5349) — only needed when TLS is enabled # tls-listening-port=5349 # UDP relay port range for media traffic. # Each active TURN allocation uses one port from this range. # Ensure these ports are open in your firewall. min-port=49152 max-port=65535 # --------------------------------------------------------------------------- # Identity / Realm # --------------------------------------------------------------------------- # Realm is used in TURN authentication challenges. # Typically set to your domain name. realm=turn.example.com # Server name (used in some client handshakes, defaults to realm if unset) # server-name=turn.example.com # --------------------------------------------------------------------------- # TLS (optional but recommended for production) # --------------------------------------------------------------------------- # Disable TLS — comment these out if you want TLS no-tls no-dtls # To enable TLS, comment out the two lines above and configure: # cert=/etc/letsencrypt/live/turn.example.com/fullchain.pem # pkey=/etc/letsencrypt/live/turn.example.com/privkey.pem # --------------------------------------------------------------------------- # Logging # --------------------------------------------------------------------------- # Do not print logs to stdout (recommended for systemd-managed services) no-stdout-log # Log file path log-file=/var/log/coturn/turn.log # Uncomment for detailed debug logging (very verbose, use only for debugging) # verbose # Add fingerprint to TURN messages (recommended for compatibility) fingerprint # --------------------------------------------------------------------------- # Authentication — Choose ONE of the two modes below # --------------------------------------------------------------------------- # ~~~ MODE 1: Long-Term Static Credentials ~~~ # Use this for simple setups with fixed usernames/passwords. # Add as many `user=` lines as needed. # # lt-cred-mech # user=alice:password1 # user=bob:password2 # ~~~ MODE 2: REST API / HMAC Temporary Credentials (Recommended) ~~~ # Use this to integrate with the QuickDesk signaling server. # The signaling server uses this shared secret to generate time-limited # TURN credentials on behalf of clients via /v1/ice-config. # Credentials expire after a short window (typically 1 hour), so even if # intercepted they cannot be reused indefinitely. # use-auth-secret static-auth-secret=your-strong-secret-here # --------------------------------------------------------------------------- # Relay Protocol Options # --------------------------------------------------------------------------- # Uncomment to disable UDP relay (forces TCP relay only) # no-udp-relay # Uncomment to disable TCP relay (forces UDP relay only) # no-tcp-relay # Uncomment to act as a STUN-only server (no TURN relaying at all) # stun-only EOF ``` -------------------------------- ### Deploy with custom DATA_DIR Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Set DATA_DIR to a dedicated directory for each instance before running the deploy script. Do not share one directory across multiple instances. For Linux production, use /data/quickdesk/... or a dedicated data disk. ```bash DATA_DIR=/data/quickdesk/test ./deploy-build.sh --name test --port 8000 DATA_DIR=/data/quickdesk/prod ./deploy-pull.sh --name prod --port 9000 DATA_DIR=/data/quickdesk/offline ./deploy-offline.sh quickdesk-signaling-image.tar.gz --name offline --port 10000 ``` -------------------------------- ### GET /v1/admin/activity Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves activity information. ```APIDOC ## GET /v1/admin/activity ### Description Retrieves activity information. ### Method GET ### Endpoint /v1/admin/activity ### Response #### Success Response (200) - Activity information ``` -------------------------------- ### GET /v1/admin/connections Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves connection information. ```APIDOC ## GET /v1/admin/connections ### Description Retrieves connection information. ### Method GET ### Endpoint /v1/admin/connections ### Response #### Success Response (200) - Connection information ``` -------------------------------- ### GET /v1/admin/stats Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves administrative statistics. ```APIDOC ## GET /v1/admin/stats ### Description Retrieves administrative statistics. ### Method GET ### Endpoint /v1/admin/stats ### Response #### Success Response (200) - Administrative statistics ``` -------------------------------- ### Data directory layout for multiple instances Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Shows the expected data directories for the test and prod instances. ```text /data/quickdesk/test/postgres /data/quickdesk/test/redis /data/quickdesk/prod/postgres /data/quickdesk/prod/redis ``` -------------------------------- ### GET /v1/admin/admins Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Lists all admin accounts. ```APIDOC ## GET /v1/admin/admins ### Description Lists all admin accounts. ### Method GET ### Endpoint /v1/admin/admins ### Response #### Success Response (200) - List of admin accounts ``` -------------------------------- ### Deploy multiple instances with default data directories Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Run multiple signaling servers on one host with different ports. If --name is omitted, the instance name is port-PORT and the data directory is isolated automatically. ```bash # Instance 1: default data directory ~/.quickdesk/signaling/port-8000 ./deploy-build.sh --port 8000 # Instance 2: default data directory ~/.quickdesk/signaling/port-9000 ./deploy-build.sh --port 9000 ``` -------------------------------- ### get_signaling_status Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Gets signaling server connection status. ```APIDOC ## get_signaling_status ### Description Gets signaling server connection status. ``` -------------------------------- ### GET /v1/admin/system/status Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves system status information. ```APIDOC ## GET /v1/admin/system/status ### Description Retrieves system status information. ### Method GET ### Endpoint /v1/admin/system/status ### Response #### Success Response (200) - System status information ``` -------------------------------- ### Deploy with legacy deploy.sh Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Original one-click deploy script with Nginx reverse proxy and SSL support. ```bash chmod +x deploy.sh ./deploy.sh # With domain and Nginx ./deploy.sh --port 8000 --domain your-domain.com # Multiple instances (default independent data directory ~/.quickdesk/signaling/test) ./deploy.sh --name test --port 9000 ``` -------------------------------- ### Configure signaling server logging in .env Source: https://github.com/barry-ran/quickdesk/blob/master/docs/signaling-server-deployment.md Set log directory and rotation limits for the signaling service. LOG_DIR should be an absolute path on bare metal; keep it for Docker. Logs rotate at 50MB by default with five backups. ```bash LOG_DIR=/data/logs # Keep this for Docker; use an absolute path on bare metal LOG_MAX_SIZE_MB=50 LOG_MAX_BACKUPS=5 ``` -------------------------------- ### get_clipboard Source: https://github.com/barry-ran/quickdesk/blob/master/docs/mcp-integration.md Gets the last clipboard content synced from remote. ```APIDOC ## get_clipboard ### Description Gets the last clipboard content synced from remote. ``` -------------------------------- ### GET /v1/admin/audit-logs Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves audit logs with optional filters. ```APIDOC ## GET /v1/admin/audit-logs ### Description Retrieves audit logs with optional filters. ### Method GET ### Endpoint /v1/admin/audit-logs ### Parameters #### Query Parameters - **date_from** (string) - Optional - Start date filter - **date_to** (string) - Optional - End date filter - **q** (string) - Optional - Search query ### Response #### Success Response (200) - Audit logs ``` -------------------------------- ### get_system_info Source: https://github.com/barry-ran/quickdesk/blob/master/quickdesk-skill-host/skills/sys-info/SKILL.md Retrieve OS version, CPU model and usage, memory and swap totals/used, disk usage, hostname, and uptime. Takes no parameters. ```APIDOC ## get_system_info ### Description Retrieve OS version, CPU model and usage, memory and swap totals/used, disk usage, hostname, and uptime. Takes no parameters. ### Parameters None ### Response #### Success Response - **os** (string) - Operating system name and version - **kernel** (string) - Kernel version - **hostname** (string) - Hostname of the remote machine - **cpu** (object) - CPU details: model, cores, usage_percent - **memory** (object) - Memory details: total_mb, used_mb, usage_percent - **swap** (object) - Swap details: total_mb, used_mb - **disks** (array) - Disk details: mount, total_gb, available_gb, fs - **uptime** (string) - Uptime duration #### Response Example { "os": "Ubuntu 22.04", "kernel": "5.15.0", "hostname": "prod-server-01", "cpu": { "model": "AMD EPYC 7763", "cores": 8, "usage_percent": "12.3" }, "memory": { "total_mb": 16384, "used_mb": 8200, "usage_percent": "50.0" }, "swap": { "total_mb": 4096, "used_mb": 128 }, "disks": [{ "mount": "/", "total_gb": 500.0, "available_gb": 320.5, "fs": "ext4" }], "uptime": "14h 32m" } ``` -------------------------------- ### GET /v1/admin/groups/:id/devices Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Lists devices in a specific group. ```APIDOC ## GET /v1/admin/groups/:id/devices ### Description Lists devices in a specific group. ### Method GET ### Endpoint /v1/admin/groups/:id/devices ### Parameters #### Path Parameters - **id** (string) - Required - Group ID ### Response #### Success Response (200) - List of devices in the group ``` -------------------------------- ### Deploy Signaling Server with Docker Source: https://github.com/barry-ran/quickdesk/blob/master/README.md Commands to configure and deploy the signaling server using pre-built images, source builds, or offline packages. ```bash cd SignalingServer cp .env.example .env && vim .env # Option 1: Pull pre-built image (recommended) ./deploy-pull.sh # Option 2: Build from source ./deploy-build.sh # Option 3: Offline deploy (no internet needed) ./deploy-offline.sh quickdesk-signaling-image.tar.gz ``` -------------------------------- ### GET /v1/admin/devices/:device_id Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves details of a specific device. ```APIDOC ## GET /v1/admin/devices/:device_id ### Description Retrieves details of a specific device. ### Method GET ### Endpoint /v1/admin/devices/:device_id ### Parameters #### Path Parameters - **device_id** (string) - Required - Device ID ### Response #### Success Response (200) - Device details ``` -------------------------------- ### Check coturn config syntax and startup errors Source: https://github.com/barry-ran/quickdesk/blob/master/docs/turn-server-deployment.md Use `turnserver --check-config` to validate the configuration file. `journalctl -u coturn -n 50 --no-pager` shows the last 50 lines of service logs for startup errors. ```bash # Check config syntax sudo turnserver -c /etc/coturn/turnserver.conf --check-config # View startup errors sudo journalctl -u coturn -n 50 --no-pager ``` -------------------------------- ### GET /v1/admin/users Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Lists business users with optional filters. ```APIDOC ## GET /v1/admin/users ### Description Lists business users with optional filters. ### Method GET ### Endpoint /v1/admin/users ### Parameters #### Query Parameters - **channel_type** (string) - Optional - Filter by channel type - **status** (string) - Optional - Filter by user status - **level** (string) - Optional - Filter by user level - **q** (string) - Optional - Search query ### Response #### Success Response (200) - List of business users ``` -------------------------------- ### GET /v1/me/devices/:device_id Source: https://github.com/barry-ran/quickdesk/blob/master/SignalingServer/docs/user-api-docs.md Retrieves details for a specific device. ```APIDOC ## GET /v1/me/devices/:device_id ### Description Retrieves details for a specific device. ### Method GET ### Endpoint /v1/me/devices/:device_id ### Authentication Requires `Authorization: Bearer `. ### Path Parameters - **device_id** (string) - Required - The device ID. ### Response #### Success Response (200) - **device** (object) - The DeviceItem object. - **device_id** (string) - Device ID. - **device_name** (string) - Device name. - **remark** (string) - Remark for the device. - **online** (boolean) - Whether the device is online. - **logged_in** (boolean) - Whether the device is logged in. - **access_code** (string) - Access code. - **os** (string) - Operating system. - **os_version** (string) - OS version. - **app_version** (string) - App version. - **last_seen_at** (string) - Last seen timestamp. #### Response Example { "device": { "device_id": "176017615", "device_name": "Barry-PC", "remark": "office desktop", "online": true, "logged_in": true, "access_code": "633732", "os": "win", "os_version": "11", "app_version": "2.10.0", "last_seen_at": "2026-05-12T08:52:39Z" } } ```