- Updated .gitignore to include new binary paths and retain .gitkeep.
- Modified Gitleaks configuration to ignore additional directories.
- Adjusted CI workflows to prevent execution on version bump pushes and improved version bump handling in scripts.
- Bumped BetterDesk Console Manager version to 3.3.136 in betterdesk.sh and related scripts.
updateService.js: distinguish critical vs non-critical failures in SHA tracking. Server binary compile/download failures are non-critical — SHA is saved so the same update is not shown again on restart. update-cli.js: match same logic, non-critical failures don't set exit code 1. betterdesk.sh: new update_from_github() with git clone + tarball fallback, 3-method menu. betterdesk.ps1: new Update-FromGitHub with git clone + ZIP fallback, 3-method menu. betterdesk-docker.sh: new update_docker_from_github() with 2-method menu.
This commit was made possible thanks to Insolve.
Add mandatory commit convention to .github/copilot-instructions.md so future AI-generated commits always include the 'This commit was made possible thanks to Insolve.' footer.
This commit was made possible thanks to Insolve.
- deployServerBinary: use rename(2) for atomic replace, fixes ETXTBSY
when target Go binary is busy (Linux kernel handles inode swap).
Falls back to copyFileSync on cross-device rename or non-Linux.
Windows: rename target out of the way first, then move new in.
- settings.js: mark 'server' phase as error when build succeeded but
deploy failed (was incorrectly marking 'done' from build alone).
- settings.js: completion modal now shows error title, error message
and pre-formatted stderr when serverDeploy.success === false.
- i18n: added complete_with_errors, modal_done_with_errors_title in
en/pl.
Use the layout-provided CSRF token (window.BetterDesk?.csrfToken) instead of a non-existent meta tag. This fixes failing PUT requests for organization policy saves (Issue #112), and resolves attestation verify/revoke failures. Also replace toolkit's cached meta lookup with a getCsrfToken() helper so API calls always read the current token. Updated .github/copilot-instructions.md to document the Phase 53 CSRF fixes.
Adds a full Phase-52 RBAC implementation and multiple server/frontend fixes. Key changes: new auth/permissions.go with 28 granular permissions and DefaultRolePermissions, expanded 7-role hierarchy and helpers in auth/roles.go, JWT org context and GenerateOrgToken, requirePermission/requireOrgMembership middlewares (Go + Node.js), DB schema & adapter changes for role_permissions and is_server_admin, org role boundary checks and peer org scoping, and guards for last-admin demotion and self-demotion. Also: TCP EOF/connection-reset log filtering in signal/relay servers, improved startup banner port display, KEYS_PATH auto-detect warning, CSS hover/transition layout fixes, admin password race mitigation, ID-change ghost peer cleanup, added Tauri ACL schema files, and a new RBAC_PHASE52.md doc. Misc: numerous web-nodejs i18n, CSS, JS and route updates and an updated .github/copilot-instructions.md timestamp/summary.
Introduce two new desktop apps: betterdesk-mgmt (operator/admin console) and betterdesk-agent-client (lightweight endpoint agent).
Key changes:
- Add complete betterdesk-agent-client scaffold: frontend (index.html, TSX components, i18n, styles, Vite/TS configs, package.json) and Rust Tauri backend (Cargo.toml, build.rs, tauri.conf.json, commands.rs, config.rs, registration.rs, sysinfo_collect.rs, NSIS language file).
- Add betterdesk-mgmt entries and assets (registered in docs) and update repo docs to describe both MGMT and Agent clients.
- Update .github/copilot-instructions.md to reflect MGMT/Agent client split and add detailed TODO/feature lists.
- Update .gitignore to exclude build artifacts for both new Tauri apps.
- Add docs/new_agents/client1.md and docs/new_agents/client2.md.
- Minor changes to server DB files and web-nodejs i18n/asset files.
This commit adds the initial scaffolding and core IPC/registration/diag features for the agent and registers the MGMT client in repository docs; further implementation and testing remain.
Add unit tests and test helpers (5 suites, 41 tests) and test npm scripts; introduce deviceStatusPush service and WS real-time device status push integration. Fix chatRelay to acknowledge connections (send `welcome`), and apply multiple web remote/rdclient fixes (video ack/timing, keyframe refresh, SourceBuffer trimming, input focus handling) to improve FPS and control. Add new server route file (system.routes.js), new device-status service, update server.js and package.json, and modify various frontend CSS/JS/views. Update English and Polish locale files with many new widget/i18n keys and remove the Russian locale file (ru.json). Also include assorted UI/desktop-widget dashboard tweaks and documentation status updates in .github/copilot-instructions.md.
Prevent breaking RustDesk clients by keeping the API port HTTP-only and removing automatic API TLS: update APITLSEnabled logic (config.go) and remove/add-removal of -tls-api / -force-https from install scripts and service updates (betterdesk.sh, betterdesk.ps1). Fix systemd escaping for admin password and PostgreSQL URL by converting $ → $$ before writing ExecStart/Environment so credentials with $ are preserved. Add MainThread to port diagnostic patterns to avoid false positives for Node.js on newer Linux (betterdesk.sh). Also include minor struct/tag formatting and response key alignment in CDAP Go code and update changelog and copilot instructions. These changes restore client compatibility, harden installer/service writes, and improve diagnostics.
Introduce full CDAP subsystem and devices UI overhaul. Adds a new CDAP WebSocket gateway (cdap/gateway.go) with auth, connection lifecycle, message loop, heartbeat monitor and APIs (cdap/api.go, cdap/auth.go, cdap/handler.go, cdap/manifest.go, cdap/messages.go). Wire CDAP into the server (api/server.go + handlers in api/cdap_handlers.go) exposing REST endpoints for status, device list, info, manifest, state and sending commands. Enhance peer handling: CDAP-connected overlay in peer list/get, device revocation/cascade support in handleDeletePeer (blocklist, connection teardown, events + audit), and new audit action ActionPeerRevoked. Frontend updates include CDAP device page, widgets, commands, styles and services; major devices page UI redesign (responsive folder chips, toolbar, slim table, kebab menu) plus related CSS/JS/views, translations, docs and assets. Overall adds CDAP features, revocation workflow, and a responsive devices UI.
Change ForceRelay TCP path to return a PunchHoleResponse with NatType=SYMMETRIC instead of sending a server-generated RelayResponse, so clients will send RequestRelay with their own UUIDs and both sides use the same UUID (resolves relay pairing mismatch, Issue #66). Add diagnostic log.Printf calls in handleRequestRelay (UDP) and handleRequestRelayTCP to aid relay pairing debugging. Update docs and CI: add GHCR "pull access denied" troubleshooting and package visibility guidance to DOCKER_QUICKSTART.md, docker-compose.quick.yml, and the docker-publish workflow summary (addresses Issue #67). Also update changelog entry in .github/copilot-instructions.md and add related files to .gitignore.
Replace .NET 6-only RandomNumberGenerator::Fill() with RNGCryptoServiceProvider.GetBytes() in betterdesk.ps1 to restore API key generation on Windows PowerShell 5.1 (fixes issue #38). Add Rust→Go upgrade detection and handling to both betterdesk.ps1 and betterdesk.sh: detect SERVER_TYPE=rust, warn users that migration requires a fresh install, redirect in auto mode or prompt interactively, and avoid a broken upgrade path from legacy Rust (hbbs/hbbr) to the Go server (addresses issues #66 and #38). Update .github/copilot-instructions.md changelog and last-updated footer to document the changes.
Add Docker quickstart flow and CI to publish images to GitHub Container Registry. Creates a new GitHub Actions workflow (.github/workflows/docker-publish.yml) that builds multi-arch images (server, console, all-in-one) and pushes to ghcr.io. Adds docker-compose.quick.yml using pre-built GHCR images and a DOCKER_QUICKSTART.md with a 30s one‑line quick start, troubleshooting, and configuration notes. Update README Docker section to surface the quick start and adjust docker-compose.yml header to reference the quick file. Also update .github/copilot-instructions.md to document the Docker quick start and publishing phase.
Introduce peer metrics persistence and partial peer updates, plus relay UUID recovery and soft-delete protections.
- DB: add PeerMetric type and new Database methods (SavePeerMetric, GetPeerMetrics, GetLatestPeerMetric, CleanupOldMetrics, UpdatePeerFields, IsPeerSoftDeleted). Add peer_metrics table and indexes in SQLite and PostgreSQL migrations; implement all methods for both backends.
- API: handleClientHeartbeat now parses cpu/memory/disk and saves metrics; new endpoints PATCH /api/peers/{id} to update note/user/tags and GET /api/peers/{id}/metrics for historical metrics. handleSetPeerTags now accepts either string or array JSON payloads. Added audit.ActionPeerUpdated.
- Signal server: add pendingRelayUUIDs store (with TTL cleanup, store/get helpers) to recover missing UUIDs from old clients when RelayResponse contains empty uuid; store pending UUIDs when forwarding RequestRelay/PunchHole. Add IsPeerSoftDeleted checks to reject re-registration of soft-deleted devices.
- Node.js panel: betterdeskApi.setPeerTags now sends tags as array and exposes updatePeer() for PATCH; serverBackend.updateDevice routes note/user updates through Go PATCH endpoint and preserves local auth.db writes as fallback; devices.routes deletes now call cleanupDeletedPeerData.
- dbAdapter: add cleanupDeletedPeerData implementations for SQLite and Postgres to remove related auth.db rows when a peer is deleted.
These changes fix zombie device re-registration, ensure metrics are stored & retrievable, centralize peer metadata updates through the Go API, and recover relay pairing failures with legacy clients.
Co-Authored-By: boruto79 <176351662+boruto79@users.noreply.github.com>
Co-Authored-By: БлагоЯр <3672314+blagoyar@users.noreply.github.com>
Fix several stability and UX issues in the web remote client: prevent ImageData crashes by validating and normalizing cursor bytes (skip zstd/compressed or truncated data) and wrapping updateCursor in try/catch; avoid unhandled promise rejections by adding a .catch() around renderer.updateCursor calls; reduce JMuxer-induced stutter and unnecessary seeks by increasing seek thresholds and offsets and tuning health-check intervals/playback-rate logic; send preferred FPS to the peer after login (default 30fps) and negotiate supported codecs dynamically based on WebCodecs/JMuxer availability; ensure focus management after login (blur hidden password input and focus canvas) and toggle a .streaming CSS class on the viewer container for cursor visibility. These changes improve robustness against malformed cursor payloads, reduce playback stutter, and improve input focus behavior.
Fix automatic API HTTPS behavior by making HTTP API TLS opt-in. Add TLSApi config field, APITLSEnabled() helper and --tls-api CLI flag (implied by --force-https). Use APITLSEnabled() in api/server.go so the API stays HTTP unless explicitly requested, avoiding Node.js -> Go HTTPS handshake errors with self-signed certs. Update logging to show API scheme, and add TLS API handling across installers and scripts: betterdesk.sh and betterdesk.ps1 now only enable -tls-api and switch .env/API URLs to https for proper (non-self-signed) certs; self-signed certs keep API on http while still enabling TLS for signal/relay. Also update diagnostics to detect --tls-api/--force-https, remove stale legacy services, and add migration-tool auto-compilation and basic version validation.
Stop wiping credentials on update and make service setup more resilient. Changes:
- Preserve existing .api_key, admin credentials and auth.db during updates in betterdesk-docker.sh; only regenerate on fresh installs.
- Preserve SESSION_SECRET, DEFAULT_ADMIN_PASSWORD and avoid removing auth.db on updates in betterdesk.sh and betterdesk.ps1; only force-reset on fresh installs via sentinel file.
- Add safety-net re-read of .env in Linux and Windows Setup-Services to recover PostgreSQL config (prevents PG→SQLite regression).
- Remove legacy Flask betterdesk-api service cleanup (systemd/NSSM) and propagate DB_TYPE/DATABASE_URL to NSSM env.
- Detect node binary dynamically in systemd service and route stdout/stderr to journal (SyslogIdentifier set) for better logs.
- Fix Windows update/service flow (Do-Update now calls Setup-Services) and Repair-Binaries checks for betterdesk-server.exe with hbbs.exe fallback.
- Update .github/copilot-instructions.md summary to reflect these installer stability fixes.
Generate a UUID when RequestRelay/RelayResponse messages contain an empty uuid to prevent relay pairing failures (updates in signal/handler.go: handleRequestRelay, handleRequestRelayTCP, handleRelayResponseForward). Add validation in config.GetRelayServers to reject obviously invalid/too-short hosts (prevents relay entries like "a:21117"). Add retry wrappers to apk add commands in Dockerfile, Dockerfile.server, and Dockerfile.console to work around transient DNS failures during image builds. Update changelog (.github/copilot-instructions.md) with these fixes and related notes.
Implement address book support and related fixes: add address_books table and Get/SaveAddressBook to DB interface with SQLite/Postgres migrations and upsert, add handlers for /api/ab, /api/ab/personal and /api/ab/tags (GET/POST) and normalize/limit incoming data. Signal server: generate relay UUIDs, send RelayResponse (with UUID and signed PK) and forward RequestRelay to targets to ensure hbbr pairing. Docker/compose/supervisord/entrypoint: introduce RELAY_SERVERS env, expose it in Dockerfile and supervisord, add docker-compose hint, and add entrypoint auto-detection/warnings for public IP inside containers. Web UI fixes: align settings password field names and include confirmPassword, modal input supports inputType, fix change-id request body key, add i18n strings for device actions/errors, and improve device delete route error handling. Also update changelog (.github/copilot-instructions.md) and add some API logging and validations.
Call startIPDetectionRetry and improve public IP detection to avoid returning an unusable bare :port; prefer LAN IP and log clear warnings when no public IP is available. Add retry goroutine (60s ticker) and extend detectPublicIP with HTTPS then HTTP fallbacks and longer timeout. Throttle frequent sysinfo log messages (per-device 5min cooldown) in heartbeat handler to prevent spam. Accept numeric IDs from RustDesk by coercing host_id/host_uuid/peer_id to strings in /api/audit/conn to fix 400 errors. Add force-recompile logic to PowerShell and shell install/update scripts so binaries are rebuilt when sources are newer (and expose ForceRecompile flag). Minor docs and .gitignore updates.
Fix Docker single-container auth gap by ensuring an API key exists and is discoverable by both the Go server and Node.js console. Changes:
- betterdesk-server/main.go: loadAPIKey() now checks the server_config DB entry and, if absent, auto-generates a 32-byte hex API key, writes it to .api_key (with logging) and continues to sync to the DB.
- docker/entrypoint.sh: generates/persists a 32-byte hex API key at container startup (uses openssl with /dev/urandom fallback) and writes API_KEY env to file if provided.
- web-nodejs/services/betterdeskApi.js: adds fs import and an Axios 401 interceptor that reloads .api_key from disk once and retries the failed request to handle race conditions where the Go server generates the key after Node cached an empty value.
- .github/copilot-instructions.md: documents the Docker API key auto-generation (Phase 16) and related fixes.
- tasks/lessons.md and tasks/todo.md: add lightweight triage notes and actions.
This resolves the issue where the Devices page returned empty results due to missing X-API-Key in the single-container Docker setup and improves resilience during first-run key generation.
Security hardening and installer fixes across the Go API, installers and Node console.
Key changes:
- WebSocket: removed InsecureSkipVerify and added API_WS_ALLOWED_ORIGINS allowlist (parsed in config) used by the API events WS endpoint.
- Node.js console: added HOST and API_HOST envs and used apiHost in the server; docker-compose and installer templates updated accordingly.
- Admin credentials: plaintext .admin_credentials persistence is now opt-in via STORE_ADMIN_CREDENTIALS (default false); installers and reset flows no longer persist creds unless explicitly enabled.
- Installer hardening: added sql_escape_literal for safe SQL literals, PostgreSQL identifier validation, and safer CREATE/ALTER/psql invocations; API key and password updates now pass secrets via environment variables to Python/Node fallbacks to avoid unsafe shell interpolation.
- Docker compose/scripts: preserve_compose_database_config to keep DB mode during regen, escaped API key insertion into sqlite, and various compose generation formatting fixes.
- Go toolchain & checks: go.mod toolchain set to go1.26.1 and installers now reject known-vulnerable Go 1.26.0 stdlib.
- Dependency: bumped web-nodejs tar override to ^7.5.11.
These changes reduce attack surface for cross-origin WS usage, eliminate unsafe credential persistence by default, and harden installer DB operations and password reset paths.
Add a reusable get_public_ip() to betterdesk.sh and betterdesk-docker.sh (prefers IPv4) and replace inline curl-based IP detection with calls to it. Warns when a private/loopback IP is detected and adds RELAY_SERVERS env var override in both shell and PowerShell installers to allow manual public-IP configuration. Update betterdesk-server/config.GetRelayServers() to auto-append the default relay port when missing and correctly handle IPv6 addresses using net.SplitHostPort/net.JoinHostPort. Update documentation (.github/copilot-instructions.md) and last-updated note. Addresses Issue #58 and improves relay compatibility.
Fix port collision between Node.js console (PORT=5000) and Go signal server by introducing SIGNAL_PORT with higher precedence. Changes:
- betterdesk-server/config/config.go: prefer SIGNAL_PORT over PORT when setting SignalPort.
- Dockerfile: add ENV SIGNAL_PORT=21116 default.
- docker/entrypoint.sh: export SIGNAL_PORT with default 21116 before supervisord start.
- docker/supervisord.conf: set SIGNAL_PORT=21116 in Go server environment.
- .github/copilot-instructions.md: document the root cause and fixes; update last-modified date.
This prevents EADDRINUSE races in the single-container Docker setup while keeping multi-container setups unaffected.
Preserve existing DB config during update/repair and add PostgreSQL compatibility and reliability fixes. Added preserve_database_config()/Preserve-DatabaseConfig and invoked them before console reinstall in betterdesk.sh and betterdesk.ps1 to avoid unintentionally switching PostgreSQL → SQLite. Fixed folder/user route responses to use result.id (Postgres-compatible) in web-nodejs routes. Added automatic TOTP column migrations for both SQLite and Postgres in web-nodejs/services/dbAdapter.js. Improved relay error logging and write-error handling in betterdesk-server/relay (server.go, ws.go). Updated docs and tooling: added SELinux troubleshooting (DOCKER_TROUBLESHOOTING.md), Windows build/usage notes for the migrate tool (README.md), and updated changelog/instructions (.github/copilot-instructions.md) and last-updated date.
Detect absent Bearer tokens in RustDesk API handlers and fall through to panel routes. Updated rustdesk-api.routes.js to accept next(), extract the Bearer token, call next('route') when no token is present so session-cookie-based panel requests reach their intended handlers, and return a clearer error for invalid tokens. Also updated .github/copilot-instructions.md changelog to record the fix (Phase 10) and update the last-modified date.
Add RustDesk-compatible client API and telemetry support and introduce a single-container Docker build. New client_api_handlers.go implements /api/login, /api/login-options, /api/logout, /api/currentUser, /api/ab, /api/heartbeat, /api/sysinfo and /api/sysinfo_ver with TOTP flow and an in-memory TFA session store; auth middleware and Server registration updated accordingly. Database interface and SQLite/Postgres implementations gain UpdatePeerSysinfo (with tests), audit actions for sysinfo, and handleGetPeer now returns live_online/live_status. Also add Dockerfile, docker-compose.single.yml, supervisord entrypoint, UI fixes (QR color inversion, 403 error view), labels file, README updates, and other ancillary changes.
Co-Authored-By: MrBrodacz - Design <215021251+MrBrodacz2025@users.noreply.github.com>
Co-Authored-By: boruto79 <176351662+boruto79@users.noreply.github.com>
Co-Authored-By: marcosacramento <marcosacramento@gmail.com>
Co-Authored-By: Charles Olivier Savignac <1275666+sircharlo@users.noreply.github.com>
Make TCP and WebSocket signal handling consistent with UDP by sending immediate PunchHoleResponse/RelayResponse (including signed PK, socket_addr, relay server and NAT type) to initiators; add ForceRelay/AlwaysUseRelay handling and ensure WS uses TCP handler. Sign peer PKs for E2E verification and keep TCP keep-alive behavior for later updates.
Refactor web-nodejs branding and backup/database code: introduce async branding cache (loadBranding) and async save/reset/import APIs, add branding_config table and DB adapter methods (SQLite/Postgres) plus backup helper methods (getAllUsersForBackup, getAllAddressBooks, restoreUsers, getBackupStats). Update routes/services to use new async DB APIs, warm branding cache at server startup, and adjust heartbeat/register flows to use db helpers. Minor server error page i18n fallbacks and hbbs backend compatibility guard updated.
Also update docs (.github/copilot-instructions.md) to record the TCP signaling fix and Phase 7 resolution.
Co-Authored-By: Charles Olivier Savignac <1275666+sircharlo@users.noreply.github.com>
Add a new betterdesk-server Go codebase (server, api, auth, db, relay, signal, metrics, audit, ratelimit, proto, tools, tests) and related deployment/migration scripts. Add a comprehensive SECURITY_AUDIT_2026-03-01 report and .gitattributes; update copilot-instructions (ALL-IN-ONE v2.4.0), README, VERSION, Dockerfiles, scripts, docker-compose and entrypoint. Large updates to web-nodejs (translations, routes, services, frontend assets and middleware) and numerous new utilities; remove legacy Flask web files and archive hbbs-patch-v2 artifacts. Prepares repository for PostgreSQL support, DB migration tooling and the new Go server as the production backend.
Release-related update to v2.1.3: replace hbbs/hbbr binaries and update all SHA256 checksums and CHECKSUMS.md. Add robust firewall/port diagnostics and auto-configuration: implements firewall rule checks and creation in betterdesk.ps1 and betterdesk.sh, enhances diagnostics (port conflict detection, external port test) and introduces Check-PortStatus/Configure-Firewall helpers. Make HBBS API key path flexible in Rust (env var / Windows-friendly .api_key fallback) and persist permissions correctly. Node.js console: load .env as a fallback for Windows NSSM, make KEYS_PATH default to C:\BetterDesk on Windows, improve JSON parsing for login/TOTP responses, ensure API routes return JSON on errors, and add periodic HBBS online-status sync. Misc: update server/client API port to include 21121 (client API), adjust docs, and minor service/env environment improvements for NSSM/systemd.
Co-Authored-By: PlasmPlayer <153363510+PlasmPlayer@users.noreply.github.com>
Co-Authored-By: boruto79 <176351662+boruto79@users.noreply.github.com>
Co-Authored-By: MrBrodacz - Design <215021251+MrBrodacz2025@users.noreply.github.com>
Introduce an interactive Docker migration flow and branding/theme support. Adds automatic/manual RustDesk-to-BetterDesk migration logic and menu option (betterdesk-docker.sh), plus a full migration guide (docs/DOCKER_MIGRATION.md) and README updates. Switches project license references to AGPL-3.0 and updates LICENSE locations for hbbs patches. Web console enhancements: new branding service and default theme, i18n middleware now injects branding, extended translations (en/pl), settings UI/JS and CSS for branding/theming, and login JS updated to include CSRF token. Also includes various view/template updates to surface branding across the UI.
Bump to v2.3.0 and switch to Node.js web console as the primary console (Flask deprecated). Add comprehensive security and feature updates: CSRF protection, session-fixation prevention, timing-safe auth, WebSocket auth, TOTP 2FA, operator/admin roles, address-book sync, desktop connect (URI handler), and SSL certificate configuration in installers. Introduce a dedicated RustDesk Client API (WAN port 21121) and related web-nodejs middleware, routes, views, protos, and client JS (rdclient) plus vendor libs. Add developer tooling and scripts (dev_modules), update hbbs-patch-v2 Rust sources, README and changelog/docs, and ignore Node.js artifacts in .gitignore.
Bump release to v2.2.1 and fix Node.js web-console installation and update flow. Changes include: generate and persist a random DEFAULT_ADMIN_PASSWORD for the Node.js console, always write a .env with corrected path variables (RUSTDESK_DIR/KEYS_PATH/DB_PATH/DATA_DIR/HBBS_API_URL), save admin creds to .admin_credentials and display them after install/update, load .env from systemd using EnvironmentFile and expose needed envs in the service unit, and ensure Do-Update installs services and creates the admin. The create_admin_user logic now detects Node.js vs Flask consoles (reading stored Node.js creds or creating Flask DB user). Also update web-nodejs config to accept multiple env var names and use a safe default for KEYS_PATH, and refresh project docs/version metadata.
Introduce a new Node.js-based web console (Express + EJS + better-sqlite3) under web-nodejs/ and add installer support to choose between Node.js and the legacy Flask console. Update interactive ALL-IN-ONE installers (betterdesk.sh, betterdesk.ps1) with flags/options for --nodejs/--flask, automatic Node.js installation, migration logic, enhanced service handling and diagnostics. Bump VERSION to 2.2.0 and update README and project docs (.github/copilot-instructions.md) to reflect the new console, usage examples, and Docker/docs changes. Many new web-nodejs files and supporting middleware/services/routes/views/static assets were added to support the new console.
Bump release to v2.1.2: update version strings and SHA256 checksums in docs and installer scripts (betterdesk.sh, betterdesk.ps1, CHECKSUMS.md). Replace several hbbs/hbbr binaries under hbbs-patch-v2. Add a new relay_server.rs implementing the relay logic: websocket support, blacklist/blocklist, per-device ban check (fixes banning whole IPs), bandwidth limiting, usage metrics, admin commands via loopback, and runtime tuning via environment variables. Minor metadata/date updates included.
Major refactor of betterdesk.ps1: convert to modern PowerShell script with Param/Help, enforce RunAsAdministrator, introduce script-scoped variables, structured logging, Print-* helper functions, auto-mode handling, public IP and password helpers, improved path detection and defaults, binary verification (Verify-*), dependency installation, venv setup for the web console, service setup using NSSM with scheduled-task fallback, and database migration/initialization logic. UI and status output were cleaned up and many functions renamed for clarity. Dockerfile.console: make resolv.conf DNS edits conditional (skip on read-only / Oracle Cloud VCNs) to avoid modifying immutable resolv.conf. .github/copilot-instructions.md: update project status date. These changes improve robustness, non-interactive automation, and Windows service management for BetterDesk.
- Added SHA256 checksum verification for all binaries
- Added --auto/-Auto flag for non-interactive installation
- Added --skip-verify/-SkipVerify to bypass verification
- Updated systemd services with correct API port (21120)
- Added API_PORT environment variable support
- Improved service templates with documentation links
- Updated VERSION to 2.1.1
Introduce BetterDesk v2.0.0 by adding interactive ALL‑IN‑ONE installer/manager scripts for Docker, Linux and Windows (betterdesk-docker.sh, betterdesk.sh, betterdesk.ps1). Bump VERSION to 2.0.0 and update README and .github/copilot-instructions.md to document the new workflows and quickstart. Move older helpers into scripts/legacy/, add a legacy README and adjust template paths. The new docker script includes compose generation, image build/start/stop, backup/restore, repair/validation, admin password management, diagnostics and uninstall routines.
Add a full automated build pipeline, interactive build scripts, documentation and development utilities.
- Add GitHub Actions workflow (.github/workflows/build.yml) to build BetterDesk (hbbs/hbbr) for Linux x64, Linux ARM64 and Windows x64, upload artifacts, optionally create a release and update repository binaries.
- Add interactive build scripts for Windows and Unix (build-betterdesk.ps1, build-betterdesk.sh) supporting download, patch application, cross-build and checksum generation.
- Add build and status docs (docs/BUILD_GUIDE.md, docs/STATUS_TRACKING_v3.md) and update project README/instructions (.github/copilot-instructions.md) with new items and updated timestamp.
- Add development utilities under dev_modules/ (multiple database/patch/test helpers) and move test_generator.py into dev_modules/test_generator.py.
- Update .gitignore to exclude archive/ folder.
- Modify hbbs-patch-v2 sources (database.rs, http_api.rs, main.rs, peer.rs and add rendezvous_server.rs) and remove legacy fixed files; update web UI backend and static files (web/app.py, web/static/*, web/templates/index.html).
These changes set up CI/CD for multi-platform builds, provide local build tooling, expand docs for v3 status tracking and ID-change features, and add developer test/patch utilities.
Introduce automatic database migrations and auth table creation across installers, update documentation and docker entrypoint.
Changes include:
- Docs: update installation guidance, mark primary installers (install-improved.sh/.ps1) as recommended, clarify Docker usage, add troubleshooting flags and note about automatic DB migrations.
- install-improved.ps1: bump to v1.5.2; add Invoke-DatabaseMigration which runs an embedded Python migration to add required peer columns, create users/sessions/audit_log tables, and run during install and after -Fix.
- install-improved.sh: add creation of a "note" column in the peer table as part of run_database_migration (schema hardening for new fields).
- docker-entrypoint.sh: perform safe schema checks and ALTERs for peer columns, create indexes, ensure authentication tables and default admin user are present; improved logging and idempotent migration behavior.
Purpose: make installs and upgrades more robust by automatically bringing existing SQLite schemas up to date, provisioning auth infrastructure, and documenting the recommended installation flows and recovery options.
Update Dockerfiles and compose to use local BetterDesk (hbbs-patch-v2) binaries, avoid pulling unpublished images, and improve build reliability. Dockerfile.hbbr/hbbs now copy patched binaries, set executable symlinks and run the BetterDesk binaries by default. Dockerfile.console adds DNS fallback entries to mitigate resolver failures during build. docker-compose.yml sets image names and pull_policy: never and runs the enhanced binaries directly. Documentation updated (DOCKER_TROUBLESHOOTING.md, README, .github/copilot-instructions.md) with troubleshooting steps for "no such table: peer", pull access denied, and DNS build issues.
Add an offline-diagnosis script and Copilot guidelines, update Docker flow to require local image builds, and promote hbbs-patch-v2 binaries with checksums.
Highlights:
- New dev_modules/diagnose_offline_status.sh to detect and fix "all devices offline" issues.
- Added .github/copilot-instructions.md with project state and build guidelines for Copilot.
- Emphasized local Docker builds in DOCKER_SUPPORT.md, DOCKER_TROUBLESHOOTING.md, docker-compose.yml and docker-quickstart.sh (replace pull with build/rebuild).
- Updated docs/TROUBLESHOOTING_EN.md and README to document offline-status causes/fixes and Windows/Linux v2 binaries (API port 21114).
- Added hbbs-patch-v2 Windows binaries, updated CHECKSUMS.md, and removed legacy hbbs-patch v1 files.
- Bumped VERSION to 1.5.5 and adjusted installer scripts (install-improved.sh/ps1) accordingly.
These changes improve diagnostics, clarify deployment (Docker/local builds), and roll out the v2 BetterDesk server binaries with verification info.