mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-11-07 03:31:52 +00:00
docs: slim README, refresh wiki for 3.5.x, add Privacy
Replace the monolithic README with a short landing page, align wiki with current 3.5.x product facts, add PRIVACY.md, Monitoring and Unattended/WoL guides, and park historical audits under docs/archive. Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
This commit is contained in:
+3
-2
@@ -140,8 +140,9 @@ screenshots/tests/
|
||||
tmp_test_*.py
|
||||
tmp_test_*.sh
|
||||
|
||||
# --- Archive (old files with potential sensitive data) ---
|
||||
archive/
|
||||
# --- Archive (old files with potential sensitive data; repo root only) ---
|
||||
/archive/
|
||||
# docs/archive/ is tracked (historical audits/roadmaps for maintainers)
|
||||
|
||||
# --- Legacy binaries ---
|
||||
hbbs-patch/
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
# Privacy
|
||||
|
||||
BetterDesk is **self-hosted**. You run the server and console on machines you control. The project maintainers do not run a cloud that receives your users, sessions, or device lists.
|
||||
|
||||
This document describes what the open-source code does today. Forks and third-party images may differ.
|
||||
|
||||
## Your data stays on your server
|
||||
|
||||
Accounts, devices, address books, audit logs, session history, and fleet metrics live in **your** database and files (for example under `/opt/betterdesk` and `/opt/BetterDeskConsole`).
|
||||
|
||||
We do not operate product analytics, crash telemetry, or usage tracking for UNITRONIX. There is no Sentry, Google Analytics, Mixpanel, or similar SDK in this project.
|
||||
|
||||
## What “telemetry” means in the panel
|
||||
|
||||
Managed devices can report CPU, memory, disk, and inventory to **your** BetterDesk API (for example `/api/bd/telemetry` and CDAP heartbeats). That is for **your** operators — not for the vendor.
|
||||
|
||||
Sync frequency is configurable (`silent` / `standard` / `turbo` on enrollment bundles).
|
||||
|
||||
## What can leave your network
|
||||
|
||||
These calls are functional, not maintainer analytics:
|
||||
|
||||
| Action | Destination | Notes |
|
||||
|--------|-------------|--------|
|
||||
| **Check / apply updates** | GitHub API and raw content | Only when an admin uses Updates (or the install script update path). User-Agent like `BetterDesk-Console/{version}`. No machine install ID. |
|
||||
| **Public IP detection** | checkip.amazonaws.com, api.ipify.org, ifconfig.me | At install/startup so relay ads can use a public address. Result stays on your server. |
|
||||
| **Clock sync** | NTP (default pool.ntp.org / similar) | Configurable via `NTP_SERVERS`. |
|
||||
| **Optional UI assets** | Google Fonts (branding / some pages), jsDelivr (xterm) | Main console Material Icons are self-hosted. You can avoid extra font downloads by not using branding font fetch and by firewall policy. |
|
||||
| **Docker images** | ghcr.io | Normal image pull. |
|
||||
| **OIDC** | Your identity provider | Only if you enable SSO. |
|
||||
|
||||
Help links (GitHub, Discord, Buy Me a Coffee) are ordinary links — nothing is sent until someone clicks.
|
||||
|
||||
## LAN discovery
|
||||
|
||||
The panel can advertise itself on the local network (UDP discovery and optional mDNS `_betterdesk._tcp`) with hostname, version, and panel URL. That stays on your LAN.
|
||||
|
||||
Disable mDNS with:
|
||||
|
||||
```env
|
||||
PANEL_MDNS=off
|
||||
```
|
||||
|
||||
## Desktop clients and agents
|
||||
|
||||
Stock RustDesk clients and Support Agents talk to **your** BetterDesk host. They do not phone home to UNITRONIX for analytics.
|
||||
|
||||
## Honesty
|
||||
|
||||
If you find phone-home behaviour we missed, please report it via [SECURITY.md](SECURITY.md) or a private security advisory — not a public issue with exploit detail.
|
||||
|
||||
Wiki mirror: [Privacy](https://github.com/UNITRONIX/BetterDesk/wiki/Privacy).
|
||||
+49
-67
@@ -1,73 +1,55 @@
|
||||
# Documentation
|
||||
|
||||
This directory contains comprehensive documentation for BetterDesk Console, organized by topic.
|
||||
User guides live in the **[GitHub Wiki](https://github.com/UNITRONIX/BetterDesk/wiki)** (source: [`wiki/`](wiki/), sync with `scripts/sync-wiki.ps1` / `scripts/sync-wiki.sh`).
|
||||
|
||||
> **GitHub Wiki:** User-facing wiki pages are maintained in [`wiki/`](wiki/) and published to [github.com/UNITRONIX/BetterDesk/wiki](https://github.com/UNITRONIX/BetterDesk/wiki) via `scripts/sync-wiki.sh` or `scripts/sync-wiki.ps1`.
|
||||
|
||||
## Setup & Installation
|
||||
|
||||
- **[Installation Guide](setup/INSTALLATION_V1.4.0.md)** — Full installation instructions
|
||||
- **[Update Guide](setup/UPDATE_GUIDE.md)** — Updating existing installations
|
||||
- **[Build Guide](setup/BUILD_GUIDE.md)** — Building from source
|
||||
- **[Synology Installation](setup/SYNOLOGY_INSTALLATION.md)** — NAS-specific setup
|
||||
- **[HTTPS Setup](setup/HTTPS_SETUP.md)** — SSL/TLS certificate configuration
|
||||
|
||||
## Docker
|
||||
|
||||
- **[Docker Support](docker/DOCKER_SUPPORT.md)** — Docker installation guide
|
||||
- **[Docker Quick Start](docker/DOCKER_QUICKSTART.md)** — 30-second quick start with pre-built images
|
||||
- **[Docker Troubleshooting](docker/DOCKER_TROUBLESHOOTING.md)** — Docker-specific issues & fixes
|
||||
- **[Docker Migration](docker/DOCKER_MIGRATION.md)** — Migrating from existing RustDesk Docker
|
||||
|
||||
## Features
|
||||
|
||||
- **[Client Generator](features/CLIENT_GENERATOR.md)** — Custom client generator
|
||||
- **[Client Generator Quick Start](features/CLIENT_GENERATOR_QUICKSTART_EN.md)** — Quick start guide
|
||||
- **[Device ID Change](features/ID_CHANGE_FEATURE.md)** — Device ID change feature
|
||||
- **[Status Tracking v3](features/STATUS_TRACKING_v3.md)** — Device status tracking system
|
||||
- **[CDAP / Custom Device API](features/CUSTOM_DEVICE_API.md)** — Custom Device Access Protocol
|
||||
- **[Web Remote Client](features/WEB_REMOTE_CLIENT_PLAN.md)** — Browser-based remote desktop
|
||||
|
||||
## Architecture
|
||||
|
||||
- **[Project Structure](architecture/PROJECT_STRUCTURE.md)** — Codebase overview
|
||||
- **[BetterDesk Client](architecture/BETTERDESK_CLIENT_ARCHITECTURE.md)** — Desktop client architecture
|
||||
- **[BetterDesk v3 Overview](architecture/BETTERDESK_v3_OVERVIEW.md)** — v3 architecture summary
|
||||
- **[CDAP Protocol](architecture/CDAP_PROTOCOL.md)** — CDAP wire protocol specification
|
||||
- **[CDAP Implementation](architecture/CDAP_IMPLEMENTATION_PLAN.md)** — CDAP implementation plan
|
||||
- **[Port Security](architecture/PORT_SECURITY.md)** — Port configuration & security
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **[General Troubleshooting](troubleshooting/TROUBLESHOOTING_EN.md)** — Common issues & solutions
|
||||
- **[Key Troubleshooting](troubleshooting/KEY_TROUBLESHOOTING.md)** — Key and encryption issues
|
||||
- **[Quick Fix](troubleshooting/QUICK_FIX_EN.md)** — Quick fixes for common problems
|
||||
|
||||
## Performance
|
||||
|
||||
- **[GPU Optimization](performance/GPU_OPTIMIZATION_EN.md)** — GPU optimization guide
|
||||
- **[GPU Quick Fix](performance/GPU_FIX_QUICKSTART_EN.md)** — Quick GPU fix
|
||||
- **[Optimization Summary](performance/OPTIMIZATION_SUMMARY_EN.md)** — Performance optimization overview
|
||||
|
||||
## Development
|
||||
|
||||
- **[Contributing](development/CONTRIBUTING.md)** — Contribution guidelines
|
||||
- **[Translation Guide](development/CONTRIBUTING_TRANSLATIONS.md)** — Adding new languages
|
||||
- **[Translation Summary](development/TRANSLATION_SUMMARY.md)** — Translation coverage status
|
||||
- **[Changelog](development/CHANGELOG.md)** — Version history
|
||||
|
||||
## Enterprise
|
||||
|
||||
- **[Enterprise Roadmap](enterprise/ENTERPRISE_ROADMAP.md)** — Future enterprise features
|
||||
|
||||
## Security
|
||||
|
||||
- **[Threat Model](security/THREAT_MODEL.md)** — Security assumptions and trust boundaries
|
||||
- **[Encryption Specification](security/ENCRYPTION_SPEC.md)** — Cryptographic design details
|
||||
- **[Audit Log](security/AUDIT_LOG.md)** — Audit event model and operational notes
|
||||
- **[Login and API Security Audit](security/LOGIN_API_SECURITY_AUDIT_2026-04-26.md)** — Focused review of authentication, sessions, tokens, and API authorization
|
||||
- **[Audyt bezpieczeństwa logowania i API](security/LOGIN_API_SECURITY_AUDIT_2026-04-26_PL.md)** — Polska wersja dokumentu audytu logowania, sesji, tokenów i autoryzacji API
|
||||
Root entry points: [README](../README.md), [PRIVACY.md](../PRIVACY.md), [CHANGELOG.md](../CHANGELOG.md).
|
||||
|
||||
---
|
||||
|
||||
> **Note:** The original Rust-based HBBS patch has been replaced by the [Go server](../betterdesk-server/) and moved to `archive/`. See the main [README](../README.md) for current architecture.
|
||||
## For operators
|
||||
|
||||
Start on the wiki: [Home](https://github.com/UNITRONIX/BetterDesk/wiki) → Installation → Client setup → TLS as needed.
|
||||
|
||||
Longer runbooks in this tree:
|
||||
|
||||
| Topic | Doc |
|
||||
|-------|-----|
|
||||
| Installation detail | [setup/INSTALLATION_V1.4.0.md](setup/INSTALLATION_V1.4.0.md) |
|
||||
| Updates | [setup/UPDATE_GUIDE.md](setup/UPDATE_GUIDE.md) |
|
||||
| HTTPS (panel) | [setup/HTTPS_SETUP.md](setup/HTTPS_SETUP.md) |
|
||||
| Reverse proxy | [setup/REVERSE_PROXY.md](setup/REVERSE_PROXY.md) |
|
||||
| Synology | [setup/SYNOLOGY_INSTALLATION.md](setup/SYNOLOGY_INSTALLATION.md) |
|
||||
| Client mass deploy | [setup/RUSTDESK_CLIENT_DEPLOYMENT.md](setup/RUSTDESK_CLIENT_DEPLOYMENT.md) |
|
||||
| Docker | [docker/DOCKER_QUICKSTART.md](docker/DOCKER_QUICKSTART.md), [docker/DOCKER_SUPPORT.md](docker/DOCKER_SUPPORT.md), [docker/DOCKER_TROUBLESHOOTING.md](docker/DOCKER_TROUBLESHOOTING.md) |
|
||||
| Troubleshooting | [troubleshooting/TROUBLESHOOTING_EN.md](troubleshooting/TROUBLESHOOTING_EN.md), [troubleshooting/KEY_TROUBLESHOOTING.md](troubleshooting/KEY_TROUBLESHOOTING.md) |
|
||||
|
||||
---
|
||||
|
||||
## For developers / integrators
|
||||
|
||||
| Topic | Doc |
|
||||
|-------|-----|
|
||||
| Contributing | [development/CONTRIBUTING.md](development/CONTRIBUTING.md) |
|
||||
| Translations | [development/CONTRIBUTING_TRANSLATIONS.md](development/CONTRIBUTING_TRANSLATIONS.md) |
|
||||
| Build from source | [setup/BUILD_GUIDE.md](setup/BUILD_GUIDE.md) |
|
||||
| Project layout | [architecture/PROJECT_STRUCTURE.md](architecture/PROJECT_STRUCTURE.md) |
|
||||
| CDAP | [cdap/](cdap/), [architecture/CDAP_PROTOCOL.md](architecture/CDAP_PROTOCOL.md) |
|
||||
| SDKs | [sdk/](sdk/) |
|
||||
| Threat model / encryption | [security/THREAT_MODEL.md](security/THREAT_MODEL.md), [security/ENCRYPTION_SPEC.md](security/ENCRYPTION_SPEC.md) |
|
||||
| Port notes | [architecture/PORT_SECURITY.md](architecture/PORT_SECURITY.md) |
|
||||
|
||||
Wiki mirrors for common topics: [API](https://github.com/UNITRONIX/BetterDesk/wiki/API-Reference), [CDAP](https://github.com/UNITRONIX/BetterDesk/wiki/CDAP), [SDK](https://github.com/UNITRONIX/BetterDesk/wiki/SDK).
|
||||
|
||||
---
|
||||
|
||||
## Maintainers
|
||||
|
||||
Branching, update flow, installer contracts: **[important/README.md](important/README.md)**.
|
||||
|
||||
Dated audits, roadmaps, and one-off plans are **historical** — see [archive/](archive/) when present, or treat root-level `AUDIT_*` / `*_ROADMAP_*` / `*_PLAN_*` files as non-user docs (do not link them from the wiki Home).
|
||||
|
||||
---
|
||||
|
||||
## Changelog
|
||||
|
||||
Use the root **[CHANGELOG.md](../CHANGELOG.md)** only. The old `development/CHANGELOG.md` file is a stub redirect.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Historical docs
|
||||
|
||||
Dated audits, roadmaps, and implementation plans. Kept for maintainers — **not** part of the user wiki.
|
||||
|
||||
If a file is missing here, it may still sit under `docs/` root until moved.
|
||||
@@ -1,887 +1,5 @@
|
||||
# BetterDesk Console - Changelog
|
||||
# Changelog (moved)
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
This file is outdated (old console-only notes).
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.4.3] - 2026-03-21
|
||||
|
||||
### 🖥️ Web Remote Client — Mouse, Quality & FPS Fix (Phase 32)
|
||||
|
||||
Critical fixes for the embedded web remote client (`/remote/:deviceId`) — mouse clicks, image quality, and frame rate.
|
||||
|
||||
#### Mouse Click Fix (Critical)
|
||||
- **Root cause**: RustDesk parses mouse mask as `button = mask >> 3; type = mask & 7`. Web client sent flat values (e.g., mask=1 for left click), so server computed `button = 0` (no button). Hover worked because mask=0 is correct for both formats.
|
||||
- **input.js**: Replaced flat mask values with correct `TYPE | (BUTTON << 3)` encoding. Left click now sends mask=9 (`1 | (1<<3)`), right click mask=17 (`1 | (2<<3)`), etc. Added static constants for mouse types and buttons.
|
||||
|
||||
#### Image Quality Fix
|
||||
- **Root cause**: `buildLoginRequest` in protocol.js hardcoded `imageQuality: Balanced`, ignoring any quality setting.
|
||||
- **protocol.js**: Login request now uses configurable quality (default `Best` instead of `Balanced`).
|
||||
- **remote.js**: Constructor passes `imageQuality: 'Best'` to RDClient.
|
||||
|
||||
#### FPS Fix
|
||||
- **Root cause**: Login request used `customFps: opts.fps || 30` despite remote.js wanting 60fps. Session start only sent FPS option, not quality.
|
||||
- **protocol.js**: Default FPS changed from 30 to 60.
|
||||
- **client.js**: `_startSession()` now sends both `customFps` and `imageQuality` options. `authenticate()` passes `fps: 60` and `imageQuality: 'Best'` to login builder.
|
||||
|
||||
#### UI Polish
|
||||
- **remote.ejs**: Replaced large orange "Work in Progress" banner with slim blue "Beta" banner with dismiss button.
|
||||
|
||||
#### Files Changed
|
||||
- `public/js/rdclient/input.js` — Mouse mask encoding + static constants
|
||||
- `public/js/rdclient/protocol.js` — Configurable quality + FPS defaults
|
||||
- `public/js/rdclient/client.js` — Session start sends quality + FPS
|
||||
- `public/js/remote.js` — imageQuality: 'Best' in constructor
|
||||
- `views/remote.ejs` — Dismissible beta banner
|
||||
|
||||
---
|
||||
|
||||
## [2.4.2] - 2026-03-20
|
||||
|
||||
### 🔒 Security & Installer Fixes (Phase 31)
|
||||
|
||||
Critical fixes for issues #68, #70, #71 — API TLS breaking client communication, password `$` escaping in systemd, and port diagnostic false positives.
|
||||
|
||||
#### API TLS Fix (Issues #70, #71)
|
||||
- **Root cause**: Fresh install with proper SSL certificates added `-tls-api -force-https` to Go server, making API port 21114 HTTPS-only. RustDesk clients always send plain HTTP → `HTTP 400` on every request → 0 devices.
|
||||
- **betterdesk.sh / betterdesk.ps1**: Removed `-tls-api -force-https` from Go server args for ALL certificate types. Signal/relay TLS unchanged.
|
||||
- **config.go**: `--force-https` no longer implies API TLS. Only explicit `--tls-api` enables HTTPS on API port.
|
||||
- **SSL config menu**: Never adds `-tls-api`. Always removes `-tls-api` and `-force-https` from existing service.
|
||||
- **API URLs**: Always `http://localhost:21114/api` in `.env` and systemd — regardless of certificate type.
|
||||
|
||||
#### Password `$` Escaping (Issue #68)
|
||||
- **Root cause**: systemd interprets `$` as variable substitution in `ExecStart=` and `Environment=` directives. Passwords or PostgreSQL URLs containing `$` get silently corrupted.
|
||||
- **betterdesk.sh**: Added `$` → `$$` escaping for admin password and PostgreSQL URL before writing to `.service` files.
|
||||
- **Note**: Auto-generated passwords (alphanumeric only) were never affected. Fix targets user-set passwords.
|
||||
|
||||
#### Port Diagnostic False Positive
|
||||
- **Root cause**: On some Linux systems (Ubuntu 24.04+), `ss -tlnp` reports Node.js as `MainThread` instead of `node`.
|
||||
- **betterdesk.sh**: Added `MainThread` to expected process patterns for ports 5000 and 21121.
|
||||
|
||||
## [2.4.1] - 2026-03-20
|
||||
|
||||
### 🎨 Devices Page UI Redesign
|
||||
|
||||
Complete UI overhaul of the Devices page — fully responsive, space-efficient, and optimized for phone, tablet, and desktop.
|
||||
|
||||
#### Layout Changes
|
||||
- **Sidebar removed** — 280px folder sidebar replaced with horizontal scrollable **folder chips** (pill buttons)
|
||||
- **Unified toolbar** — Search, segmented filter buttons (All/Online/Offline/Banned), and column visibility toggle in a single row
|
||||
- **Slim table** — Reduced cell padding for higher information density
|
||||
- **Kebab menu** (⋮) — Replaced 5 inline action buttons per row with a compact dropdown menu (connect, connect-desktop, details, ban/unban, delete)
|
||||
- **Status dot** — Colored dot (green/gray/red) inline with device ID for at-a-glance status
|
||||
- **Mobile bottom sheet** — On phones, kebab menu appears as a full-width bottom sheet with backdrop overlay
|
||||
|
||||
#### Responsive Breakpoints
|
||||
- **≤1024px** — Hides `device_type` column
|
||||
- **≤768px** — Hides `platform` + `last_online` columns; search goes full-width; button labels hidden (icons only)
|
||||
- **≤600px** — Card-style rows (CSS grid 2-column); `<thead>` hidden; kebab becomes fixed bottom sheet with overlay backdrop
|
||||
- **≤400px** — Folder chip labels hidden (icons only); smaller filter buttons
|
||||
|
||||
#### Files Changed
|
||||
- `views/devices.ejs` — Complete template rewrite
|
||||
- `public/css/devices.css` — Complete stylesheet rewrite (~780 lines)
|
||||
- `public/js/devices.js` — Updated rendering (kebab menu, folder chips, status dots, global close handler)
|
||||
|
||||
---
|
||||
|
||||
## [2.4.0] - 2026-03-01
|
||||
|
||||
### ✨ PostgreSQL Support, Migration Tool, CDAP, TLS Everywhere & More
|
||||
|
||||
See `.github/copilot-instructions.md` for full details on Phases 4–29.
|
||||
|
||||
#### Highlights
|
||||
- PostgreSQL database backend (`pgx/v5`, connection pooling, `LISTEN/NOTIFY`)
|
||||
- SQLite ↔ PostgreSQL migration tool (`tools/migrate/`)
|
||||
- TLS for TCP signal, relay, and WebSocket (auto-detect plain/TLS on same port)
|
||||
- E2E encryption fixes (relay UUID, SignIdPk NaCl format, PunchHoleResponse)
|
||||
- CDAP protocol v0.3.0 (device widgets, commands, panel rendering)
|
||||
- Sysinfo/heartbeat endpoints for hostname/platform display
|
||||
- Address book sync in Go server
|
||||
- Docker single-container + GHCR publishing
|
||||
- 30+ bug fixes across Go server, Node.js console, and installer scripts
|
||||
|
||||
---
|
||||
|
||||
## [2.3.0] - 2026-02-22
|
||||
|
||||
### 🔒 Security Audit & Fixes
|
||||
|
||||
Full security audit performed — 3 Critical, 5 High, 8 Medium, 6 Low findings. All Critical and High issues resolved.
|
||||
|
||||
#### Critical Fixes
|
||||
- **CSRF Protection** — Double-submit cookie pattern using `csrf-csrf` package (new `middleware/csrf.js`)
|
||||
- **Cookie Name Fix** — Logout now correctly clears `betterdesk.sid` (was `connect.sid`)
|
||||
- **TOTP Dependency** — Added `otplib` to `package.json` for TOTP 2FA support
|
||||
|
||||
#### High Fixes
|
||||
- **WebSocket Authentication** — Session cookie required for WebSocket upgrade (401 on unauthenticated connections)
|
||||
- **Session Fixation Prevention** — `req.session.regenerate()` after successful login
|
||||
- **Configurable Trust Proxy** — `TRUST_PROXY` environment variable (prevents IP spoofing)
|
||||
- **Body Size Limit** — Enforced in WAN middleware stack for Client API
|
||||
- **Timing-Safe Auth** — Pre-computed dummy bcrypt hash for non-existent users
|
||||
|
||||
#### Medium/Low Fixes
|
||||
- Password minimum length increased from 6 to 8 characters
|
||||
- Input length validation (username/password max 128 chars)
|
||||
- Strict JSON-only content type in WAN middleware (`text/plain` removed)
|
||||
- `X-XSS-Protection` set to `0` (modern recommendation)
|
||||
- Invalid empty CORS header removed
|
||||
|
||||
### ✨ New Features
|
||||
|
||||
#### RustDesk Client API (WAN-facing)
|
||||
- Dedicated port 21121 for RustDesk desktop/mobile client authentication
|
||||
- 7-layer security: rate limiting, API key, IP whitelist, JWT auth, JSON-only, body size limit, audit logging
|
||||
- Full login flow: `/api/login`, `/api/logout`, `/api/currentUser`, `/api/login-options`
|
||||
- Heartbeat & sysinfo endpoints for client keep-alive
|
||||
- Address book sync (`/api/ab`, `/api/ab/personal`)
|
||||
|
||||
#### TOTP Two-Factor Authentication
|
||||
- Time-based One-Time Password support via `otplib`
|
||||
- QR code generation for authenticator apps
|
||||
- TFA verification during login flow
|
||||
|
||||
#### Operator Role
|
||||
- Separate admin/operator roles with different permissions
|
||||
- Operators can view devices but cannot modify system settings
|
||||
|
||||
#### Desktop Connect Button
|
||||
- Connect to devices directly from browser using RustDesk URI handler (`rustdesk://`)
|
||||
|
||||
#### SSL Certificate Configuration
|
||||
- New menu option **C** in both `betterdesk.sh` and `betterdesk.ps1`
|
||||
- Let's Encrypt (certbot) integration on Linux
|
||||
- Custom certificate support (PEM cert + key)
|
||||
- Self-signed certificate generation
|
||||
- Disable SSL option
|
||||
|
||||
### 🗑️ Removed
|
||||
|
||||
- **Flask console removed** — Node.js is now the only supported web console
|
||||
- `--flask` / `-Flask` flags show deprecation warning and install Node.js instead
|
||||
- `Install-FlaskConsole` function removed from `betterdesk.ps1`
|
||||
- Flask pip packages removed from dependency installation
|
||||
- Flask NSSM/systemd service blocks removed
|
||||
|
||||
### 🖥️ Web Remote Desktop Client Fixes
|
||||
|
||||
Major overhaul of the browser-based remote desktop client — fixes critical issues that caused 0-3 FPS, black screen, and broken keyboard input.
|
||||
|
||||
#### Critical Fixes
|
||||
- **Missing `video_received` ack** — Server was throttling to 1-5 FPS because the web client never acknowledged received video frames (`client.js`)
|
||||
- **Autoplay blocked silently** — `play().catch(() => {})` swallowed browser autoplay errors causing a permanent black screen; added proper detection and "Click to Start" overlay (`video.js`, `remote.js`, `remote.css`)
|
||||
- **Wrong modifier key values** — Shift/Ctrl/Alt/Meta sent incorrect ControlKey enum values (1,2,4,8 instead of 29,4,1,23 from `message.proto`); every keyboard shortcut was broken (`input.js`)
|
||||
- **Audio Opus decoding** — Audio was treated as raw PCM instead of Opus; added `AudioDecoder` (WebCodecs) for proper Opus decoding with raw PCM fallback (`audio.js`)
|
||||
- **WebCodecs timestamp overflow** — Timestamps used `pts * 1000` (1ms intervals) overflowing the decoder queue; changed to monotonic `frameCount * 33333µs` at ~30fps (`video.js`)
|
||||
|
||||
#### High Fixes
|
||||
- **O(n²) buffer concatenation** — Stream decoder created a new `Uint8Array` on every incoming chunk; replaced with pre-allocated growing buffer using `copyWithin()` (`protocol.js`)
|
||||
- **Aggressive video seeking** — Health check every 500ms hard-seeking at 0.5s latency caused visible jitter; changed to 2000ms interval with gentle `playbackRate = 1.05` catch-up (`video.js`)
|
||||
|
||||
#### Low Fixes
|
||||
- **Mouse throttle** — Increased from 30Hz (33ms) to 60Hz (16ms) for smoother cursor movement (`input.js`)
|
||||
- **Cursor data field mismatch** — Renderer looked for `.data` but protobuf sends `.colors`; now supports both (`renderer.js`)
|
||||
- **Autoplay i18n** — Added `click_to_start`, `autoplay_blocked`, `start_playback` keys to EN and PL translations
|
||||
|
||||
### 📝 Updated
|
||||
|
||||
- `README.md` — Comprehensive overhaul for v2.3.0 (new architecture diagram, Client API docs, security section)
|
||||
- `betterdesk.sh` — v2.3.0 with Flask removal and SSL wizard
|
||||
- `betterdesk.ps1` — v2.3.0 with Flask removal and SSL configuration
|
||||
- `VERSION` — 2.3.0
|
||||
- `package.json` — Version 2.3.0, added `otplib` and `csrf-csrf` dependencies
|
||||
- `.github/copilot-instructions.md` — Updated project state documentation
|
||||
|
||||
---
|
||||
|
||||
## [1.5.4] - 2026-02-02
|
||||
|
||||
### 🚀 Pre-Compiled v2.0.0 Binaries
|
||||
|
||||
**Major Update**: Added pre-compiled v2 binaries with significant performance improvements.
|
||||
|
||||
### Added
|
||||
|
||||
#### Pre-Compiled Linux Binaries (hbbs-patch-v2/)
|
||||
- **hbbs-linux-x86_64**: Signal server with HTTP API (9.4 MB)
|
||||
- **hbbr-linux-x86_64**: Relay server (2.9 MB)
|
||||
- Compiled from RustDesk Server 1.1.14 with BetterDesk enhancements
|
||||
|
||||
#### Performance Improvements (v2 binaries)
|
||||
- **Port 21120**: Non-conflicting API port (changed from 21114)
|
||||
- **15s offline detection**: 2x faster than v1 (was 30s)
|
||||
- **Connection pooling**: 5 DB connections (was 1)
|
||||
- **Auto-retry logic**: Exponential backoff for database operations
|
||||
- **Better stability**: 99.8% uptime
|
||||
|
||||
#### Automatic Service Creation
|
||||
- Installer now creates `rustdesksignal.service` and `rustdeskrelay.service` from templates if they don't exist
|
||||
- Templates in `templates/` directory
|
||||
|
||||
### Changed
|
||||
|
||||
#### Install Script (v1.5.4)
|
||||
- Priority order for binaries:
|
||||
1. `hbbs-patch-v2/hbbs-linux-x86_64` (pre-compiled, recommended)
|
||||
2. `hbbs-patch-v2/target/release/hbbs` (locally compiled)
|
||||
3. `hbbs-patch/bin-with-api/hbbs-v8-api` (old v1, deprecated with warning)
|
||||
|
||||
#### Documentation Updates
|
||||
- Updated README with v2 binary information
|
||||
- Added CHECKSUMS.md for v2 binaries
|
||||
- Updated firewall instructions (port 21120)
|
||||
|
||||
---
|
||||
|
||||
## [1.5.3] - 2026-02-02
|
||||
|
||||
### 🔧 Critical: Automatic Systemd Service Update
|
||||
|
||||
**Critical Fix**: Installation script now automatically updates systemd service files to use the modified API-enabled binaries (hbbs-v8-api, hbbr-v8-api).
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Systemd Service Auto-Update
|
||||
- **Automatic service detection**: Scans for all common RustDesk service names:
|
||||
- HBBS: `rustdesksignal.service`, `hbbs.service`, `rustdesk-hbbs.service`
|
||||
- HBBR: `rustdeskrelay.service`, `hbbr.service`, `rustdesk-hbbr.service`
|
||||
- **ExecStart auto-update**: Modifies service files to use `hbbs-v8-api` and `hbbr-v8-api` instead of original binaries
|
||||
- **Backup before modification**: Service files are backed up before any changes
|
||||
- **Daemon reload**: Automatically reloads systemd after service file updates
|
||||
|
||||
#### Service Restart Improvements
|
||||
- Now correctly finds and restarts services with different naming conventions
|
||||
- Shows status summary of all services after restart
|
||||
- Better error handling and logging for failed service starts
|
||||
|
||||
#### Binary Symlink Fix
|
||||
- Now creates symlinks for both `hbbs` and `hbbr` (previously only `hbbs`)
|
||||
|
||||
### Added
|
||||
|
||||
#### Diagnostic Tools (dev_modules/)
|
||||
- **fix_systemd_services.sh**: Standalone tool to fix systemd services manually
|
||||
- Scans for all RustDesk services
|
||||
- Shows current ExecStart configuration
|
||||
- Updates services to use API-enabled binaries
|
||||
- Creates backups of original service files
|
||||
- Optional automatic restart
|
||||
|
||||
---
|
||||
|
||||
## [1.5.2] - 2026-02-02
|
||||
|
||||
### 🔧 Database Schema Fix & File Naming Cleanup
|
||||
|
||||
**Critical Fix**: Resolved multiple database schema issues that caused login failures and 500 errors.
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Database Schema Issues
|
||||
- **Sessions table**: Fixed missing `last_activity` column causing "Login failed: table sessions has no column named last_activity"
|
||||
- **Audit log table**: Fixed `target_id`/`created_at` vs `device_id`/`timestamp` mismatch causing login failures
|
||||
- **Peer table**: Added missing `updated_at` and `deleted_at` columns causing 500 errors when editing devices
|
||||
- **Installation script**: Now properly checks and fixes existing table structures during updates
|
||||
|
||||
#### File Naming Cleanup
|
||||
- Removed version numbers from file names for consistency:
|
||||
- `app_v14.py` → `app.py`
|
||||
- `script_v15.js` → `script.js`
|
||||
- `index_v15.html` → `index.html`
|
||||
- Updated all references in documentation and scripts
|
||||
- Service file now correctly points to `app.py`
|
||||
|
||||
#### Python Package Installation
|
||||
- Improved `install_python_dependencies()` function with multiple fallback methods:
|
||||
- `--break-system-packages` for Debian 12+/Ubuntu 23.04+
|
||||
- Virtual environment creation with automatic service update
|
||||
- `--user` flag fallback
|
||||
- System packages via apt fallback
|
||||
- Verification of installed packages
|
||||
|
||||
### Added
|
||||
|
||||
#### Diagnostic Tools (dev_modules/)
|
||||
- **check_and_fix_database.sh**: Comprehensive database schema checker and fixer
|
||||
- Automatically detects database location
|
||||
- Validates all required tables and columns
|
||||
- Fixes missing or incorrect schema
|
||||
- Creates backup before making changes
|
||||
|
||||
- **fix_peer_columns.sh**: Quick fix for peer table columns
|
||||
- Adds all missing columns (updated_at, deleted_at, etc.)
|
||||
- Simple one-command fix for device editing errors
|
||||
|
||||
### Changed
|
||||
- Installation script now performs thorough database migration on every run
|
||||
- Sessions table migration detects old structure (id as PRIMARY KEY) and recreates with correct structure
|
||||
- Audit log table migration validates column names match code expectations
|
||||
|
||||
---
|
||||
|
||||
## [1.4.0] - 2026-01-11
|
||||
|
||||
### 🔐 Security & Authentication Update
|
||||
|
||||
**Major Security Enhancement**: Added comprehensive authentication system for both web console and HBBS HTTP API, plus LAN access capabilities.
|
||||
|
||||
### Added
|
||||
|
||||
#### Authentication System
|
||||
- **User Login System**:
|
||||
- bcrypt password hashing (cost 12)
|
||||
- 24-hour session tokens stored in database
|
||||
- Login page with secure password handling
|
||||
- Session validation on all protected routes
|
||||
|
||||
- **Role-Based Access Control (RBAC)**:
|
||||
- Three roles: admin, operator, viewer
|
||||
- Role-specific permissions for device management
|
||||
- Admin-only access to user management
|
||||
- Audit logging for all actions
|
||||
|
||||
- **User Management Panel**:
|
||||
- Create/edit/delete users
|
||||
- Activate/deactivate accounts
|
||||
- Role assignment
|
||||
- Password reset functionality
|
||||
- User list with status indicators
|
||||
|
||||
#### API Security
|
||||
- **X-API-Key Authentication**:
|
||||
- 64-character random API keys generated during installation
|
||||
- Middleware verification on all HBBS API endpoints
|
||||
- Stored securely in `/opt/rustdesk/.api_key` with 600 permissions
|
||||
- Automatic key injection by web console
|
||||
- 401 Unauthorized for missing/invalid keys
|
||||
|
||||
- **LAN Access**:
|
||||
- HBBS API now binds to `0.0.0.0:21120` (accessible on LAN)
|
||||
- Web console binds to `0.0.0.0:5000` (accessible on LAN)
|
||||
- Protected by authentication (API key + user login)
|
||||
- External tools can use API with X-API-Key header
|
||||
|
||||
#### Web Console Features
|
||||
- **Sidebar Navigation**: Modern sidebar menu with icon-based navigation
|
||||
- **Password-Protected Key Access**: Public key requires password verification
|
||||
- **Password Change**: Users can change their passwords in Settings
|
||||
- **Removed Devices Tab**: Simplified interface, devices managed on Dashboard
|
||||
- **Expanded About Page**: Credits, GitHub links, open source information
|
||||
- **Enhanced Settings**: Password change, session management, preferences
|
||||
|
||||
#### Installation & Updates
|
||||
- **API Key Generation**: Automatic during installation via `openssl rand`
|
||||
- **Environment Variables**: HBBS_API_KEY, FLASK_HOST, FLASK_PORT, FLASK_DEBUG
|
||||
- **Service Configuration**: Updated systemd services with new environment vars
|
||||
- **Update Script**: `update-to-v1.4.0.sh` for existing installations
|
||||
- **Backward Compatibility**: Preserves existing configurations during update
|
||||
|
||||
### Changed
|
||||
|
||||
- **API Binding**: Changed from `127.0.0.1` (localhost-only) to `0.0.0.0` (LAN-accessible)
|
||||
- **Authentication Required**: All API endpoints now require X-API-Key header
|
||||
- **Web Console Access**: Requires user login instead of open access
|
||||
- **Session Management**: 24-hour sessions instead of permanent access
|
||||
- **Database Schema**: Added `users`, `sessions`, `audit_log` tables
|
||||
|
||||
### Security
|
||||
|
||||
- ✅ **Authentication**: All services protected by authentication
|
||||
- ✅ **Encrypted Passwords**: bcrypt hashing for user passwords
|
||||
- ✅ **API Key Auth**: X-API-Key header prevents unauthorized API access
|
||||
- ✅ **Session Tokens**: Time-limited tokens with automatic expiration
|
||||
- ✅ **Audit Trail**: All administrative actions logged
|
||||
- ✅ **Secure Storage**: API keys with 600 permissions
|
||||
- ✅ **XSS Protection**: Input sanitization throughout
|
||||
- ✅ **SQL Injection Prevention**: Parameterized queries only
|
||||
- ✅ **CSRF Protection**: Session-based validation
|
||||
|
||||
### Technical Details
|
||||
|
||||
- **Files Modified**:
|
||||
- `hbbs-patch/src/http_api.rs` - Added X-API-Key middleware
|
||||
- `web/app_v14.py` - Added authentication, user management, API key loading
|
||||
- `web/auth.py` - Password hashing, session management, user CRUD
|
||||
- `web/templates/login.html` - New login page
|
||||
- `web/templates/index_v14.html` - Sidebar navigation, user management UI
|
||||
- `web/static/script_v14.js` - User management, password change, key verification
|
||||
- `install-improved.sh` - API key generation and service configuration
|
||||
- `update-to-v1.4.0.sh` - Update script for existing installations
|
||||
|
||||
- **Database Migration**: `migrations/v1.4.0_auth_system.py`
|
||||
- Creates `users` table with roles
|
||||
- Creates `sessions` table for session management
|
||||
- Creates `audit_log` table for action tracking
|
||||
- Generates default admin user
|
||||
|
||||
- **API Endpoints** (all require X-API-Key):
|
||||
- `GET /api/health` - Health check
|
||||
- `GET /api/peers` - List all peers with online status
|
||||
|
||||
- **Web Endpoints** (all require login except `/login`):
|
||||
- `GET /login` - Login page
|
||||
- `POST /login` - Authenticate user
|
||||
- `GET /logout` - End session
|
||||
- `GET /` - Dashboard
|
||||
- `GET /api/users` - List users (admin only)
|
||||
- `POST /api/users` - Create user (admin only)
|
||||
- `PUT /api/users/<id>` - Update user (admin only)
|
||||
- `DELETE /api/users/<id>` - Delete user (admin only)
|
||||
- `POST /api/change-password` - Change password
|
||||
- `POST /api/verify-password` - Verify password for key access
|
||||
|
||||
### Migration Path
|
||||
|
||||
**For new installations:**
|
||||
```bash
|
||||
sudo ./install-improved.sh
|
||||
```
|
||||
- Automatically generates API key
|
||||
- Configures services for LAN access
|
||||
- Creates default admin user
|
||||
|
||||
**For existing installations:**
|
||||
```bash
|
||||
sudo ./update-to-v1.4.0.sh
|
||||
```
|
||||
- Creates automatic backup
|
||||
- Runs database migration
|
||||
- Generates API key if not exists
|
||||
- Updates systemd services
|
||||
- Preserves existing configuration
|
||||
- Rollback capability on failure
|
||||
|
||||
### Documentation
|
||||
|
||||
- Updated `README.md` with authentication instructions
|
||||
- Updated `hbbs-patch/README.md` with API security documentation
|
||||
- Updated `hbbs-patch/SECURITY_AUDIT.md` with v1.4.0 security review
|
||||
- Updated `docs/PORT_SECURITY.md` with LAN access notes
|
||||
- Added API key retrieval instructions
|
||||
|
||||
### Known Issues
|
||||
|
||||
- 26 Pylance type warnings in `app_v14.py` for `log_audit()` parameters (non-critical)
|
||||
- API key must be manually distributed to external tools
|
||||
|
||||
### Upgrade Notes
|
||||
|
||||
**Breaking Changes:**
|
||||
- Existing API clients must add `X-API-Key` header
|
||||
- Web console now requires user login
|
||||
- Sessions expire after 24 hours
|
||||
|
||||
**Recommended Actions After Upgrade:**
|
||||
1. Login with default admin credentials (shown after migration)
|
||||
2. Change admin password immediately
|
||||
3. Delete `/opt/BetterDeskConsole/admin_credentials.txt`
|
||||
4. Create additional users with appropriate roles
|
||||
5. Update external tools with API key from `/opt/rustdesk/.api_key`
|
||||
6. Configure firewall for LAN access if needed
|
||||
|
||||
---
|
||||
|
||||
## [1.3.0-secure] - 2026-01-10
|
||||
|
||||
### 🔒 Security Update: Localhost-Only API Binding
|
||||
|
||||
**Critical Security Enhancement**: HTTP API now binds exclusively to localhost (127.0.0.1), eliminating network exposure.
|
||||
|
||||
### Changed
|
||||
- **API Port**: Changed from 21114 to 21120
|
||||
- Avoids conflict with RustDesk Pro (which uses 21114 for public API)
|
||||
- Clearly distinguishes this as a localhost-only service
|
||||
- Updated all documentation and configuration examples
|
||||
|
||||
- **API Binding**: Localhost-only (127.0.0.1)
|
||||
- Previous: Bound to 0.0.0.0 (all interfaces, potential security risk)
|
||||
- Current: Bound to 127.0.0.1 (localhost only, secure by design)
|
||||
- API accessible only from same machine
|
||||
- Cannot be accessed from network/internet
|
||||
- No firewall configuration needed for port 21120
|
||||
|
||||
- **Server Configuration**: Added `--api-port` parameter
|
||||
- Command-line parameter support for flexible deployment
|
||||
- Systemd service updated: `ExecStart=/opt/rustdesk/hbbs --api-port 21120`
|
||||
- Windows service compatible with new parameter
|
||||
|
||||
- **Web Console**: Updated to use new API endpoint
|
||||
- Flask app now connects to `http://localhost:21120/api`
|
||||
- Automatic backup of old configuration during update
|
||||
- Verified working with new API port
|
||||
|
||||
### Added
|
||||
- **Documentation**:
|
||||
- `PORT_SECURITY.md` - Complete port security analysis
|
||||
- SSH tunnel instructions for remote API access
|
||||
- Security audit documentation
|
||||
- Updated README with security notes (6 instances of port references)
|
||||
|
||||
- **Binaries**: Updated Linux binaries with security features
|
||||
- `hbbs-v8-api` (9.59 MB) - Built 10.01.2026 10:25 UTC
|
||||
- `hbbr-v8-api` (4.73 MB) - Built 10.01.2026 10:25 UTC
|
||||
- Contains: "HTTP API server listening on (localhost only)" string
|
||||
- Verified: `--api-port` parameter support
|
||||
- Windows binaries retained (compatible with new system)
|
||||
|
||||
- **Installation Scripts**:
|
||||
- `install-improved.sh` configured for v8-api binaries
|
||||
- Automatic backup creation before installation
|
||||
- File validation and verification
|
||||
- Service configuration with new port
|
||||
|
||||
### Security
|
||||
- ✅ **Zero Network Exposure**: API cannot be accessed from external networks
|
||||
- ✅ **Connection Refused**: External access attempts properly blocked
|
||||
- ✅ **SSH Tunnel Support**: Remote access via secure tunnel only
|
||||
- ✅ **No Private Data**: Documentation uses placeholder IPs and example credentials; operator runbooks live in gitignored `docs/private/`
|
||||
- ✅ **Verified Installation**: Complete end-to-end security validation
|
||||
|
||||
### Fixed
|
||||
- **Port Conflict**: No longer conflicts with RustDesk Pro API (port 21114)
|
||||
- **Network Security**: Eliminated accidental API exposure to internet
|
||||
- **Service Startup**: systemd service properly configured with --api-port parameter
|
||||
|
||||
### Technical Details
|
||||
- **API Endpoints**: `/api/health`, `/api/peers` (unchanged)
|
||||
- **Response Format**: JSON (unchanged)
|
||||
- **Performance**: Same as v1.2.0-v8 (~1ms per request)
|
||||
- **Compatibility**: Fully compatible with existing RustDesk clients
|
||||
- **RustDesk Ports**: TCP 21115-21117, UDP 21116 (unchanged, public access required)
|
||||
|
||||
### Remote Access
|
||||
|
||||
For remote API access (e.g., from Windows workstation to Linux server):
|
||||
|
||||
```bash
|
||||
# Create SSH tunnel
|
||||
ssh -L 21120:localhost:21120 user@server
|
||||
|
||||
# Then access API locally
|
||||
curl http://localhost:21120/api/health
|
||||
```
|
||||
|
||||
### Migration from v1.2.0-v8
|
||||
|
||||
**Automatic upgrade:**
|
||||
```bash
|
||||
cd Rustdesk-FreeConsole
|
||||
git pull
|
||||
sudo ./install-improved.sh
|
||||
```
|
||||
|
||||
**Manual steps if needed:**
|
||||
1. Update systemd service: Add `--api-port 21120` to ExecStart
|
||||
2. Update web console: Change API URL to `http://localhost:21120/api`
|
||||
3. Reload services: `systemctl daemon-reload && systemctl restart rustdesksignal betterdesk`
|
||||
|
||||
### Verification
|
||||
|
||||
```bash
|
||||
# 1. Check API binding (should show 127.0.0.1:21120 only)
|
||||
ss -tlnp | grep 21120
|
||||
|
||||
# 2. Test local access (should succeed)
|
||||
curl http://localhost:21120/api/health
|
||||
|
||||
# 3. Test external access (should fail - connection refused)
|
||||
curl http://SERVER_IP:21120/api/health
|
||||
|
||||
# 4. Verify RustDesk ports still public
|
||||
ss -tlnp | grep -E '21115|21116|21117'
|
||||
```
|
||||
|
||||
**Expected results:**
|
||||
- ✅ Port 21120 on 127.0.0.1 (localhost only)
|
||||
- ✅ Local API access works
|
||||
- ✅ External API access blocked
|
||||
- ✅ RustDesk client ports public (21115-21117)
|
||||
|
||||
---
|
||||
|
||||
## [1.2.0-v8] - 2026-01-06
|
||||
|
||||
### 🚀 Major Update: Precompiled Binaries + Bidirectional Ban Enforcement
|
||||
|
||||
**Game Changer**: Installation time reduced from ~20 minutes to ~2 minutes!
|
||||
|
||||
### Added
|
||||
- **Precompiled Binaries**: No more compilation required!
|
||||
- `hbbs-patch/bin/hbbs-v8` (9.5 MB) - Signal server with bidirectional bans
|
||||
- `hbbs-patch/bin/hbbr-v8` (5.0 MB) - Relay server with bidirectional bans
|
||||
- Ready-to-deploy binaries compiled from RustDesk Server v1.1.14
|
||||
- Installation now takes ~2-3 minutes (vs ~20 min with compilation)
|
||||
- Reduced dependencies: No longer requires git, cargo, or Rust toolchain
|
||||
|
||||
- **Bidirectional Ban Enforcement**: Complete ban system overhaul
|
||||
- **Source Ban Check**: Prevents banned devices from initiating ANY connections
|
||||
- Checks device ID at punch hole request (P2P connections)
|
||||
- Checks device ID at relay request (relay connections)
|
||||
- Added `find_by_addr()` method in `peer.rs` to identify source device by IP
|
||||
- **Target Ban Check**: Prevents connections TO banned devices (legacy feature)
|
||||
- Works for both P2P and relay connection types
|
||||
- Real-time database sync - no restart required after ban/unban
|
||||
- Comprehensive logging for audit trail
|
||||
|
||||
- **Enhanced Build System**:
|
||||
- Updated `build.sh` with v8 patches (8 automated patches)
|
||||
- New deployment script: `deploy-v8.sh`
|
||||
- Binary verification and checksum tools
|
||||
- Rebuild instructions for custom architectures
|
||||
|
||||
- **Documentation**:
|
||||
- `hbbs-patch/bin/README.md` - Binary documentation and verification
|
||||
- `docs/INSTALLATION_V8.md` - Complete v8 installation guide
|
||||
- `hbbs-patch/BAN_ENFORCEMENT.md` - Technical documentation for bidirectional bans
|
||||
- `hbbs-patch/SECURITY_AUDIT.md` - Security audit report
|
||||
- Updated all guides with v8 information
|
||||
|
||||
### Changed
|
||||
- **Installer Redesign** (`install.sh`):
|
||||
- Now uses precompiled binaries from `hbbs-patch/bin/`
|
||||
- Removed compilation steps (no more `cargo build`)
|
||||
- Reduced dependencies: Only requires python3, pip3, curl, systemctl
|
||||
- Automatic backup of existing binaries (timestamped)
|
||||
- Installs both HBBS and HBBR
|
||||
- Restarts services after installation
|
||||
- ~500MB disk space saved (no Rust toolchain needed)
|
||||
|
||||
- **Version Numbering**: Changed from `1.2.0` to `1.2.0-v8` to indicate binary version
|
||||
|
||||
### Fixed
|
||||
- **Ban Enforcement Bug**: Banned devices could still initiate connections
|
||||
- Root cause: Only target device was checked, not source device
|
||||
- Solution: Added dual ban check (source + target) in punch hole and relay handlers
|
||||
- Added `find_by_addr()` to map socket address to device ID
|
||||
- Now blocks in BOTH directions
|
||||
|
||||
### Removed
|
||||
- Old binary versions (`hbbs-v2-patched` through `hbbs-v5-patched`) - no longer needed
|
||||
- Compilation requirements from documentation
|
||||
- References to git/cargo in installation guides
|
||||
|
||||
### Technical Details
|
||||
- **Architecture**: Linux x86_64 (tested on Ubuntu 20.04+, Debian 11+)
|
||||
- **Performance**: Same as before (~1ms per ban check)
|
||||
- **Reliability**: 100% ban enforcement in both directions
|
||||
- **Compatibility**: Works with all RustDesk clients compatible with v1.1.14 server
|
||||
- **Build Time**: N/A for end users (using precompiled), ~15-20 min if rebuilding from source
|
||||
|
||||
### Migration Notes
|
||||
Users upgrading from v1.2.0 or earlier:
|
||||
```bash
|
||||
cd Rustdesk-FreeConsole
|
||||
git pull
|
||||
sudo ./install.sh # Will automatically backup and upgrade
|
||||
```
|
||||
|
||||
Benefits of v8:
|
||||
- ✅ 10x faster installation
|
||||
- ✅ No compilation errors
|
||||
- ✅ Fixed ban enforcement bug (bidirectional)
|
||||
- ✅ Smaller dependency footprint
|
||||
- ✅ Easier deployment
|
||||
|
||||
---
|
||||
|
||||
## [1.2.0] - 2026-01-05
|
||||
|
||||
### 🔥 Major Update: Native HBBS Ban Check
|
||||
|
||||
**Breaking Change**: Ban enforcement moved from Python daemon to native HBBS binary
|
||||
|
||||
### Added
|
||||
- **Native Ban Check in HBBS**: Device bans now enforced at registration level in HBBS server
|
||||
- Modified `src/database.rs`: Added `is_device_banned()` method for real-time ban checking
|
||||
- Modified `src/peer.rs`: Registration logic now checks ban status before accepting devices
|
||||
- Banned devices receive `UUID_MISMATCH` error code (standard RustDesk rejection)
|
||||
- 100% effective - no race conditions or timing windows
|
||||
- Fail-open policy: continues operation if database unavailable
|
||||
- Single SQL query per registration: `SELECT is_banned FROM peer WHERE id = ?`
|
||||
|
||||
- **HBBS Build System**: Complete automated build and installation tooling
|
||||
- `hbbs-patch/build.sh`: Automated patch application and compilation script
|
||||
- `hbbs-patch/install.sh`: One-command installation on server
|
||||
- `hbbs-patch/QUICKSTART.md`: 3-step setup guide
|
||||
- `hbbs-patch/BAN_CHECK_PATCH.md`: Technical documentation
|
||||
- Supports RustDesk Server v1.1.14
|
||||
|
||||
- **Documentation**:
|
||||
- Complete HBBS patch documentation in `hbbs-patch/` directory
|
||||
- Build system guides for local and server-side compilation
|
||||
- Migration guide from Ban Enforcer to native ban check
|
||||
|
||||
### Changed
|
||||
- **Ban Enforcer Deprecated**: The Python `ban_enforcer.py` daemon is now **obsolete**
|
||||
- Native HBBS implementation replaces daemon functionality
|
||||
- No external processes needed
|
||||
- Better performance and reliability
|
||||
- Kept in repository for reference/rollback purposes
|
||||
|
||||
### Technical Details
|
||||
- **Performance**: Minimal overhead (~1ms per registration)
|
||||
- **Reliability**: 100% ban enforcement (vs ~95% with daemon)
|
||||
- **Architecture**: Ban check integrated into device registration flow
|
||||
- **Compatibility**: Works with existing BetterDesk Console database schema
|
||||
- **Build**: Rust 1.90+ required for compilation
|
||||
|
||||
### Migration Notes
|
||||
Users upgrading from v1.1.0:
|
||||
1. Compile patched HBBS binary (see `hbbs-patch/QUICKSTART.md`)
|
||||
2. Install patched binary on server
|
||||
3. Stop and disable `rustdesk-ban-enforcer` service
|
||||
4. Verify ban functionality through console
|
||||
|
||||
---
|
||||
|
||||
## [1.1.0] - 2026-01-05
|
||||
|
||||
### Added
|
||||
- **Device Banning System**: Complete implementation of device ban management
|
||||
- Added `is_banned`, `banned_at`, `banned_by`, and `ban_reason` columns to database
|
||||
- Database migration script (`migrations/v1.1.0_device_bans.py`)
|
||||
- Ban/Unban API endpoints: `POST /api/device/<id>/ban` and `POST /api/device/<id>/unban`
|
||||
- Visual ban indicators in device list (red background, BANNED badge)
|
||||
- Ban/Unban buttons in device table (context-sensitive)
|
||||
- Detailed ban information in device details modal
|
||||
- "Banned" statistics card in dashboard
|
||||
- Confirmation dialogs for ban operations with reason input
|
||||
- Disabled connect button for banned devices
|
||||
- Ban reason validation (max 500 characters)
|
||||
|
||||
### Changed
|
||||
- Device table now visually highlights banned devices with red tint
|
||||
- Statistics endpoint now includes `banned` count
|
||||
- Device details modal shows comprehensive ban information when applicable
|
||||
- Connect functionality disabled for banned devices
|
||||
|
||||
### Security
|
||||
- Ban operations require explicit confirmation
|
||||
- Ban reason required for accountability
|
||||
- All ban actions tracked with timestamp and administrator info
|
||||
|
||||
## [1.0.1] - 2026-01-05
|
||||
|
||||
### Added
|
||||
- **Soft Delete System**: Devices are now marked as deleted instead of being permanently removed
|
||||
- Added `is_deleted`, `deleted_at`, and `updated_at` columns to database
|
||||
- Devices can potentially be restored in future versions
|
||||
- Database migration script (`migrations/v1.0.1_soft_delete.py`)
|
||||
- **Input Validation**: Comprehensive validation for all user inputs
|
||||
- Device ID format validation (alphanumeric, underscores, hyphens only)
|
||||
- Maximum lengths enforced (50 chars for IDs, 500 chars for notes)
|
||||
- XSS protection with input sanitization
|
||||
- **Enhanced User Feedback**:
|
||||
- Explicit confirmation dialogs for delete operations
|
||||
- Warning dialogs when changing device IDs
|
||||
- Detailed error messages for validation failures
|
||||
- Better error handling with specific HTTP status codes
|
||||
- **Security Improvements**:
|
||||
- SQL injection protection through parameterized queries
|
||||
- Check for duplicate device IDs before updates
|
||||
- Database constraint violation handling
|
||||
|
||||
### Changed
|
||||
- Delete operations now perform soft delete (UPDATE) instead of hard delete (DELETE)
|
||||
- All SELECT queries now filter out deleted devices (`is_deleted = 0`)
|
||||
- UPDATE queries now include `updated_at` timestamp
|
||||
- Error messages are more informative and user-friendly
|
||||
|
||||
### Fixed
|
||||
- **Unstable device deletion**: Now uses safe soft delete mechanism
|
||||
- **Device ID change issues**: Added explicit warnings and validation
|
||||
- **Missing error feedback**: Users now see detailed error messages
|
||||
- **Potential data loss**: Deleted devices preserved in database
|
||||
|
||||
## [1.0.0] - 2026-01-05
|
||||
|
||||
### Added
|
||||
- Enhanced RustDesk HBBS server with HTTP REST API
|
||||
- Real-time device status monitoring using authentic RustDesk algorithm
|
||||
- Modern web management console with glassmorphism UI
|
||||
- Material Icons integration (fully offline)
|
||||
- Device management features (CRUD operations)
|
||||
- Dashboard with real-time statistics
|
||||
- Search and filter functionality
|
||||
- Device notes and labeling system
|
||||
- Public key display and quick copy
|
||||
- Automatic installation script with backup support
|
||||
- Systemd service integration for auto-restart
|
||||
- CORS support for web console integration
|
||||
- Thread-safe PeerMap sharing (Arc<RwLock>)
|
||||
- RESTful API with JSON responses
|
||||
- Comprehensive documentation
|
||||
- Demo mode with mock data for screenshots
|
||||
|
||||
### Changed
|
||||
- Modified HBBS to use Arc<PeerMap> for thread safety
|
||||
- Replaced FontAwesome with Google Material Icons
|
||||
- Improved status detection (memory-based, not database)
|
||||
- Enhanced UI with animations and modern design
|
||||
- Updated peer.rs for immutable reference compatibility
|
||||
|
||||
### Technical Details
|
||||
- **HBBS API Port**: 21114 (default)
|
||||
- **Web Console Port**: 5000 (default)
|
||||
- **Status Timeout**: 30 seconds (matches RustDesk client)
|
||||
- **Status Detection**: In-memory PeerMap lookup
|
||||
- **Architecture**: Shared state between HBBS and API server
|
||||
|
||||
### Security
|
||||
- Automatic backup creation during installation
|
||||
- Service isolation with systemd
|
||||
- Graceful degradation if API unavailable
|
||||
- No external dependencies (offline-ready)
|
||||
|
||||
### Performance
|
||||
- Zero database queries for status checks
|
||||
- In-memory lookups (microsecond response time)
|
||||
- Async/await throughout for maximum efficiency
|
||||
- Minimal resource overhead
|
||||
|
||||
### Compatibility
|
||||
- RustDesk HBBS 1.1.9+
|
||||
- Ubuntu 20.04+, Debian 11+, CentOS 8+
|
||||
- Python 3.8+
|
||||
- Rust 1.70+
|
||||
|
||||
### Known Limitations
|
||||
- Device ID modification may cause access issues (use Note field for naming)
|
||||
- Device deletion functionality is unstable
|
||||
- No authentication system (internal networks only)
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Planned for 1.0.1 (Bug Fixes)
|
||||
- Fix device deletion functionality
|
||||
- Improve device ID change handling
|
||||
- Add confirmation dialogs for destructive operations
|
||||
- Better error messages
|
||||
|
||||
### Planned for 1.1.0
|
||||
- Multi-language support (i18n)
|
||||
- User authentication system
|
||||
- Role-based access control
|
||||
- Connection history logs
|
||||
- Performance metrics dashboard
|
||||
|
||||
### Planned for 1.2.0
|
||||
- WebSocket for real-time updates
|
||||
- Device grouping and tagging
|
||||
- Email/Slack notifications
|
||||
- REST API authentication (JWT)
|
||||
- Mobile responsive improvements
|
||||
|
||||
### Planned for 2.0.0
|
||||
- Multi-server support
|
||||
- High availability setup
|
||||
- Advanced analytics
|
||||
- Custom themes
|
||||
- Plugin system
|
||||
|
||||
---
|
||||
|
||||
[1.0.0]: https://github.com/UNITRONIX/Rustdesk-FreeConsole/releases/tag/v1.0.0
|
||||
**Current changelog:** [../../CHANGELOG.md](../../CHANGELOG.md)
|
||||
|
||||
+81
-211
@@ -1,90 +1,72 @@
|
||||
# API Reference
|
||||
|
||||
BetterDesk exposes two HTTP APIs: the **Go Server API** (port 21114) and the **Node.js Client API** (port 21121).
|
||||
BetterDesk exposes two HTTP APIs on the Go server:
|
||||
|
||||
| Port | Role |
|
||||
|------|------|
|
||||
| **21114** | Admin REST API (panel, automation; often bound to localhost) |
|
||||
| **21121** | RustDesk **Client API** (login, address book, heartbeat) |
|
||||
|
||||
On some installs the Node console still listens on **21121** as a **compat reverse-proxy** to Go. Handlers live in Go (`client_api_handlers.go`). Point RustDesk **API Server** at `:21121` (with `http://` or `https://`).
|
||||
|
||||
---
|
||||
|
||||
## Authentication
|
||||
|
||||
### API Key (Server-to-Server)
|
||||
### API key (server-to-server)
|
||||
|
||||
```
|
||||
X-API-Key: <your-api-key>
|
||||
```
|
||||
|
||||
Used by the Node.js console to communicate with the Go server. The API key is stored in `/opt/betterdesk/.api_key`.
|
||||
Used by the panel talking to Go. Key file is typically `/opt/betterdesk/.api_key`.
|
||||
|
||||
### JWT Bearer (User API)
|
||||
### JWT (user / client)
|
||||
|
||||
```
|
||||
Authorization: Bearer <jwt-token>
|
||||
```
|
||||
|
||||
Obtained via `POST /api/login` on the Client API (port 21121). Used by Pro users and automated integrations.
|
||||
From `POST /api/login` on the Client API (`:21121`). Used by Pro users and integrations.
|
||||
|
||||
---
|
||||
|
||||
## Go Server API (Port 21114)
|
||||
## Admin API (port 21114)
|
||||
|
||||
Base URL: `http://your-server:21114/api`
|
||||
|
||||
### Public Endpoints (No Auth Required)
|
||||
### Public (no auth)
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/server-config` | Server address, public key, version |
|
||||
| `POST` | `/api/heartbeat` | Client heartbeat with CPU/memory/disk metrics |
|
||||
| `POST` | `/api/sysinfo` | Client system info upload (hostname, OS, version) |
|
||||
| `POST` | `/api/sysinfo_ver` | Sysinfo version check (SHA256 hash) |
|
||||
| `GET` | `/api/server/stats` | Total/online peer counts |
|
||||
| `GET` | `/api/server-config` | Address, public key, version |
|
||||
| `POST` | `/api/heartbeat` | Client heartbeat |
|
||||
| `POST` | `/api/sysinfo` | System info upload |
|
||||
| `POST` | `/api/sysinfo_ver` | Sysinfo hash check |
|
||||
| `GET` | `/api/server/stats` | Peer counts |
|
||||
|
||||
### Device Management (API Key Required)
|
||||
### Devices (API key)
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/peers` | List all peers with live status |
|
||||
| `GET` | `/api/peers/{id}` | Get single peer with live status |
|
||||
| `PATCH` | `/api/peers/{id}` | Update peer fields (note, user, tags) |
|
||||
| `DELETE` | `/api/peers/{id}` | Delete peer (soft-delete) |
|
||||
| `DELETE` | `/api/peers/{id}?revoke=true` | Revoke: delete + block + disconnect |
|
||||
| `DELETE` | `/api/peers/{id}?cascade=true` | Delete with linked devices |
|
||||
| `GET` | `/api/peers` | List peers |
|
||||
| `GET` | `/api/peers/{id}` | One peer |
|
||||
| `PATCH` | `/api/peers/{id}` | Update fields |
|
||||
| `DELETE` | `/api/peers/{id}` | Soft-delete |
|
||||
| `DELETE` | `/api/peers/{id}?revoke=true` | Delete + block + disconnect |
|
||||
| `POST` | `/api/peers/{id}/change-id` | Change device ID |
|
||||
| `PUT` | `/api/peers/{id}/tags` | Set peer tags |
|
||||
| `GET` | `/api/peers/stats` | Detailed peer statistics |
|
||||
| `GET` | `/api/peers/{id}/metrics` | Historical metrics (CPU/memory/disk) |
|
||||
| `POST` | `/api/peers/{id}/wol` | Send Wake-on-LAN magic packet |
|
||||
| `PUT` | `/api/peers/{id}/tags` | Set tags |
|
||||
| `GET` | `/api/peers/{id}/metrics` | Historical metrics |
|
||||
| `POST` | `/api/peers/{id}/wol` | Wake-on-LAN |
|
||||
|
||||
#### List Peers (Example)
|
||||
#### List peers
|
||||
|
||||
```bash
|
||||
curl http://your-server:21114/api/peers \
|
||||
-H "X-API-Key: your-api-key"
|
||||
```
|
||||
|
||||
**Response:**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "1340238749",
|
||||
"uuid": "a1b2c3d4-...",
|
||||
"hostname": "DESKTOP-ABC",
|
||||
"platform": "Windows 11",
|
||||
"version": "1.3.1",
|
||||
"ip": "192.168.1.100",
|
||||
"status": 1,
|
||||
"live_online": true,
|
||||
"live_status": "ONLINE",
|
||||
"last_online": "2026-03-27T12:00:00Z",
|
||||
"note": "Reception desk",
|
||||
"tags": "office,floor1",
|
||||
"device_type": "",
|
||||
"linked_peer_id": ""
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
#### Change Device ID
|
||||
#### Change device ID
|
||||
|
||||
```bash
|
||||
curl -X POST http://your-server:21114/api/peers/1340238749/change-id \
|
||||
@@ -95,124 +77,63 @@ curl -X POST http://your-server:21114/api/peers/1340238749/change-id \
|
||||
|
||||
#### Wake-on-LAN
|
||||
|
||||
Body field is **`mac`** (not `mac_address`):
|
||||
|
||||
```bash
|
||||
curl -X POST http://your-server:21114/api/peers/RECEPTION01/wol \
|
||||
-H "X-API-Key: your-api-key" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"mac_address": "AA:BB:CC:DD:EE:FF"}'
|
||||
-d '{"mac": "AA:BB:CC:DD:EE:FF"}'
|
||||
```
|
||||
|
||||
### Configuration
|
||||
WoL only reaches hosts on the **same LAN** as the BetterDesk server (magic packet broadcast).
|
||||
|
||||
### Config / audit / health
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/config/{key}` | Get config value |
|
||||
| `PUT` | `/api/config/{key}` | Set config value |
|
||||
| `GET` / `PUT` | `/api/config/{key}` | Config value |
|
||||
| `GET` | `/api/audit` | Audit query |
|
||||
| `POST` | `/api/audit/conn` | Connection audit |
|
||||
| `GET` | `/api/health` | Health check |
|
||||
|
||||
### Audit
|
||||
### Address book / policies / CDAP
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/audit` | Query audit log entries |
|
||||
| `POST` | `/api/audit/conn` | Log connection audit event |
|
||||
| `GET` / `POST` | `/api/ab` | Address book |
|
||||
| `GET` | `/api/ab/personal` | Personal AB |
|
||||
| `GET` / `POST` / `PUT` / `DELETE` | `/api/access-policies`… | Policy inventory (not enforced on punch) |
|
||||
| `GET` | `/api/cdap/status` | CDAP gateway |
|
||||
| `GET` | `/api/cdap/devices` | CDAP devices |
|
||||
| `POST` | `/api/cdap/devices/{id}/command` | Command to device |
|
||||
|
||||
### Server Management
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/health` | Server health check |
|
||||
|
||||
### Address Book
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/ab` | Get user address book |
|
||||
| `POST` | `/api/ab` | Save user address book |
|
||||
| `GET` | `/api/ab/personal` | Get personal AB |
|
||||
| `GET` | `/api/ab/tags` | Get AB tags |
|
||||
|
||||
### Access Policies
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/access-policies` | List all access policies |
|
||||
| `GET` | `/api/access-policies/{id}` | Get single policy |
|
||||
| `POST` | `/api/access-policies` | Create access policy |
|
||||
| `PUT` | `/api/access-policies/{id}` | Update access policy |
|
||||
| `DELETE` | `/api/access-policies/{id}` | Delete access policy |
|
||||
|
||||
#### Access Policy Schema
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"peer_id": "RECEPTION01",
|
||||
"password_hash": "$2a$10$...",
|
||||
"permanent_password": true,
|
||||
"allowed_operators": ["admin", "operator1"],
|
||||
"schedule": {
|
||||
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
|
||||
"start_time": "08:00",
|
||||
"end_time": "18:00",
|
||||
"timezone": "Europe/Warsaw"
|
||||
},
|
||||
"enabled": true,
|
||||
"created_at": "2026-03-27T12:00:00Z"
|
||||
}
|
||||
```
|
||||
|
||||
### RustDesk Client Compatibility
|
||||
|
||||
These endpoints mirror the standard RustDesk server API:
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `POST` | `/api/login` | Client login (username/password) |
|
||||
| `GET` | `/api/login-options` | Available login methods (`""` + optional `oidc/<name>`) |
|
||||
| `POST` | `/api/oidc/auth` | Start OIDC for desktop client (`{code,url}`) |
|
||||
| `GET` | `/api/oidc/auth-query` | Poll OIDC login until `access_token` |
|
||||
| `POST` | `/api/logout` | Client logout |
|
||||
| `GET` | `/api/currentUser` | Current authenticated user info |
|
||||
|
||||
### CDAP Endpoints
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/cdap/status` | CDAP gateway status |
|
||||
| `GET` | `/api/cdap/devices` | List connected CDAP devices |
|
||||
| `GET` | `/api/cdap/devices/{id}/info` | Device info (type, version, uptime) |
|
||||
| `GET` | `/api/cdap/devices/{id}/manifest` | Device widget manifest |
|
||||
| `GET` | `/api/cdap/devices/{id}/state` | Current widget state values |
|
||||
| `POST` | `/api/cdap/devices/{id}/command` | Send command to device |
|
||||
|
||||
### WebSocket Events
|
||||
### WebSocket events
|
||||
|
||||
```
|
||||
ws://your-server:21114/api/ws/events?filter=peer_online
|
||||
```
|
||||
|
||||
Real-time event stream. Supported filters:
|
||||
- `peer_online` — Device online/offline status changes
|
||||
- `peer_registered` — New device registration
|
||||
- `config_changed` — Configuration updates
|
||||
Filters include `peer_online`, `peer_registered`, `config_changed`.
|
||||
|
||||
---
|
||||
|
||||
## Node.js Client API (Port 21121)
|
||||
## Client API (port 21121)
|
||||
|
||||
Base URL: `http://your-server:21121/api`
|
||||
|
||||
This API serves RustDesk desktop/mobile clients on a dedicated WAN-facing port with 7-layer security.
|
||||
RustDesk desktop/mobile use this port for login and AB sync.
|
||||
|
||||
### Authentication Endpoints
|
||||
### Auth
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `POST` | `/api/login` | Client login |
|
||||
| `POST` | `/api/login/2fa` | TOTP verification |
|
||||
| `GET` | `/api/login-options` | Login method options |
|
||||
| `POST` | `/api/logout` | Client logout |
|
||||
| `GET` | `/api/currentUser` | Current user info |
|
||||
| `POST` | `/api/login` | Login (and TOTP challenge on same endpoint) |
|
||||
| `GET` | `/api/login-options` | Login methods |
|
||||
| `POST` | `/api/logout` | Logout |
|
||||
| `GET` | `/api/currentUser` | Current user |
|
||||
|
||||
There is **no** separate `/api/login/2fa` route. When 2FA is required, `/api/login` returns a challenge; send the code back on `/api/login` with the challenge fields (`type` / `code` as the client expects).
|
||||
|
||||
#### Login
|
||||
|
||||
@@ -222,95 +143,44 @@ curl -X POST http://your-server:21121/api/login \
|
||||
-d '{"username": "operator1", "password": "secret"}'
|
||||
```
|
||||
|
||||
**Response (success):**
|
||||
Success returns `access_token`. If 2FA is needed, the response type indicates TOTP — complete login with the code on the same endpoint (stock RustDesk clients handle this UI).
|
||||
|
||||
```json
|
||||
{
|
||||
"access_token": "eyJhbGciOiJIUzI1NiIs...",
|
||||
"type": "access_token",
|
||||
"user": {
|
||||
"name": "operator1",
|
||||
"role": "operator"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Response (2FA required):**
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "2fa_required",
|
||||
"tfa_type": "totp",
|
||||
"access_token": "partial_token_here"
|
||||
}
|
||||
```
|
||||
|
||||
### Address Book
|
||||
### Also on 21121
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/ab` | Get address book |
|
||||
| `POST` | `/api/ab` | Save address book |
|
||||
| `GET` | `/api/ab/personal` | Get personal AB |
|
||||
| `GET` | `/api/ab/tags` | Get AB tags |
|
||||
| `GET` / `POST` | `/api/ab`… | Address book |
|
||||
| `GET` | `/api/peers` | Peers (Bearer) |
|
||||
| `POST` | `/api/heartbeat` | Heartbeat |
|
||||
| `POST` | `/api/sysinfo` | Sysinfo |
|
||||
| `POST` | `/api/audit/conn` | Conn audit |
|
||||
|
||||
### Device Endpoints
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `GET` | `/api/peers` | List peers (with Bearer token) |
|
||||
| `GET` | `/api/users` | List users (with Bearer token) |
|
||||
|
||||
### Heartbeat & Sysinfo
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| `POST` | `/api/heartbeat` | Device heartbeat |
|
||||
| `POST` | `/api/sysinfo` | System information update |
|
||||
| `POST` | `/api/audit/conn` | Connection audit log |
|
||||
OIDC for desktop clients uses `/api/login-options` and related OIDC paths — see [[OIDC SSO|OIDC-SSO]].
|
||||
|
||||
---
|
||||
|
||||
## Error Responses
|
||||
|
||||
### Standard Error Format
|
||||
## Errors
|
||||
|
||||
```json
|
||||
{
|
||||
"error": "Error description"
|
||||
}
|
||||
{ "error": "Error description" }
|
||||
```
|
||||
|
||||
### HTTP Status Codes
|
||||
| Code | Meaning |
|
||||
|------|---------|
|
||||
| 200 / 201 | OK / created |
|
||||
| 400 | Bad request |
|
||||
| 401 / 403 | Auth / role |
|
||||
| 404 | Missing |
|
||||
| 429 | Rate limit (`Retry-After`) |
|
||||
| 500 | Server error |
|
||||
|
||||
| Code | Description |
|
||||
|------|-------------|
|
||||
| `200` | Success |
|
||||
| `201` | Created |
|
||||
| `400` | Bad request (validation error) |
|
||||
| `401` | Unauthorized (missing/invalid auth) |
|
||||
| `403` | Forbidden (insufficient role) |
|
||||
| `404` | Resource not found |
|
||||
| `429` | Rate limit exceeded |
|
||||
| `500` | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
## Rate Limits
|
||||
|
||||
| Endpoint | Limit |
|
||||
|----------|-------|
|
||||
| `POST /api/login` | 5 requests/minute per IP |
|
||||
| `POST /api/login/2fa` | 5 requests/minute per IP |
|
||||
| Other endpoints | No limit (API key/JWT required) |
|
||||
|
||||
The `429` response includes `Retry-After` header indicating seconds to wait.
|
||||
Login is rate-limited (about 5/min per IP).
|
||||
|
||||
---
|
||||
|
||||
## See also
|
||||
|
||||
- [[User Management|User-Management]] — Pro user JWT auth
|
||||
- [[Organizations and RBAC|Organizations-and-RBAC]] — org-scoped endpoints
|
||||
- [[CDAP]] — CDAP gateway API
|
||||
- [API docs in repo](https://github.com/UNITRONIX/BetterDesk/tree/main/docs/cdap/API_REFERENCE.md)
|
||||
- [[User Management|User-Management]]
|
||||
- [[Unattended Access and WoL|Unattended-and-WoL]]
|
||||
- [[CDAP]]
|
||||
- [CDAP API in repo](https://github.com/UNITRONIX/BetterDesk/blob/dev/docs/cdap/API_REFERENCE.md)
|
||||
|
||||
@@ -1,106 +1,63 @@
|
||||
# ⚠️ Alpha Software Notice
|
||||
# Alpha software notice
|
||||
|
||||
> **Last updated:** 2026-04-15
|
||||
> **Last updated:** 2026-09-06 (product line **3.5.x**)
|
||||
|
||||
Both the **BetterDesk MGMT Client** and **BetterDesk Agent Client** are in early alpha (v1.0.0). They are under active development and **should not be used in production environments**.
|
||||
Some desktop apps in this repo are still alpha. The Go server, web console, stock RustDesk clients, and Support Agent are the production path.
|
||||
|
||||
---
|
||||
|
||||
## Component Readiness Matrix
|
||||
## What is ready
|
||||
|
||||
| Component | Version | Status | Production Use |
|
||||
|-----------|---------|--------|----------------|
|
||||
| **Go Server** | v2.4.0 | ✅ Stable | ✅ Recommended |
|
||||
| **Web Console (Node.js)** | v2.4.0 | ✅ Stable | ✅ Recommended |
|
||||
| **Native CDAP Agent (Go)** | v1.0.0 | ✅ Stable | ✅ OK for deployment |
|
||||
| **MGMT Client (Tauri)** | v1.0.0-alpha | ⚠️ Alpha | ❌ Do NOT use in production |
|
||||
| **Agent Client (Tauri)** | v1.0.0-alpha | ⚠️ Alpha | ❌ Do NOT use in production |
|
||||
| Component | Status | Production |
|
||||
|-----------|--------|------------|
|
||||
| Go server | Stable (3.5.x) | Yes |
|
||||
| Web console (Node.js 22+) | Stable (3.5.x) | Yes |
|
||||
| Stock RustDesk client | Stable | Yes |
|
||||
| Support Agent (Go / Wails UI) | Production path | Yes — build from [[Client Generator\|Client-Generator]] |
|
||||
| Native CDAP agent (Go) | Stable | Yes for headless / IoT |
|
||||
| MeshAgent compat layer | Optional (on by default) | Yes if you need it |
|
||||
| MGMT Client (Tauri) | Alpha | No |
|
||||
| Agent Client (Tauri) | Alpha (prefer Support Agent) | No |
|
||||
| Native BetterDesk Desktop (Flutter) | Early | No |
|
||||
|
||||
Version numbers move with each release. Check [Releases](https://github.com/UNITRONIX/BetterDesk/releases) or **Settings → Updates** on your panel.
|
||||
|
||||
---
|
||||
|
||||
## BetterDesk MGMT Client — Known Limitations
|
||||
## MGMT Client (Tauri) — alpha
|
||||
|
||||
The MGMT Client is an operator/admin desktop app (Tauri v2 + SolidJS + Rust). The following features are incomplete or unstable:
|
||||
Operator desktop app. Incomplete remote pipeline, token refresh, bulk actions, file transfer, and cross-platform packaging. Do not deploy as your main admin UI — use the web console.
|
||||
|
||||
- **Remote desktop** — Basic streaming works but the H.264/VP9 codec pipeline is not stable in all network conditions
|
||||
- **Token management** — JWT refresh may fail on long sessions, requiring re-login
|
||||
- **Device management** — Bulk actions, advanced filtering, and some context menu operations are not yet implemented
|
||||
- **Chat** — E2E encryption is implemented but the connection may drop in certain network scenarios
|
||||
- **File transfer** — The UI exists but large file transfer via the binary protocol is incomplete
|
||||
- **CDAP integration** — Widget rendering and command execution work but are not fully tested across all device types
|
||||
- **Cross-platform** — Only Windows builds (MSI/NSIS) are currently available; Linux and macOS are planned but not yet built
|
||||
- **Server panel** — Admin operations work but may not reflect changes in real-time
|
||||
## Agent Client (Tauri) — alpha
|
||||
|
||||
### What works well
|
||||
Older endpoint app. Prefer **Support Agent** from the Client Generator for inbound support over Web Remote / CDAP.
|
||||
|
||||
- Server connection and operator authentication (including TOTP 2FA)
|
||||
- Device list with live status indicators
|
||||
- Help request management (inbox, accept & connect)
|
||||
- Server management panel (admin only)
|
||||
- Notification center with type filtering
|
||||
- mDNS LAN server discovery
|
||||
- Session history viewing
|
||||
## Native BetterDesk Desktop (Flutter)
|
||||
|
||||
Early operator shell added in 3.5.52. Treat as experimental until release notes say otherwise.
|
||||
|
||||
---
|
||||
|
||||
## BetterDesk Agent Client — Known Limitations
|
||||
## Production stack
|
||||
|
||||
The Agent Client is a lightweight endpoint agent (Tauri v2 + SolidJS + Rust). The following features are incomplete or unstable:
|
||||
|
||||
- **Remote access support** — Screen sharing and remote control input injection are not yet implemented
|
||||
- **Administrative automation** — Script execution, policy deployment, and operator-tasked jobs are in early stages
|
||||
- **Security hardening** — Mutual auth, certificate pinning, and advanced process hardening are not yet complete
|
||||
- **Cross-platform** — Only Windows installer (NSIS) is available; Linux and macOS builds are planned
|
||||
- **Service mode** — Background service via NSSM works but may not survive all upgrade scenarios gracefully
|
||||
- **Config sync** — Server-pushed configuration updates may not apply until agent restart
|
||||
|
||||
### What works well
|
||||
|
||||
- Setup wizard with 5-step server validation and registration
|
||||
- Device identity generation with OS keyring storage
|
||||
- System info collection and heartbeat reporting
|
||||
- Tray icon with autostart on login
|
||||
- Help request submission (4-state flow)
|
||||
- Basic chat with operators
|
||||
- Settings panel (connection, privacy, general, about)
|
||||
1. BetterDesk Go server
|
||||
2. BetterDesk web console
|
||||
3. Stock RustDesk client (1.4.7+ recommended)
|
||||
4. Optional: Support Agent and/or native CDAP agent
|
||||
|
||||
---
|
||||
|
||||
## What to Use in Production
|
||||
## Reporting issues
|
||||
|
||||
For production environments, the recommended stack is:
|
||||
Include: component name, OS, steps, logs (redact secrets), and panel/server version from Settings → Updates.
|
||||
|
||||
1. **BetterDesk Go Server** — Fully production-ready signal/relay/API server
|
||||
2. **BetterDesk Web Console (Node.js)** — Stable admin panel with full device management, RBAC, organizations, TOTP 2FA
|
||||
3. **Standard RustDesk Client** — For remote desktop connections (fully compatible with BetterDesk server)
|
||||
4. **Native CDAP Agent (Go)** *(optional)* — For headless servers and IoT devices that need telemetry and remote commands
|
||||
|
||||
This combination provides full functionality without relying on any alpha components.
|
||||
|
||||
---
|
||||
|
||||
## When Will These Clients Be Production-Ready?
|
||||
|
||||
There is no fixed timeline. Both clients are being actively developed. Progress is tracked in the [GitHub Issues](https://github.com/UNITRONIX/BetterDesk/issues) and the project's `copilot-instructions.md` changelog.
|
||||
|
||||
When the clients reach **beta** status, this notice will be updated accordingly.
|
||||
|
||||
---
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
If you test the alpha clients and encounter bugs, please report via [GitHub Issues](https://github.com/UNITRONIX/BetterDesk/issues) with:
|
||||
|
||||
- Client name and version (e.g., "MGMT Client 1.0.0-alpha")
|
||||
- Operating system and version
|
||||
- Steps to reproduce the issue
|
||||
- Screenshots or error logs
|
||||
- Server version (Go server + Node.js console)
|
||||
- [GitHub Issues](https://github.com/UNITRONIX/BetterDesk/issues)
|
||||
|
||||
---
|
||||
|
||||
## See also
|
||||
|
||||
- [[Desktop Clients|Desktop-Clients]] — component comparison
|
||||
- [[Web Console|Web-Console]] — stable production alternative
|
||||
- [[Home]] — production vs alpha table
|
||||
- [[Desktop Clients|Desktop-Clients]]
|
||||
- [[Web Console|Web-Console]]
|
||||
- [[Client Generator|Client-Generator]]
|
||||
- [[Home]]
|
||||
|
||||
+19
-10
@@ -1,20 +1,29 @@
|
||||
# CDAP — Connected Device Automation Protocol
|
||||
|
||||
CDAP is BetterDesk's protocol for managing IoT devices, servers, and custom hardware through the web console.
|
||||
> **Audience:** integrators and developers. Most BetterDesk installs only need the Go server, web console, and stock RustDesk clients. Enable CDAP if you run IoT/SCADA devices, Support Agent / native agents, or custom bridges.
|
||||
|
||||
CDAP talks to devices over WebSocket (`:21122` by default): metrics, widgets, commands, terminal, files.
|
||||
|
||||
---
|
||||
|
||||
## Do I need this?
|
||||
|
||||
| You want… | Use CDAP? |
|
||||
|-----------|-----------|
|
||||
| Normal remote desktop with RustDesk | No |
|
||||
| Support Agent / Web Remote inbound support | Yes (Generator builds use CDAP) |
|
||||
| Custom sensors / IoT bridges | Yes |
|
||||
|
||||
Quick path: [[Client Generator|Client-Generator]] → Support Agent, or [SDK docs](https://github.com/UNITRONIX/BetterDesk/tree/dev/docs/sdk).
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
CDAP enables:
|
||||
- **Telemetry** — Real-time metrics (CPU, memory, disk, custom sensors)
|
||||
- **Widget rendering** — 8 widget types displayed in the web console
|
||||
- **Remote commands** — Execute actions on devices
|
||||
- **Terminal access** — Full PTY terminal emulation
|
||||
- **File management** — Browse, read, write, delete files
|
||||
- **Clipboard sync** — Bidirectional clipboard
|
||||
- **Screenshots** — On-demand screen capture
|
||||
- **Audio streaming** — Bidirectional audio via WebSocket
|
||||
CDAP covers:
|
||||
- Telemetry (CPU, memory, disk, custom sensors) to **your** server
|
||||
- Widget rendering in the console
|
||||
- Remote commands, PTY terminal, files, clipboard, screenshots, audio
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Chat E2E Encryption
|
||||
# Chat E2E encryption
|
||||
|
||||
BetterDesk Chat uses end-to-end encryption with ECDH key exchange and AES-256-GCM. No server can read the messages.
|
||||
Panel chat can encrypt messages so the BetterDesk server only relays ciphertext. Peers derive keys with ECDH; payloads use AES-256-GCM.
|
||||
|
||||
**For operators:** enable chat in the console / client features you already use; open firewall paths your deployment needs; verify both sides show encrypted chat working. You do not need the crypto details below to run production.
|
||||
|
||||
**For developers:** protocol notes follow.
|
||||
|
||||
---
|
||||
|
||||
## Protocol Overview
|
||||
## Protocol overview
|
||||
|
||||
```
|
||||
User A Server User B
|
||||
@@ -37,7 +41,7 @@ Keys rotate automatically when either condition is met:
|
||||
- **24 hours** since last rotation
|
||||
- **1000 messages** sent with current key
|
||||
|
||||
On rotation, a new key exchange is performed seamlessly.
|
||||
On rotation, a new key exchange runs.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ curl http://your-server:21114/api/server-config
|
||||
- **API Server**: `http://your-server.com:21121`
|
||||
- **Key**: paste the public key from the web console
|
||||
|
||||
> **Important:** The API Server must point to port **21121** (Node.js Client API), not 21114 (Go server API). The protocol prefix (`http://`) is required.
|
||||
> **Important:** Set **API Server** to port **21121** (RustDesk Client API on Go; some installs still proxy via Node). Do **not** use 21114 for the RustDesk client API field. Include the `http://` or `https://` prefix.
|
||||
|
||||
### Configuration File
|
||||
|
||||
|
||||
@@ -29,12 +29,13 @@ betterdesk-server [flags]
|
||||
-force-https Force HTTPS redirects (implies --tls-api)
|
||||
|
||||
-cdap Enable CDAP gateway (:21122)
|
||||
-metrics Enable Prometheus metrics endpoint
|
||||
-admin-port int TCP admin console port (disabled by default)
|
||||
-log-format string Log format: text or json (default "text")
|
||||
-log-level string Log level: debug, info, warn, error (default "info")
|
||||
```
|
||||
|
||||
Prometheus text is served at `GET /metrics` on the admin API port (gated by auth/allowlist). See [[Monitoring]].
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
@@ -59,6 +60,10 @@ betterdesk-server [flags]
|
||||
| `API_WS_ALLOWED_ORIGINS` | `*` | API WebSocket origin allowlist |
|
||||
| `CDAP_ENABLED` | `N` | Enable CDAP gateway |
|
||||
| `API_KEY` | (auto-generated) | API authentication key |
|
||||
| `MASK` | (empty → /24 fallback) | LAN CIDR for same-network detection |
|
||||
| `ALLOW_SHARED_NAT_INITIATOR` | `N` | Opt-in for multi-device CGNAT punch (see [[Monitoring]]) |
|
||||
| `ENROLLMENT_MODE` | `open` | `open` / `managed` / `locked` |
|
||||
| `PANEL_MDNS` | on | Set `off` to disable panel mDNS |
|
||||
|
||||
---
|
||||
|
||||
@@ -127,13 +132,13 @@ TRUSTED_PROXIES=127.0.0.1/32,::1/128
|
||||
> UDP/TCP signal on port **21116** cannot use HTTP headers like `X-Forwarded-For`. `TRUST_PROXY` / `TRUSTED_PROXIES` apply to HTTP/API and signal **WebSocket** (`/ws/id`).
|
||||
|
||||
> [!TIP]
|
||||
> External reverse proxy (TLS on Caddy/Nginx :443): see [External Reverse Proxy Guide](../setup/REVERSE_PROXY.md). Use `HOST=127.0.0.1`, `HTTPS_ENABLED=false`, and run `sudo betterdesk.sh` → **External reverse proxy** to generate Caddy/Nginx snippets.
|
||||
> External reverse proxy (TLS on Caddy/Nginx :443): see [External Reverse Proxy Guide](https://github.com/UNITRONIX/BetterDesk/blob/dev/docs/setup/REVERSE_PROXY.md). Use `HOST=127.0.0.1`, `HTTPS_ENABLED=false`, and run `sudo betterdesk.sh` → **External reverse proxy** to generate Caddy/Nginx snippets.
|
||||
|
||||
#### `GO_API_PORT` vs `API_PORT`
|
||||
|
||||
When both Go server and Node.js console share `.env`:
|
||||
- **`GO_API_PORT=21114`** — Go REST API (used by panel proxy)
|
||||
- **`API_PORT` / `CLIENT_API_PORT=21121`** — RustDesk Client API (Node.js)
|
||||
- **`GO_API_PORT=21114`** — Go admin REST API (panel proxy)
|
||||
- **`API_PORT` / `CLIENT_API_PORT=21121`** — RustDesk Client API (Go handlers; optional Node compat proxy on the same port)
|
||||
|
||||
The installer sets `GO_API_PORT=21114` on `betterdesk-server.service` to avoid HTTP/HTTPS toggle conflicts (#219).
|
||||
|
||||
@@ -155,7 +160,7 @@ Switch in **Settings → Updates → Update channel**. See [[Panel Updates|Panel
|
||||
| 21117 | TCP | Relay | Bidirectional stream relay |
|
||||
| 21118 | WS | WS Signal | WebSocket signal (21116 + 2) |
|
||||
| 21119 | WS | WS Relay | WebSocket relay (21117 + 2) |
|
||||
| 21121 | TCP (HTTP) | Client API | RustDesk Client API (Node.js) |
|
||||
| 21121 | TCP (HTTP) | Client API | RustDesk Client API (Go; optional Node proxy) |
|
||||
| 21122 | WS | CDAP | CDAP WebSocket gateway |
|
||||
| 5000 | TCP (HTTP) | Web Console | Admin/operator panel |
|
||||
|
||||
@@ -166,7 +171,7 @@ When TLS terminates at **Caddy/Nginx on :443**:
|
||||
- **HTTP-proxied:** panel (`:5000`), console WebSockets, optional RustDesk WSS paths `/ws/id` → `:21118` and `/ws/relay` → `:21119`
|
||||
- **Direct to host (not HTTP reverse proxy):** signal **21116** (TCP+UDP), relay **21117** (TCP), Client API **21121** unless you add a separate API vhost
|
||||
|
||||
See [External Reverse Proxy Guide](../setup/REVERSE_PROXY.md).
|
||||
See [External Reverse Proxy Guide](https://github.com/UNITRONIX/BetterDesk/blob/dev/docs/setup/REVERSE_PROXY.md).
|
||||
|
||||
### Firewall Configuration
|
||||
|
||||
@@ -207,7 +212,7 @@ After=network.target postgresql.service
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/rustdesk
|
||||
WorkingDirectory=/opt/betterdesk
|
||||
ExecStart=/opt/betterdesk/betterdesk-server -port 21116 -relay-port 21117 -key id_ed25519
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
@@ -11,7 +11,7 @@ BetterDesk provides two Tauri v2 desktop applications and a headless Go agent fo
|
||||
|-----------|--------|----------------|
|
||||
| **Go Server** | ✅ Stable | ✅ Recommended |
|
||||
| **Web Console (Node.js)** | ✅ Stable | ✅ Recommended |
|
||||
| **Support Agent (Go/Fyne)** | ✅ Active | ✅ Recommended end-user agent |
|
||||
| **Support Agent (Go/Wails)** | ✅ Active | ✅ Recommended end-user agent |
|
||||
| **MGMT Client (Tauri)** | ⚠️ Alpha | ❌ Do not use in production |
|
||||
| **Agent Client (Tauri)** | ⚠️ Alpha | ❌ Do not use in production (Support Agent is preferred) |
|
||||
| **Native Agent (Go)** | ✅ Stable | Engine used by Support Agent |
|
||||
@@ -22,7 +22,7 @@ BetterDesk provides two Tauri v2 desktop applications and a headless Go agent fo
|
||||
|
||||
**Purpose:** Lightweight inbound-only end-user agent for remote support. Operators connect via **Web Remote (CDAP)** in the console — the Support Agent never initiates connections to other peers.
|
||||
|
||||
**Technology:** Single Go binary (Fyne UI) embedding the `betterdesk-agent` CDAP engine.
|
||||
**Technology:** Single Go binary with **Wails** UI by default (Fyne UI optional via `BETTERDESK_SUPPORT_FYNEUI=1`), embedding the `betterdesk-agent` CDAP engine.
|
||||
|
||||
### Features
|
||||
|
||||
|
||||
@@ -1,233 +1,18 @@
|
||||
# Desktop Dashboard
|
||||
# Desktop Dashboard (retired)
|
||||
|
||||
The Desktop Widget Dashboard transforms the web console into an OS-style desktop environment with draggable, resizable widgets.
|
||||
The old OS-style **Desktop Mode** / widget dashboard is **not loaded** by the current console layout. Scripts and docs for `?desktop=1` are historical only.
|
||||
|
||||
---
|
||||
Use:
|
||||
|
||||
## Activation
|
||||
- **Classic** rail / flyout (default), or
|
||||
- Optional [[UX 3.5|UX-3.5]] shell (`bd_ui_shell` cookie / shell switch in the UI)
|
||||
|
||||
### Enable Desktop Mode
|
||||
|
||||
1. Open the web console
|
||||
2. Click the **Desktop Mode** button (or append `?desktop=1` to the URL)
|
||||
3. The dashboard switches to a full-screen desktop with widgets
|
||||
|
||||
### Disable Desktop Mode
|
||||
|
||||
- Click the sidebar **Exit** button
|
||||
- Or remove the `betterdesk_desktop_mode` cookie
|
||||
|
||||
---
|
||||
|
||||
## Widget Catalog
|
||||
|
||||
### System Widgets
|
||||
|
||||
| Widget | Description |
|
||||
|--------|-------------|
|
||||
| **Server Info** | Hostname, uptime, Go/Node versions, server address, public key |
|
||||
| **Device Status** | Online/offline/total counts with live WebSocket updates |
|
||||
| **CPU Monitor** | Real-time CPU usage gauge with cores breakdown |
|
||||
|
||||
### Monitoring Widgets
|
||||
|
||||
| Widget | Description |
|
||||
|--------|-------------|
|
||||
| **Process Monitor** | Top 15 processes by CPU/memory, color-coded thresholds |
|
||||
| **Disk Usage** | Segmented bar per partition, color-coded utilization |
|
||||
| **Log Viewer** | Stream recent log lines, severity color coding, source selector |
|
||||
| **Alert Feed** | Live security alerts from audit log with action colors |
|
||||
| **Database Stats** | Table row counts, DB file size, last backup detection |
|
||||
| **Docker Containers** | Container list with status icons, images, ports, uptime |
|
||||
|
||||
### Utility Widgets
|
||||
|
||||
| Widget | Description |
|
||||
|--------|-------------|
|
||||
| **Weather** | Temperature, humidity, wind from wttr.in API, configurable city |
|
||||
| **Calendar** | Full month view, event creation, localStorage persistence |
|
||||
| **World Clock** | Multiple time zones, second-precise display |
|
||||
| **Bookmarks** | Grid of URL shortcuts with hover effects |
|
||||
| **Speed Test** | Download speed measurement with SVG gauge, latency display |
|
||||
| **User Sessions** | Logged-in operators/admins with role badges |
|
||||
|
||||
### Advanced Widgets
|
||||
|
||||
| Widget | Description |
|
||||
|--------|-------------|
|
||||
| **Shell Command** | Execute whitelisted commands (admin only), configurable refresh |
|
||||
| **Device Map** | World map with geo-positioned device pins, online/offline colors |
|
||||
|
||||
---
|
||||
|
||||
## Widget Management
|
||||
|
||||
### Adding Widgets
|
||||
|
||||
1. Click **Add Widget** in the sidebar
|
||||
2. Select a widget type from the catalog
|
||||
3. The widget appears on the canvas at a default position
|
||||
|
||||
### Moving Widgets
|
||||
|
||||
- **Drag** the widget header to reposition
|
||||
- Widgets snap to a 20px grid
|
||||
- Edge-snap to other widgets and canvas borders (15px threshold)
|
||||
- Visual grid overlay available (toggle in sidebar)
|
||||
|
||||
### Resizing Widgets
|
||||
|
||||
- **Drag** the bottom-right corner handle
|
||||
- Minimum size enforced per widget type
|
||||
- Adjacent widgets do not overlap (collision avoidance)
|
||||
|
||||
### Removing Widgets
|
||||
|
||||
- Click the kebab menu (⋮) on the widget header
|
||||
- Select **Remove**
|
||||
- Or use **Reset Layout** in the sidebar
|
||||
|
||||
---
|
||||
|
||||
## Snap Layouts
|
||||
|
||||
Windows 11-style snap layouts for organized widget positioning.
|
||||
|
||||
### Snap Layout Picker
|
||||
|
||||
1. Click **Snap Layouts** in the sidebar
|
||||
2. Choose from 6 predefined layouts:
|
||||
- **2-Column** (50/50)
|
||||
- **2-Column** (60/40)
|
||||
- **3-Column** (33/33/33)
|
||||
- **2×2 Grid** (4 equal zones)
|
||||
- **1 + 2** (1 large left, 2 stacked right)
|
||||
- **1 + 3** (1 large left, 3 stacked right)
|
||||
3. Widgets distribute across zones round-robin
|
||||
|
||||
### Edge Snap
|
||||
|
||||
Drag a widget to screen edges for automatic positioning:
|
||||
|
||||
| Edge | Result |
|
||||
|------|--------|
|
||||
| Left | Left half |
|
||||
| Right | Right half |
|
||||
| Top | Maximize |
|
||||
| Corners | Quarter snap |
|
||||
|
||||
### Aero Shake
|
||||
|
||||
Rapidly shake a window (3+ direction changes in 500ms) to minimize all other widgets. Shake again to restore.
|
||||
|
||||
### Draggable Zone Borders
|
||||
|
||||
After applying a snap layout, drag the divider between zones to resize them. Adjacent zones adjust proportionally. Minimum zone size: 15%.
|
||||
|
||||
### Auto-Arrange
|
||||
|
||||
Click **Auto-Arrange** in the snap layout picker to automatically tile all widgets in a √n grid layout.
|
||||
|
||||
---
|
||||
|
||||
## Widget Groups
|
||||
|
||||
Combine multiple widgets into a tabbed container:
|
||||
|
||||
1. Select multiple widgets (Ctrl+click or selection box)
|
||||
2. Right-click → **Group**
|
||||
3. Widgets merge into a single container with tab bar
|
||||
4. Click tabs to switch between widgets
|
||||
|
||||
### Ungroup
|
||||
|
||||
Right-click a group → **Ungroup** to restore individual widgets.
|
||||
|
||||
---
|
||||
|
||||
## Themes
|
||||
|
||||
### Dark Theme (Default)
|
||||
- Dark backgrounds (`#0d1117`)
|
||||
- Glassmorphism widget cards (`backdrop-filter: blur(28px)`)
|
||||
- Blue accent colors
|
||||
|
||||
### Light Theme
|
||||
- White backgrounds with subtle shadows
|
||||
- Light glassmorphism
|
||||
- Dark text, blue accents
|
||||
|
||||
### Auto Theme
|
||||
- Follows system `prefers-color-scheme`
|
||||
- Updates automatically when OS theme changes
|
||||
|
||||
### Cycling Themes
|
||||
|
||||
Click the theme button in the sidebar, or use:
|
||||
```javascript
|
||||
DesktopMode.cycleTheme(); // dark → light → auto → dark
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Presets
|
||||
|
||||
### Built-in Presets
|
||||
|
||||
| Preset | Widgets Included |
|
||||
|--------|-----------------|
|
||||
| **Monitoring** | Server Info, CPU Monitor, Process Monitor, Disk Usage, Log Viewer |
|
||||
| **Helpdesk** | Device Status, Alert Feed, User Sessions, Chat |
|
||||
| **Minimal** | Server Info, Device Status |
|
||||
| **Developer** | Log Viewer, Docker Containers, Shell Command, Database Stats |
|
||||
|
||||
### Custom Presets
|
||||
|
||||
1. Arrange widgets as desired
|
||||
2. Click **Save Preset** in the sidebar
|
||||
3. Enter a preset name
|
||||
4. The preset saves widget positions, sizes, and types to localStorage
|
||||
|
||||
### Loading a Preset
|
||||
|
||||
1. Click **Presets** in the sidebar
|
||||
2. Select a preset
|
||||
3. Current layout is replaced with the preset layout
|
||||
|
||||
---
|
||||
|
||||
## Wallpaper
|
||||
|
||||
1. Click **Wallpaper** in the sidebar
|
||||
2. Choose from:
|
||||
- Built-in gradients
|
||||
- Solid colors (prefix with `solid:`)
|
||||
- Custom image URL
|
||||
3. Wallpaper persists in localStorage
|
||||
|
||||
---
|
||||
|
||||
## Persistence
|
||||
|
||||
Widget layout (positions, sizes, types) persists to:
|
||||
- **localStorage** for client-side persistence
|
||||
- Restored on page load
|
||||
- Separate per user (based on session)
|
||||
|
||||
Widget groups and presets also persist to localStorage.
|
||||
|
||||
---
|
||||
|
||||
## Responsive Behavior
|
||||
|
||||
On window resize, `autoReposition()` automatically:
|
||||
- Clamps widgets within canvas bounds
|
||||
- Shrinks oversized widgets
|
||||
- Debounced at 300ms to prevent jitter
|
||||
For day-to-day work: [[Web Console|Web-Console]].
|
||||
|
||||
---
|
||||
|
||||
## See also
|
||||
|
||||
- [[Web Console|Web-Console]] — dashboard overview
|
||||
- [[User Management|User-Management]] — desktop login and 2FA
|
||||
- [[Web Console|Web-Console]]
|
||||
- [[UX 3.5|UX-3.5]]
|
||||
- [[Home]]
|
||||
|
||||
+9
-5
@@ -1,6 +1,6 @@
|
||||
# Docker Deployment
|
||||
# Docker
|
||||
|
||||
BetterDesk offers multiple Docker deployment options.
|
||||
Run BetterDesk in containers. Quickest path uses pre-built GHCR images.
|
||||
|
||||
---
|
||||
|
||||
@@ -23,6 +23,10 @@ Default access:
|
||||
docker compose logs console | grep "Admin password"
|
||||
```
|
||||
|
||||
**Image tags:** prefer pinned versions or `:latest` for stable; `:dev` tracks the development channel. All-in-one **`:dev` images are amd64-only** today — on ARM use split compose, a local AIO build, or a multi-arch tip tag when published (`dev-arm`). Console/server images remain multi-arch.
|
||||
|
||||
Node console images target **Node.js 22** (avoid Node 24.19.x for the panel).
|
||||
|
||||
---
|
||||
|
||||
## Deployment Options
|
||||
@@ -81,7 +85,7 @@ ports:
|
||||
- "21117:21117" # Relay
|
||||
- "21118:21118" # WS Signal
|
||||
- "21119:21119" # WS Relay
|
||||
- "21121:21121" # Client API (Node.js)
|
||||
- "21121:21121" # Client API (Go; optional Node proxy)
|
||||
- "5000:5000" # Web Console
|
||||
```
|
||||
|
||||
@@ -107,9 +111,9 @@ Persist these paths:
|
||||
|------|-------------|
|
||||
| `id_ed25519` | Server private key |
|
||||
| `id_ed25519.pub` | Server public key |
|
||||
| `db_v2.sqlite3` | Go server database |
|
||||
| `db_v2.sqlite3` | Main SQLite DB (Go + consolidated auth on fresh installs) |
|
||||
| `.api_key` | API authentication key |
|
||||
| `auth.db` | Console user database |
|
||||
| `auth.db` | Legacy console auth DB — only if you still use legacy SQLite auth mode |
|
||||
|
||||
> ⚠️ Never delete `id_ed25519` — all connected clients use this key. Regenerating it requires reconfiguring every client.
|
||||
|
||||
|
||||
+18
-8
@@ -28,7 +28,7 @@ BetterDesk is an independent, open-source project that provides features beyond
|
||||
- CDAP IoT protocol
|
||||
- PostgreSQL support
|
||||
- Docker single-container deployment
|
||||
- Desktop widget dashboard
|
||||
- Optional UX 3.5 console shell
|
||||
|
||||
### Is it free?
|
||||
|
||||
@@ -168,7 +168,7 @@ The device must have a known MAC address. From the web console, click the kebab
|
||||
```bash
|
||||
curl -X POST http://server:21114/api/peers/DEVICE_ID/wol \
|
||||
-H "X-API-Key: your-key" \
|
||||
-d '{"mac_address": "AA:BB:CC:DD:EE:FF"}'
|
||||
-d '{"mac": "AA:BB:CC:DD:EE:FF"}'
|
||||
```
|
||||
|
||||
WOL sends a UDP magic packet on broadcast (255.255.255.255:9). Only works on the same LAN segment as the server.
|
||||
@@ -225,12 +225,11 @@ The relay proxies peer-to-peer traffic via `io.Copy`. Each active remote desktop
|
||||
|
||||
### Will updating break my setup?
|
||||
|
||||
No. The v2.4.0+ update process:
|
||||
- Preserves database files
|
||||
- Preserves PostgreSQL configuration
|
||||
- Preserves SSL certificates
|
||||
- Preserves API keys and admin credentials
|
||||
- Preserves auth.db (user accounts, TOTP)
|
||||
No. Current panel updates (Settings → Updates or `betterdesk.sh` option 2) keep your data in place:
|
||||
- Database files (`db_v2.sqlite3` on fresh installs; legacy `auth.db` only if you still use SQLite auth legacy mode)
|
||||
- PostgreSQL configuration
|
||||
- SSL certificates
|
||||
- API keys and admin credentials
|
||||
|
||||
### How do I update?
|
||||
|
||||
@@ -302,6 +301,14 @@ Organizations let you scope devices and users for multi-team or MSP deployments.
|
||||
|
||||
Yes. Configure **OIDC / OAuth2** under **Settings → Authentication**. See [[OIDC SSO|OIDC-SSO]].
|
||||
|
||||
### Does BetterDesk send my data to the maintainers?
|
||||
|
||||
No. It is self-hosted. Fleet metrics go to **your** server. Update checks hit GitHub only when you run them. See [[Privacy]].
|
||||
|
||||
### Where are Prometheus metrics?
|
||||
|
||||
`GET http://localhost:21114/metrics` (auth/allowlist). See [[Monitoring]].
|
||||
|
||||
### Why do RustDesk clients disconnect after ~24 hours?
|
||||
|
||||
Fixed in v3.3.129+: client sessions are DB-backed (7-day sliding, 30-day max). Update the server, then sign in once in the RustDesk client. Configure TTL under **Settings → Authentication → RustDesk clients**.
|
||||
@@ -311,5 +318,8 @@ Fixed in v3.3.129+: client sessions are DB-backed (7-day sliding, 30-day max). U
|
||||
## See also
|
||||
|
||||
- [[Troubleshooting]] — common fixes
|
||||
- [[Monitoring]] — metrics and health
|
||||
- [[Privacy]] — what leaves your network
|
||||
- [[Unattended Access and WoL|Unattended-and-WoL]]
|
||||
- [[Licensing]] — AGPL and Commercial Grant
|
||||
- [[Panel Updates|Panel-Updates]] — update channels (stable / dev)
|
||||
|
||||
@@ -63,6 +63,7 @@ Org-scoped and role-scoped users see only devices assigned to them. See [[Organi
|
||||
|
||||
## See also
|
||||
|
||||
- [[Unattended Access and WoL|Unattended-and-WoL]] — step-by-step unattended + WoL
|
||||
- [[Web Console|Web-Console]] — Devices page actions
|
||||
- [[Client Setup|Client-Setup]] — client-side login and AB sync
|
||||
- [Scoped remote user doc](https://github.com/UNITRONIX/BetterDesk/blob/main/docs/features/SCOPED_REMOTE_USER.md)
|
||||
- [Scoped remote user doc](https://github.com/UNITRONIX/BetterDesk/blob/dev/docs/features/SCOPED_REMOTE_USER.md)
|
||||
|
||||
+47
-67
@@ -4,25 +4,31 @@
|
||||
|
||||
# BetterDesk Wiki
|
||||
|
||||
**RustDesk-compatible remote desktop infrastructure — Go server, Node.js console, CDAP, and browser remote.**
|
||||
Self-hosted RustDesk-compatible server (Go) plus a Node.js web console.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
BetterDesk replaces `hbbs` + `hbbr` with a **single Go binary**, adds a full **web management console**, optional **CDAP** for IoT/SCADA devices, and a **browser-based remote desktop** client.
|
||||
One binary replaces `hbbs` + `hbbr`. The panel handles devices, users, updates, and browser remote. Optional CDAP covers IoT and custom agents.
|
||||
|
||||
> [!WARNING]
|
||||
> **MGMT Client** and **Agent Client** (Tauri desktop apps) are **alpha** — not for production. Use the **Web Console** and standard **RustDesk client** in production. See [[Alpha Software Notice]].
|
||||
> The Tauri **MGMT** and **Agent** desktop apps are alpha. For production use the **web console** and a normal **RustDesk** client. See [[Alpha Software Notice]].
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
## First 15 minutes
|
||||
|
||||
### Linux (bare metal)
|
||||
1. Install (Linux script, Windows script, or Docker — below).
|
||||
2. Open `http://your-server:5000` and sign in.
|
||||
3. Copy ID / Relay / Key / API from **Settings → Server Configuration**.
|
||||
4. Point a RustDesk client at those values ([[Client Setup|Client-Setup]]).
|
||||
5. Optional: TLS ([[TLS / SSL Certificates|TLS-SSL]]), then [[Panel Updates|Panel-Updates]].
|
||||
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
git clone https://github.com/UNITRONIX/BetterDesk.git
|
||||
@@ -30,89 +36,63 @@ cd BetterDesk
|
||||
sudo ./betterdesk.sh
|
||||
```
|
||||
|
||||
Choose **1** for a new installation, or run `sudo ./betterdesk.sh --auto` for non-interactive setup.
|
||||
Pick **1** for a new install, or `sudo ./betterdesk.sh --auto` for non-interactive setup.
|
||||
|
||||
### Docker (30 seconds)
|
||||
### Docker
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/UNITRONIX/BetterDesk/main/docker-compose.quick.yml -o docker-compose.yml
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Open **http://your-server:5000** for the web console. Default install paths: Go server `/opt/betterdesk`, console `/opt/BetterDeskConsole` (legacy `/opt/rustdesk` is still detected by the installer).
|
||||
Panel: **http://your-server:5000**. Default paths: Go `/opt/betterdesk`, console `/opt/BetterDeskConsole` (legacy `/opt/rustdesk` still detected).
|
||||
|
||||
Windows: see [[Installation]].
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
## Docs map
|
||||
|
||||
| Topic | Page |
|
||||
|-------|------|
|
||||
| **Installation** | [[Installation]] — Linux, Windows, Docker |
|
||||
| **Configuration** | [[Configuration]] — CLI flags, `.env`, systemd/NSSM |
|
||||
| **Client setup** | [[Client Setup\|Client-Setup]] — RustDesk desktop/mobile |
|
||||
| **Web console** | [[Web Console\|Web-Console]] — Dashboard, devices, settings (classic rail or optional [[UX 3.5\|UX-3.5]]) |
|
||||
| **Users & RBAC** | [[User Management\|User-Management]], [[Organizations and RBAC\|Organizations-and-RBAC]] |
|
||||
| **OIDC / SSO** | [[OIDC SSO\|OIDC-SSO]] |
|
||||
| **Client generator** | [[Client Generator\|Client-Generator]] |
|
||||
| **Fleet & policies** | [[Fleet and Policies\|Fleet-and-Policies]] |
|
||||
| **Panel updates** | [[Panel Updates\|Panel-Updates]] |
|
||||
| **Security** | [[Security]] — E2E, TLS, audit |
|
||||
| **API** | [[API Reference\|API-Reference]] |
|
||||
| **CDAP** | [[CDAP]] — IoT device protocol |
|
||||
| **SDK** | [[SDK]] — Python & Node.js CDAP SDK |
|
||||
| **Desktop clients** | [[Desktop Clients\|Desktop-Clients]] — MGMT, Agent, Native |
|
||||
| **Web remote** | [[Web Remote Desktop\|Web-Remote]] |
|
||||
| **MeshAgent** | [[MeshAgent]] — optional MeshCentral compat |
|
||||
| **Docker** | [[Docker Deployment\|Docker]] |
|
||||
| **TLS / SSL** | [[TLS / SSL Certificates\|TLS-SSL]] |
|
||||
| **Migration** | [[Migration Guide\|Migration]] |
|
||||
| **Licensing** | [[Licensing]] — AGPL-3.0 & Commercial Grant |
|
||||
| **Help** | [[Troubleshooting]], [[FAQ]] |
|
||||
| Need | Page |
|
||||
|------|------|
|
||||
| Install | [[Installation]], [[Docker]] |
|
||||
| Clients | [[Client Setup\|Client-Setup]] |
|
||||
| Panel | [[Web Console\|Web-Console]], [[Panel Updates\|Panel-Updates]] |
|
||||
| Config & TLS | [[Configuration]], [[TLS / SSL Certificates\|TLS-SSL]] |
|
||||
| Users / SSO | [[User Management\|User-Management]], [[OIDC SSO\|OIDC-SSO]], [[LDAP / Active Directory\|LDAP-AD]] |
|
||||
| Ops | [[Monitoring]], [[Unattended Access and WoL\|Unattended-and-WoL]], [[Migration]] |
|
||||
| Privacy | [[Privacy]] |
|
||||
| Help | [[Troubleshooting]], [[FAQ]] |
|
||||
| Developers | [[API Reference\|API-Reference]], [[CDAP]], [[SDK]] |
|
||||
|
||||
Deep-dive developer docs live in the repository: [docs/](https://github.com/UNITRONIX/BetterDesk/tree/main/docs).
|
||||
Deep dive in the repo: [docs/](https://github.com/UNITRONIX/BetterDesk/tree/dev/docs).
|
||||
|
||||
---
|
||||
|
||||
## Architecture Overview
|
||||
## Ports (short)
|
||||
|
||||
```
|
||||
RustDesk Desktop/Mobile Clients
|
||||
├── UDP/TCP (:21116) ──► Signal Server ──► Registration, PunchHole, Relay
|
||||
├── TCP (:21117) ──► Relay Server ──► Bidirectional relay pipe
|
||||
├── WS (:21118) ──► WS Signal ──► WebSocket signal
|
||||
├── WS (:21119) ──► WS Relay ──► WebSocket relay
|
||||
└── HTTP (:21121) ──► Client API ──► Login, AB sync, heartbeat
|
||||
|
||||
CDAP Agents / SDK Bridges
|
||||
└── WS/HTTP (:21122) ──► CDAP Gateway ──► Metrics, commands, widgets
|
||||
|
||||
Admin / Web Console
|
||||
├── HTTP (:21114) ──► REST API ──► JWT / API-key auth
|
||||
├── WS (:21114) ──► Event Stream ──► Real-time status push
|
||||
└── HTTP (:5000) ──► Web Console ──► Node.js + Express + EJS
|
||||
|
||||
Optional: MeshCentral compatibility (MeshAgent KVM, terminal, files)
|
||||
Clients → :21116 signal, :21117 relay, :21121 Client API (Go; optional Node proxy)
|
||||
Panel → :5000 console, :21114 admin REST (often localhost)
|
||||
Optional → :21122 CDAP, :21118/:21119 WebSocket signal/relay
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Production vs Alpha
|
||||
## What to run in production
|
||||
|
||||
| Component | Status | Production use |
|
||||
|-----------|--------|----------------|
|
||||
| Go Server | Stable | Recommended |
|
||||
| Web Console | Stable | Recommended |
|
||||
| Native CDAP Agent (Go) | Stable | OK for deployment |
|
||||
| RustDesk client (standard) | Stable | Recommended |
|
||||
| MGMT Client (Tauri) | Alpha | Do not use |
|
||||
| Agent Client (Tauri) | Alpha | Do not use |
|
||||
| Component | Status |
|
||||
|-----------|--------|
|
||||
| Go server + web console | Production |
|
||||
| Stock RustDesk client | Production |
|
||||
| Support Agent (Go/Wails, from Generator) | Production path for inbound support |
|
||||
| Native CDAP agent (Go) | OK when you need headless/IoT |
|
||||
| MGMT / Agent (Tauri) | Alpha — do not use |
|
||||
| Native BetterDesk Desktop (Flutter) | Early — not for production yet |
|
||||
|
||||
---
|
||||
|
||||
## Links
|
||||
|
||||
- **Repository:** [github.com/UNITRONIX/BetterDesk](https://github.com/UNITRONIX/BetterDesk)
|
||||
- **Issues:** [GitHub Issues](https://github.com/UNITRONIX/BetterDesk/issues)
|
||||
- **Discussions:** [GitHub Discussions](https://github.com/UNITRONIX/BetterDesk/discussions)
|
||||
- **Releases:** [GitHub Releases](https://github.com/UNITRONIX/BetterDesk/releases)
|
||||
- **License:** [AGPL-3.0](https://github.com/UNITRONIX/BetterDesk/blob/main/LICENSE) — see [[Licensing]] for the optional Commercial Grant
|
||||
- [Repository](https://github.com/UNITRONIX/BetterDesk) · [Issues](https://github.com/UNITRONIX/BetterDesk/issues) · [Discussions](https://github.com/UNITRONIX/BetterDesk/discussions) · [Releases](https://github.com/UNITRONIX/BetterDesk/releases)
|
||||
- [Sponsors](https://github.com/UNITRONIX/BetterDesk/blob/main/SPONSORS.md) · [[Licensing]] · [[Privacy]]
|
||||
|
||||
@@ -127,8 +127,8 @@ cd BetterDesk
|
||||
# Skip SHA256 verification
|
||||
.\betterdesk.ps1 -SkipVerify
|
||||
|
||||
# Custom API port
|
||||
$env:API_PORT = "21114"
|
||||
# Custom RustDesk Client API port (default 21121; Go admin API is GO_API_PORT=21114)
|
||||
$env:API_PORT = "21121"
|
||||
.\betterdesk.ps1 -Auto
|
||||
```
|
||||
|
||||
@@ -260,7 +260,7 @@ sudo ./betterdesk.sh
|
||||
```
|
||||
|
||||
The update process preserves:
|
||||
- Database files (auth.db, db_v2.sqlite3)
|
||||
- Database files (`db_v2.sqlite3`; legacy `auth.db` if still in use)
|
||||
- PostgreSQL configuration
|
||||
- SSL certificates
|
||||
- API keys
|
||||
@@ -288,9 +288,23 @@ This removes all services, binaries, and optionally data files.
|
||||
|
||||
---
|
||||
|
||||
## Check it worked
|
||||
|
||||
```bash
|
||||
# Linux services
|
||||
sudo systemctl status betterdesk-server betterdesk-console
|
||||
curl -s http://localhost:21114/api/health
|
||||
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:5000/
|
||||
```
|
||||
|
||||
Expect health JSON and HTTP 200 (or a login redirect) from the panel. Then [[Client Setup|Client-Setup]].
|
||||
|
||||
---
|
||||
|
||||
## See also
|
||||
|
||||
- [[Configuration]] — environment variables and service units
|
||||
- [[Panel Updates|Panel-Updates]] — in-app updates via Settings → Updates
|
||||
- [[Docker Deployment|Docker]] — container deployment
|
||||
- [[Migration Guide|Migration]] — SQLite ↔ PostgreSQL, RustDesk OSS migration
|
||||
- [[Privacy]] — what stays on your server
|
||||
|
||||
@@ -38,6 +38,7 @@ RustDesk clients remain separate software with their own licenses. BetterDesk se
|
||||
|
||||
## See also
|
||||
|
||||
- [[Privacy]] — self-hosted data, no vendor analytics
|
||||
- [[FAQ]] — licensing FAQ
|
||||
- [[Home]] — project overview
|
||||
- [Contributing](https://github.com/UNITRONIX/BetterDesk/blob/main/docs/development/CONTRIBUTING.md)
|
||||
- [Contributing](https://github.com/UNITRONIX/BetterDesk/blob/dev/docs/development/CONTRIBUTING.md)
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# Monitoring
|
||||
|
||||
How to watch your BetterDesk server: Prometheus metrics, health checks, and audit logs. Data stays on **your** host — see [[Privacy]].
|
||||
|
||||
---
|
||||
|
||||
## Health check
|
||||
|
||||
```bash
|
||||
curl -s http://localhost:21114/api/health
|
||||
curl -s http://localhost:21114/api/server/stats
|
||||
```
|
||||
|
||||
Expect JSON OK / peer counts. `stats` uses the same access rules as `/metrics` (auth or allowlist).
|
||||
|
||||
---
|
||||
|
||||
## Prometheus metrics
|
||||
|
||||
Go serves Prometheus text on the **admin API** port:
|
||||
|
||||
```text
|
||||
http://localhost:21114/metrics
|
||||
```
|
||||
|
||||
Access is gated (API key / auth, or IP allowlist / public flag via `METRICS_*` env — see server config). Do not expose `/metrics` to the open internet without an allowlist.
|
||||
|
||||
Point Prometheus at that URL; Grafana uses a normal Prometheus datasource.
|
||||
|
||||
---
|
||||
|
||||
## Audit log
|
||||
|
||||
Auth and device actions land in your audit store. Review in the panel (**Audit**) or:
|
||||
|
||||
```bash
|
||||
curl http://localhost:21114/api/audit \
|
||||
-H "X-API-Key: your-api-key"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Panel device metrics
|
||||
|
||||
CPU/RAM/disk in the console come from clients reporting to **your** API. That is fleet ops, not vendor analytics. Quiet it down with enrollment sync modes — [[Privacy]].
|
||||
|
||||
---
|
||||
|
||||
## Shared NAT / CGNAT
|
||||
|
||||
Many peers behind one public IP: see Settings for `ALLOW_SHARED_NAT_INITIATOR` (default off) and set `MASK` / `-mask` to your real LAN CIDR (empty keeps historic `/24`). Details in 3.5.x release notes and [[Troubleshooting]].
|
||||
|
||||
---
|
||||
|
||||
## See also
|
||||
|
||||
- [[Configuration]]
|
||||
- [[Troubleshooting]]
|
||||
- [[Privacy]]
|
||||
- [[Security]]
|
||||
@@ -0,0 +1,72 @@
|
||||
# Privacy
|
||||
|
||||
BetterDesk is **self-hosted**. You run the server and console on machines you control. The project maintainers do not run a cloud that receives your users, sessions, or device lists.
|
||||
|
||||
This page describes what the open-source code does today. Forks and third-party images may differ.
|
||||
|
||||
---
|
||||
|
||||
## Your data stays on your server
|
||||
|
||||
Accounts, devices, address books, audit logs, session history, and fleet metrics live in **your** database and files (for example under `/opt/betterdesk` and `/opt/BetterDeskConsole`).
|
||||
|
||||
We do not operate product analytics, crash telemetry, or usage tracking for UNITRONIX. There is no Sentry, Google Analytics, Mixpanel, or similar SDK in this project.
|
||||
|
||||
---
|
||||
|
||||
## What “telemetry” means in the panel
|
||||
|
||||
Managed devices can report CPU, memory, disk, and inventory to **your** BetterDesk API (for example `/api/bd/telemetry` and CDAP heartbeats). That is for **your** operators — not for the vendor.
|
||||
|
||||
Sync frequency is configurable (`silent` / `standard` / `turbo` on enrollment bundles).
|
||||
|
||||
---
|
||||
|
||||
## What can leave your network
|
||||
|
||||
These calls are functional, not maintainer analytics:
|
||||
|
||||
| Action | Destination | Notes |
|
||||
|--------|-------------|--------|
|
||||
| **Check / apply updates** | GitHub API and raw content | Only when an admin uses Updates (or the install script update path). User-Agent like `BetterDesk-Console/{version}`. No machine install ID. |
|
||||
| **Public IP detection** | checkip.amazonaws.com, api.ipify.org, ifconfig.me | At install/startup so relay ads can use a public address. Result stays on your server. |
|
||||
| **Clock sync** | NTP (default pool.ntp.org / similar) | Configurable via `NTP_SERVERS`. |
|
||||
| **Optional UI assets** | Google Fonts (branding / some pages), jsDelivr (xterm) | Main console Material Icons are self-hosted. You can avoid extra font downloads by not using branding font fetch and by firewall policy. |
|
||||
| **Docker images** | ghcr.io | Normal image pull. |
|
||||
| **OIDC** | Your identity provider | Only if you enable SSO. |
|
||||
|
||||
Help links (GitHub, Discord, Buy Me a Coffee) are ordinary links — nothing is sent until someone clicks.
|
||||
|
||||
---
|
||||
|
||||
## LAN discovery
|
||||
|
||||
The panel can advertise itself on the local network (UDP discovery and optional mDNS `_betterdesk._tcp`) with hostname, version, and panel URL. That stays on your LAN.
|
||||
|
||||
Disable mDNS with:
|
||||
|
||||
```env
|
||||
PANEL_MDNS=off
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Desktop clients and agents
|
||||
|
||||
Stock RustDesk clients and Support Agents talk to **your** BetterDesk host. They do not phone home to UNITRONIX for analytics.
|
||||
|
||||
---
|
||||
|
||||
## Honesty
|
||||
|
||||
If you find phone-home behaviour we missed, please report it via [SECURITY](https://github.com/UNITRONIX/BetterDesk/blob/dev/SECURITY.md) or a private security advisory — not a public issue with exploit detail.
|
||||
|
||||
Full copy in the repo: [PRIVACY.md](https://github.com/UNITRONIX/BetterDesk/blob/dev/PRIVACY.md).
|
||||
|
||||
---
|
||||
|
||||
## See also
|
||||
|
||||
- [[Security]]
|
||||
- [[Licensing]]
|
||||
- [[Monitoring]]
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
# SDK
|
||||
|
||||
BetterDesk provides **Python** and **Node.js** SDKs for building **CDAP agents and bridges** that connect to the Go server CDAP gateway (port **21122**).
|
||||
> **Audience:** developers building CDAP agents/bridges. Not required for a normal RustDesk + panel install.
|
||||
|
||||
Python and Node.js helpers for the CDAP gateway (**`:21122`**). Repo detail: [docs/sdk/](https://github.com/UNITRONIX/BetterDesk/tree/dev/docs/sdk).
|
||||
|
||||
---
|
||||
|
||||
|
||||
+32
-23
@@ -1,41 +1,50 @@
|
||||
# Security
|
||||
|
||||
BetterDesk implements defense-in-depth security across all layers. Software is distributed under **AGPL-3.0** — see [[Licensing]]. Panel operators can enable **OIDC/SSO** — see [[OIDC SSO|OIDC-SSO]].
|
||||
Practical hardening for a self-hosted BetterDesk install. License: [[Licensing]]. Privacy / no vendor analytics: [[Privacy]]. SSO: [[OIDC SSO|OIDC-SSO]].
|
||||
|
||||
---
|
||||
|
||||
## Production minimum checklist
|
||||
|
||||
1. Keep the panel on localhost or behind TLS reverse proxy (`HOST=127.0.0.1`, see [REVERSE_PROXY](https://github.com/UNITRONIX/BetterDesk/blob/dev/docs/setup/REVERSE_PROXY.md)).
|
||||
2. Strong admin password + TOTP for operators who need it.
|
||||
3. Prefer enrollment **`managed`** or **`locked`** over default **`open`** once you are past lab testing (Settings / Go env `ENROLLMENT_MODE`).
|
||||
4. Do not expose `:21114` admin API to the WAN; clients use **`:21121`**.
|
||||
5. Turn on TLS for signal/relay/API when clients are off your LAN — [[TLS / SSL Certificates|TLS-SSL]].
|
||||
6. Gate `/metrics` (auth or IP allowlist) — [[Monitoring]].
|
||||
7. Disable LAN mDNS if you do not need it (`PANEL_MDNS=off`) — [[Privacy]].
|
||||
|
||||
### Enrollment modes
|
||||
|
||||
| Mode | Behaviour |
|
||||
|------|-----------|
|
||||
| `open` | **Default.** Accept new device registrations (lab-friendly). |
|
||||
| `managed` | New devices need approval or a valid token. |
|
||||
| `locked` | Only devices with valid tokens register. |
|
||||
|
||||
---
|
||||
|
||||
## Encryption
|
||||
|
||||
### Signal Protocol (NaCl)
|
||||
### Signal (NaCl)
|
||||
|
||||
Client-server communication on the signal port (21116 TCP) uses NaCl (Networking and Cryptography Library):
|
||||
Client–server signal (:21116) uses NaCl:
|
||||
|
||||
1. Server generates Ed25519 key pair on first start (`id_ed25519`, `id_ed25519.pub`)
|
||||
2. Client connects and performs Diffie-Hellman key exchange
|
||||
3. All subsequent messages are encrypted with the shared session key
|
||||
4. Peers identify each other via public key verification
|
||||
1. Server Ed25519 key pair (`id_ed25519` / `.pub`)
|
||||
2. DH session key
|
||||
3. Encrypted messages after handshake
|
||||
|
||||
### Relay Encryption
|
||||
### Relay
|
||||
|
||||
Relay connections (port 21117) carry encrypted peer-to-peer traffic:
|
||||
- Peers establish E2E encryption through the signal channel
|
||||
- Relay server performs blind `io.Copy` — it cannot decrypt traffic
|
||||
- UUID pairing ensures both peers connect to the same relay session
|
||||
Relay (:21117) forwards opaque peer traffic. Peers set up E2E through signal; the relay does not hold your session keys.
|
||||
|
||||
### TLS Transport
|
||||
Stock RustDesk clients show a **green lock** when E2E is up (P2P or relay). That is client–client crypto on your infrastructure — not a cloud “trust us” feature.
|
||||
|
||||
Optional TLS wrapping for all TCP connections:
|
||||
- **Signal TLS** (`--tls-signal`) — Encrypts signal port 21116
|
||||
- **Relay TLS** (`--tls-relay`) — Encrypts relay port 21117
|
||||
- **API TLS** (`--tls-api`) — HTTPS on API port 21114
|
||||
- **WSS** — WebSocket Secure on ports 21118, 21119
|
||||
- **Dual-mode listener** — Auto-detects TLS (first byte `0x16`) vs plain TCP on same port
|
||||
### TLS transport
|
||||
|
||||
See [[TLS / SSL Certificates|TLS-SSL]] for certificate configuration.
|
||||
Optional TLS on signal / relay / API — see [[TLS / SSL Certificates|TLS-SSL]]. Dual-mode listeners accept TLS or plain on the same port when configured.
|
||||
|
||||
### Chat E2E Encryption
|
||||
|
||||
See [[Chat E2E Encryption|Chat-E2E]] for the chat-specific encryption protocol.
|
||||
Chat crypto details: [[Chat E2E Encryption|Chat-E2E]] (operator summary up front; protocol appendix for developers).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ This has been fixed. Signal handlers now check `IsPeerSoftDeleted()` — deleted
|
||||
|
||||
| Cause | Solution |
|
||||
|-------|----------|
|
||||
| Empty UUID in relay | Update Go server (fixed in Phase 19/23) |
|
||||
| Empty UUID in relay | Update Go server to current 3.5.x |
|
||||
| Private IP detected | Set `RELAY_SERVERS=YOUR.PUBLIC.IP` |
|
||||
| Relay port blocked | Open 21117 TCP |
|
||||
| Public IP detection failed | Check `curl -4 ifconfig.me` from server |
|
||||
@@ -94,13 +94,13 @@ sudo systemctl restart betterdesk-console
|
||||
|
||||
**Cause:** Route conflict — RustDesk client API route `/api/users` (Bearer token) intercepting panel requests (session cookie).
|
||||
|
||||
**Solution:** Update to the latest Node.js console (fixed in Phase 10).
|
||||
**Solution:** Update to the current panel (3.5.x).
|
||||
|
||||
### Password Change Shows "Password is Required"
|
||||
|
||||
**Cause:** Field name mismatch — frontend sends `current_password` (snake_case), backend expects `currentPassword` (camelCase).
|
||||
|
||||
**Solution:** Update to the latest Node.js console (fixed in Phase 18).
|
||||
**Solution:** Update to the current panel (3.5.x).
|
||||
|
||||
### Login Page Redirects in Loop
|
||||
|
||||
@@ -123,7 +123,7 @@ sudo systemctl restart betterdesk-console
|
||||
|
||||
**Cause:** Older scripts overwrote `.env` with SQLite defaults during UPDATE.
|
||||
|
||||
**Solution:** Update to v2.4.0+ scripts. They now preserve database configuration via `preserve_database_config()`.
|
||||
**Solution:** Update install scripts to current 3.5.x. They preserve database configuration via `preserve_database_config()`.
|
||||
|
||||
### Auth Database Destroyed After Update
|
||||
|
||||
|
||||
+20
-101
@@ -1,113 +1,32 @@
|
||||
# UX 3.5 — Console shell (optional Beta)
|
||||
# UX 3.5 (optional beta shell)
|
||||
|
||||
UX 3.5 is an **optional Beta** management console chrome in BetterDesk `web-nodejs`. The **default** shell is the classic TeamViewer-style **icon rail + flyout**. Operators can opt in to UX 3.5 (full-list sidebar + topbar) from the navbar; the choice is stored in cookie `bd_ui_shell`. Classic remains the supported production default until UX 3.5 leaves Beta.
|
||||
UX 3.5 is an **optional** console chrome. The default remains the classic icon rail + flyout.
|
||||
|
||||
## Switching shells
|
||||
## Switch
|
||||
|
||||
| Action | How |
|
||||
|--------|-----|
|
||||
| Classic → UX 3.5 (Beta) | Navbar button (view_sidebar icon + **BETA** badge) or `?ui=ux35` |
|
||||
| UX 3.5 → Classic | Topbar button (dashboard_customize icon) or `?ui=classic` |
|
||||
| Persist | Cookie `bd_ui_shell=classic\|ux35` (1 year, SameSite=Lax) |
|
||||
| Want | Do |
|
||||
|------|-----|
|
||||
| Try UX 3.5 | Navbar shell button, or `?ui=ux35` |
|
||||
| Back to classic | Topbar switch, or `?ui=classic` |
|
||||
| Remember choice | Cookie `bd_ui_shell=classic` or `ux35` (1 year) |
|
||||
|
||||
Default when no cookie: **classic**. While UX 3.5 is active, a small **BETA** chip appears in the topbar next to the brand.
|
||||
While UX 3.5 is on, a small **BETA** chip shows in the topbar. Surfaces are **solid** (not glass/blur). Classic may still use glass accents.
|
||||
|
||||
Client helper: `web-nodejs/public/js/ui-shell.js`. SSR selects partials in `main.ejs` via `res.locals.uiShell` (middleware in `server.js`).
|
||||
## What changes for you
|
||||
|
||||
## Architecture
|
||||
- Full-height sidebar list + topbar instead of icon rail
|
||||
- Same pages and permissions underneath
|
||||
- Help panel still opens from **Help** (supporters + links)
|
||||
|
||||
| Piece | Path |
|
||||
|-------|------|
|
||||
| Layout (both shells) | `web-nodejs/views/layouts/main.ejs` |
|
||||
| Classic rail / flyout | `web-nodejs/views/partials/sidebar.ejs` + `navbar.ejs` |
|
||||
| UX 3.5 topbar | `web-nodejs/views/partials/ux35-topbar.ejs` |
|
||||
| UX 3.5 sidebar | `web-nodejs/views/partials/ux35-sidebar.ejs` |
|
||||
| Tokens | `web-nodejs/public/css/ux35-tokens.css` |
|
||||
| Shell CSS | `web-nodejs/public/css/ux35.css` |
|
||||
| Shell JS (drawer, resize, theme icon) | `web-nodejs/public/js/ux35-shell.js` |
|
||||
| Shell switcher | `web-nodejs/public/js/ui-shell.js` |
|
||||
| Help panel (supporters + links) | `web-nodejs/views/partials/help-panel.ejs`, `public/css/help-panel.css`, `public/js/help-panel.js` |
|
||||
| Supporters data | `web-nodejs/config/supporters.json` (mirrors `SPONSORS.md`) |
|
||||
If something looks wrong on a phone, update the panel — several 3.5.x fixes targeted mobile topbar/tabs.
|
||||
|
||||
Navigation uses ordinary `<a href>` links (full page load). There is **no** iframe shell.
|
||||
## Developers
|
||||
|
||||
Out of scope for UX 3.5 (unchanged): login page, RdClient, remote viewer, CDAP Studio.
|
||||
Layout and CSS live under `web-nodejs/views/partials/ux35-*.ejs`, `public/css/ux35*.css`, `public/js/ui-shell.js`. Acceptance checklists belong in PRs, not in this operator page.
|
||||
|
||||
## Chrome (UX 3.5)
|
||||
---
|
||||
|
||||
- **Topbar:** 48px — brand, breadcrumb (desktop), shell switch, refresh, notifications, theme, accessibility, language, user menu
|
||||
- **Sidebar:** default **220px** (resizable 200–320px, stored in `localStorage` key `bd_ux35_sidebar_width`)
|
||||
- **Help:** sidebar **Help** opens a right-side panel (supporters list + GitHub / sponsorship links). On ≥1100px the panel docks beside main content; on narrower viewports it is a slide-over with overlay. Classic shell and Desktop Mode use the same panel as a slide-over. Guided tours / spotlight tutorials are retired.
|
||||
- **Content:** padding via `--ux35-content-padding` / `--ux35-content-padding-lg` (16–24px)
|
||||
## See also
|
||||
|
||||
**Solid surfaces (no glass/blur):** UX 3.5 chrome and in-content cards/forms use opaque `bg-*` tokens. `backdrop-filter` is disabled under `.ux35-page`. Classic rail/flyout may still use branding glass. Chrome typography uses `--ux35-font-chrome` (system stack) so Settings branding preview cannot restyle the sidebar.
|
||||
|
||||
Sidebar resize: pointer capture + `requestAnimationFrame`; width persisted on pointer-up (`Escape` cancels).
|
||||
|
||||
Theme toggle (topbar): applies a full solid token set immediately, then reconciles `branding.css` on load (clears temporary inline overrides). No need to click elsewhere for the UI to catch up.
|
||||
|
||||
## Spacing scale
|
||||
|
||||
Use only: **4 / 8 / 12 / 16 / 24 / 32** px (`--ux35-space-1` … `--ux35-space-6`, or `--space-xs` / `sm` / `3` / `md` / `lg` / `xl`).
|
||||
|
||||
Avoid ad-hoc page paddings that diverge from this scale.
|
||||
|
||||
## Themes
|
||||
|
||||
Branding `themeMode` (Settings → Branding → Colors):
|
||||
|
||||
| Mode | Meaning |
|
||||
|------|---------|
|
||||
| `dark` | Built-in dark palette (always used for CSS, even if DB still has old custom hex values) |
|
||||
| `light` | Built-in light palette for body/sidebar; topbar stays dark chrome (theme-invariant) |
|
||||
| `custom` | Operator-edited colors from branding form |
|
||||
|
||||
The UX 3.5 topbar does **not** follow light/dark — it always uses fixed dark chrome (`#161b22` background, light ink). Shell surfaces and content still switch with `themeMode`.
|
||||
|
||||
`/css/branding.css` is generated by `resolveThemeColors()` + `generateThemeCss()`. The UX 3.5 theme button persists `themeMode` **and** the matching built-in palette so a reload does not snap back to dark text on a “light” shell.
|
||||
|
||||
Glass branding (`glassBlur` / frosted panels) applies to the **classic** shell and the Branding mockup. UX 3.5 ignores glass for chrome and content surfaces.
|
||||
|
||||
## Stacking / branding wallpaper
|
||||
|
||||
Console wallpaper is `body.app-page::before { position: fixed; z-index: 0 }`. The shell **must** sit above it:
|
||||
|
||||
```css
|
||||
.ux35-shell { position: relative; z-index: 1; }
|
||||
.app-layout { /* classic — already stacked above wallpaper */ }
|
||||
```
|
||||
|
||||
`generateBackgroundCss()` lists `.ux35-shell` next to legacy `.app-layout`. Without this, Settings and other pages in UX 3.5 look like an empty black panel (sidebar/topbar still showed via their own z-index).
|
||||
|
||||
## Breakpoints
|
||||
|
||||
| Width | Behavior |
|
||||
|-------|----------|
|
||||
| ≥1100px | Persistent sidebar + resize handle |
|
||||
| ≤1099px | Hamburger opens sidebar drawer + overlay |
|
||||
| ≤767px | Narrower drawer; content padding reduced; bottom nav retained |
|
||||
|
||||
## Migration from Beta 3.1
|
||||
|
||||
Beta 3.1 (`beta31.js` / `beta31.css`) was an optional overlay that loaded pages in `?embed=1` iframes. UX 3.5 reuses the **visual pattern** (full-list sidebar + topbar) as a **native optional shell**. Classic rail/flyout remains the default.
|
||||
|
||||
## i18n
|
||||
|
||||
Keys under `ux35.*` (including `switch_to_ux35` / `switch_to_classic`), `help.panel.*`, and `theme.custom` exist in all 26 `web-nodejs/lang/*.json` locales. Helpers: `web-nodejs/scripts/patch-ux35-i18n.js`, `patch-ux35-shell-switch-i18n.js`, `patch-help-panel-i18n.js`.
|
||||
|
||||
## Acceptance checklist
|
||||
|
||||
- [ ] Default load: classic rail + flyout
|
||||
- [ ] Navbar switch → UX 3.5; cookie persists across reloads
|
||||
- [ ] UX 3.5 topbar switch → classic
|
||||
- [ ] Desktop 1280 UX 3.5: sidebar + topbar + dashboard (solid, no frosted glass)
|
||||
- [ ] Desktop: sidebar drag-resize feels smooth; width persists after reload; Escape cancels mid-drag
|
||||
- [ ] Topbar theme dark↔light updates shell immediately (no extra click)
|
||||
- [ ] Settings → Updates: sidebar fonts unchanged
|
||||
- [ ] Settings → Branding: live preview only while Branding tab is active; does not restyle sidebar
|
||||
- [ ] Help (UX 3.5 ≥1100): docks right; shows supporters + GitHub links; Escape / Close dismisses
|
||||
- [ ] Help (narrow / classic): slide-over + overlay; no tutorial spotlight / FAB
|
||||
- [ ] Tablet 1024 / 768: drawer opens/closes; Escape closes drawer; overlay fades
|
||||
- [ ] Phone 390: drawer + bottom nav
|
||||
- [ ] Classic shell: branding glass still works when enabled
|
||||
- [ ] Permission-gated nav items match former sidebar
|
||||
- [[Web Console|Web-Console]]
|
||||
- [[Home]]
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# Unattended access and Wake-on-LAN
|
||||
|
||||
Hands-off remote access needs the **right password on the peer**, not only a panel checkbox. Wake-on-LAN is separate and only works on the same LAN as the server.
|
||||
|
||||
---
|
||||
|
||||
## Unattended access (checklist)
|
||||
|
||||
1. **On the device** — set a permanent password in RustDesk (Security / `--password`), or use Support Agent unattended mode from the [[Client Generator|Client-Generator]].
|
||||
2. **In the panel (optional)** — record schedule / notes under **Policies**. Policy rows are **inventory** today: they are **not** enforced on punch/relay connect.
|
||||
3. **Org password vault (optional, #367)** — Organizations → Address Book → contact → **Set password**. Stored encrypted in your DB; authorized AB responses can include a runtime password for stock clients. Set the **same** permanent password on the workstation. Prefer `ORG_PEER_VAULT_KEY` (else JWT secret fallback).
|
||||
|
||||
Operators still complete the normal peer password handshake. Panel login and org membership control **who sees** the device, not passwordless connect.
|
||||
|
||||
---
|
||||
|
||||
## Wake-on-LAN
|
||||
|
||||
1. Device must have a known MAC (inventory / peer record).
|
||||
2. In the panel: device menu → **Wake on LAN**, or use the API:
|
||||
|
||||
```bash
|
||||
curl -X POST http://your-server:21114/api/peers/DEVICE_ID/wol \
|
||||
-H "X-API-Key: your-api-key" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"mac": "AA:BB:CC:DD:EE:FF"}'
|
||||
```
|
||||
|
||||
The JSON field is **`mac`**.
|
||||
|
||||
**Limits:** the BetterDesk host must be on a network that can broadcast the magic packet to that NIC (typically same LAN). WoL across the internet needs your own gateway/VPN setup — BetterDesk does not tunnel WoL for you.
|
||||
|
||||
---
|
||||
|
||||
## Enrollment modes (related)
|
||||
|
||||
New device registration can be `open` (default), `managed` (approve or token), or `locked` (token only). Configure on the Go server / Settings. Viewer-only mobile clients may queue under managed enrollment.
|
||||
|
||||
---
|
||||
|
||||
## See also
|
||||
|
||||
- [[Fleet and Policies|Fleet-and-Policies]]
|
||||
- [[Client Setup|Client-Setup]]
|
||||
- [[API Reference|API-Reference]]
|
||||
- [[Web Console|Web-Console]]
|
||||
@@ -2,20 +2,15 @@
|
||||
|
||||
The BetterDesk Web Console is a Node.js (Express.js) management panel accessible at **http://your-server:5000**.
|
||||
|
||||
The default chrome is the **classic** icon rail + flyout sidebar. Operators can switch to optional **UX 3.5** (full-list sidebar + topbar, glass branding) from the navbar; the choice is remembered in a cookie. See [[UX 3.5|UX-3.5]] for tokens, breakpoints, theming, and how to switch.
|
||||
The default chrome is the **classic** icon rail + flyout sidebar. You can switch to optional **UX 3.5** (full-list sidebar + solid topbar — not glass) from the navbar; the choice is stored in a cookie. See [[UX 3.5|UX-3.5]].
|
||||
|
||||
---
|
||||
|
||||
## Dashboard
|
||||
|
||||
The dashboard provides an overview of your BetterDesk deployment:
|
||||
Overview cards: device counts, online status, server uptime, versions.
|
||||
|
||||
- **Total Devices** — Count of all registered devices
|
||||
- **Online Devices** — Currently connected, with real-time WebSocket updates
|
||||
- **Server Uptime** — Go server uptime
|
||||
- **System Info** — Hostname, OS, Node.js/Go versions
|
||||
|
||||
> **Note:** OS-style Desktop Mode is not loaded by the console layout. Use classic rail/flyout (default) or optional [[UX 3.5|UX-3.5]]. Historical widget docs may remain under [[Desktop Dashboard|Desktop-Dashboard]].
|
||||
OS-style **Desktop Mode** is not loaded anymore. Use classic or [[UX 3.5|UX-3.5]]. Old notes: [[Desktop Dashboard|Desktop-Dashboard]].
|
||||
|
||||
---
|
||||
|
||||
@@ -132,15 +127,9 @@ Manage console users and roles. See [[User Management|User-Management]] and [[Or
|
||||
|
||||
---
|
||||
|
||||
## OS-Style Login Screen
|
||||
## Login screen
|
||||
|
||||
When desktop mode is active, the login page transforms into a Windows 11-style experience:
|
||||
|
||||
- Wallpaper background with frosted glass card
|
||||
- Clock and date overlay (click to dismiss)
|
||||
- Multi-user selector (bottom-left avatars)
|
||||
- TOTP 2FA with individual digit input boxes
|
||||
- Session expiry detection with auto-redirect
|
||||
Classic and UX 3.5 use the standard panel login (username / password / optional TOTP). The old Windows 11-style desktop login is retired with Desktop Mode.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+10
-14
@@ -1,26 +1,22 @@
|
||||
# Web Remote Desktop
|
||||
|
||||
BetterDesk includes a browser-based remote desktop client accessible from the web console.
|
||||
Browser remote from the web console — no separate desktop app required. Prefer **HTTPS** so WebCodecs (VP9/AV1) work; plain HTTP falls back to H.264 with lower performance.
|
||||
|
||||
**For operators:** open a device → Connect (or Support Agent Web Remote) → enter password → use quality presets / recording as needed. If the target is in WebSocket mode, use a current 3.5.x relay (TCP↔WS bridge).
|
||||
|
||||
**For developers:** codec / input notes further down.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The web remote client connects to RustDesk peers directly from the browser, with no client installation needed. It supports:
|
||||
## Features
|
||||
|
||||
| Feature | HTTPS | HTTP |
|
||||
|---------|-------|------|
|
||||
| Video codec | VP9, H.264, AV1, VP8 (WebCodecs) | H.264 only (JMuxer fallback) |
|
||||
| Max FPS | 60 fps | 30 fps |
|
||||
| Audio | ✅ Opus | ✅ Opus |
|
||||
| Keyboard | ✅ Full (incl. modifiers, F-keys) | ✅ Full |
|
||||
| Mouse | ✅ Click, right-click, scroll, drag | ✅ Click, right-click, scroll, drag |
|
||||
| Clipboard | ✅ Bidirectional | ✅ Bidirectional |
|
||||
| Session recording | ✅ WebM VP9+Opus | ✅ WebM VP9+Opus |
|
||||
| Monitor switching | ✅ | ✅ |
|
||||
| Quality presets | ✅ 4 presets | ✅ 4 presets |
|
||||
|
||||
> **Note:** HTTPS is strongly recommended. WebCodecs API (VP9/AV1) is only available on secure origins. HTTP falls back to JMuxer (H.264 only) with lower performance.
|
||||
| Max FPS | 60 | 30 |
|
||||
| Audio / keyboard / mouse / clipboard | Yes | Yes |
|
||||
| Session recording | WebM VP9+Opus | WebM VP9+Opus |
|
||||
| Monitor switching / quality presets | Yes | Yes |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
[Repository](https://github.com/UNITRONIX/BetterDesk) · [Issues](https://github.com/UNITRONIX/BetterDesk/issues) · [Discussions](https://github.com/UNITRONIX/BetterDesk/discussions) · [Releases](https://github.com/UNITRONIX/BetterDesk/releases) · [Sponsors](https://github.com/UNITRONIX/BetterDesk/blob/main/SPONSORS.md)
|
||||
[Repository](https://github.com/UNITRONIX/BetterDesk) · [Issues](https://github.com/UNITRONIX/BetterDesk/issues) · [Discussions](https://github.com/UNITRONIX/BetterDesk/discussions) · [Releases](https://github.com/UNITRONIX/BetterDesk/releases) · [Privacy](https://github.com/UNITRONIX/BetterDesk/blob/dev/PRIVACY.md) · [Sponsors](https://github.com/UNITRONIX/BetterDesk/blob/main/SPONSORS.md)
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
*Wiki source: `docs/wiki/` — last sync: 2026-07-12*
|
||||
*Wiki source: `docs/wiki/` — last sync: 2026-09-06*
|
||||
|
||||
+23
-22
@@ -1,42 +1,43 @@
|
||||
### Getting Started
|
||||
### Start
|
||||
- [[Home]]
|
||||
- [[Installation]]
|
||||
- [[Configuration]]
|
||||
- [[Docker]]
|
||||
- [[Client Setup|Client-Setup]]
|
||||
- [[Panel Updates|Panel-Updates]]
|
||||
- [[TLS / SSL Certificates|TLS-SSL]]
|
||||
|
||||
### Web Console
|
||||
### Console
|
||||
- [[Web Console|Web-Console]]
|
||||
- [[Desktop Widget Dashboard|Desktop-Dashboard]]
|
||||
- [[User Management|User-Management]]
|
||||
- [[Organizations and RBAC|Organizations-and-RBAC]]
|
||||
- [[LDAP / Active Directory|LDAP-AD]]
|
||||
- [[OIDC SSO|OIDC-SSO]]
|
||||
- [[Client Generator|Client-Generator]]
|
||||
- [[Fleet and Policies|Fleet-and-Policies]]
|
||||
- [[Unattended Access and WoL|Unattended-and-WoL]]
|
||||
- [[Web Remote Desktop|Web-Remote]]
|
||||
- [[UX 3.5|UX-3.5]]
|
||||
|
||||
### Desktop & Agents
|
||||
- [[⚠️ Alpha Notice|Alpha-Software-Notice]]
|
||||
- [[Desktop Clients|Desktop-Clients]]
|
||||
- [[CDAP Protocol|CDAP]]
|
||||
- [[SDK]]
|
||||
- [[MeshAgent]]
|
||||
|
||||
### Security
|
||||
- [[Security Architecture|Security]]
|
||||
- [[TLS / SSL Certificates|TLS-SSL]]
|
||||
- [[Chat E2E Encryption|Chat-E2E]]
|
||||
- [[Licensing]]
|
||||
|
||||
### Advanced
|
||||
- [[API Reference|API-Reference]]
|
||||
- [[Docker Deployment|Docker]]
|
||||
- [[Migration Guide|Migration]]
|
||||
### Ops
|
||||
- [[Configuration]]
|
||||
- [[Monitoring]]
|
||||
- [[Security]]
|
||||
- [[Privacy]]
|
||||
- [[Migration]]
|
||||
|
||||
### Help
|
||||
- [[Troubleshooting]]
|
||||
- [[FAQ]]
|
||||
|
||||
### Advanced
|
||||
- [[API Reference|API-Reference]]
|
||||
- [[CDAP]]
|
||||
- [[SDK]]
|
||||
- [[Alpha Software Notice|Alpha-Software-Notice]]
|
||||
- [[Desktop Clients|Desktop-Clients]]
|
||||
- [[MeshAgent]]
|
||||
- [[Chat E2E Encryption|Chat-E2E]]
|
||||
- [[Licensing]]
|
||||
|
||||
---
|
||||
*Source: [docs/wiki/](https://github.com/UNITRONIX/BetterDesk/tree/main/docs/wiki) in the main repo*
|
||||
*Source: [docs/wiki/](https://github.com/UNITRONIX/BetterDesk/tree/dev/docs/wiki)*
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Soft check for Windows (PowerShell)
|
||||
# Usage: powershell -File scripts/check-wiki-staleness.ps1
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$wiki = Join-Path $PSScriptRoot '..\docs\wiki'
|
||||
$fail = $false
|
||||
$patterns = @(
|
||||
'3\.3\.132',
|
||||
'v2\.4\.0',
|
||||
'mac_address',
|
||||
'Node\.js Client API',
|
||||
'/api/login/2fa',
|
||||
'Node\.js 18\+',
|
||||
'badge/Node\.js-18'
|
||||
)
|
||||
Get-ChildItem $wiki -Filter '*.md' | ForEach-Object {
|
||||
$file = $_.Name
|
||||
$n = 0
|
||||
Get-Content $_.FullName | ForEach-Object {
|
||||
$n++
|
||||
$t = $_
|
||||
foreach ($p in $patterns) {
|
||||
if ($t -match $p) {
|
||||
if ($t -match 'not.?`?mac_address' -or $t -match 'no separate' -or $t -match '\*\*no\*\* separate') {
|
||||
continue
|
||||
}
|
||||
Write-Host "FAIL ${file}:${n}: $t"
|
||||
$script:fail = $true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($fail) { exit 1 }
|
||||
Write-Host 'OK: wiki stale-claim checks passed'
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Fail if wiki source regains known stale / misleading phrases.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
WIKI="$ROOT/docs/wiki"
|
||||
fail=0
|
||||
|
||||
# Patterns that should never appear as positive claims.
|
||||
# Educational negations ("not mac_address", "no /api/login/2fa") are allowed.
|
||||
while IFS= read -r line; do
|
||||
file="${line%%:*}"
|
||||
rest="${line#*:}"
|
||||
num="${rest%%:*}"
|
||||
text="${rest#*:}"
|
||||
case "$text" in
|
||||
*"not \`mac_address\`"*|*"not mac_address"*|*"no separate \`/api/login/2fa\`"*|*"no \`/api/login/2fa\`"*|*"There is **no** separate `/api/login/2fa`"*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
echo "FAIL stale claim in $file:$num: $text"
|
||||
fail=1
|
||||
done < <(grep -RInE --include='*.md' '3\.3\.132|v2\.4\.0|mac_address|Node\.js Client API|/api/login/2fa|Node\.js 18\+|badge/Node\.js-18' "$WIKI" || true)
|
||||
|
||||
if [[ "$fail" -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
echo "OK: wiki stale-claim checks passed"
|
||||
Reference in New Issue
Block a user