mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-11 13:49:03 +00:00
01fcdc4aea
Added a new billing service and time synchronization functionality to the server. This includes the creation of billing packages, contracts, and sessions, along with necessary database migrations. Updated API endpoints for billing management and integrated billing checks into signal handling. Enhanced configuration options for billing parameters and added localization support for billing-related messages.
68 lines
2.2 KiB
Bash
68 lines
2.2 KiB
Bash
# BetterDesk Node.js Console Configuration
|
|
# Template for fresh install / merge on update (issue #158).
|
|
# Placeholders __NAME__ are substituted by the installer merge-env script.
|
|
|
|
PORT=5000
|
|
HOST=0.0.0.0
|
|
NODE_ENV=production
|
|
|
|
# RustDesk paths (critical for key/QR code generation)
|
|
RUSTDESK_DIR=__RUSTDESK_DIR__
|
|
KEYS_PATH=__RUSTDESK_DIR__
|
|
PUB_KEY_PATH=__PUB_KEY_PATH__
|
|
API_KEY_PATH=__API_KEY_PATH__
|
|
|
|
# Database (SQLite default; PostgreSQL when DB_TYPE=postgres)
|
|
DB_TYPE=__DB_TYPE__
|
|
DB_PATH=__DB_PATH__
|
|
DATABASE_URL=__DATABASE_URL__
|
|
|
|
# Auth database location (panel users, sessions — passwords live in auth.db / PostgreSQL)
|
|
DATA_DIR=__DATA_DIR__
|
|
|
|
# Go server HTTP API (REST + RustDesk handlers — canonical port)
|
|
GO_API_PORT=__GO_API_PORT__
|
|
HBBS_API_URL=__HBBS_API_URL__
|
|
BETTERDESK_API_URL=__BETTERDESK_API_URL__
|
|
|
|
# Backward compat: http://host:21121 → proxy to Go
|
|
API_ENABLED=true
|
|
API_PORT=__API_PORT__
|
|
API_HOST=0.0.0.0
|
|
RUSTDESK_API_PROXY=true
|
|
RUSTDESK_API_TLS=auto
|
|
|
|
# Server backend (betterdesk = Go server, rustdesk = legacy Rust)
|
|
SERVER_BACKEND=betterdesk
|
|
|
|
# Install-only seed (not used after first admin exists in database — see authService.ensureDefaultAdmin)
|
|
DEFAULT_ADMIN_USERNAME=admin
|
|
DEFAULT_ADMIN_PASSWORD=__DEFAULT_ADMIN_PASSWORD__
|
|
|
|
# Session
|
|
SESSION_SECRET=__SESSION_SECRET__
|
|
|
|
# HTTPS (set to true and provide certificate paths to enable)
|
|
HTTPS_ENABLED=false
|
|
HTTPS_PORT=5443
|
|
SSL_CERT_PATH=__SSL_CERT_PATH__
|
|
SSL_KEY_PATH=__SSL_KEY_PATH__
|
|
SSL_CA_PATH=
|
|
HTTP_REDIRECT_HTTPS=true
|
|
|
|
# Trust reverse proxy (set 1 behind nginx/traefik; do not use the string "true")
|
|
TRUST_PROXY=false
|
|
|
|
# WebSocket Origin allow-list (comma-separated). Same-host browser upgrades are always allowed.
|
|
# WS_ALLOWED_ORIGINS=https://panel.example.com
|
|
|
|
# Console→Go API: keep on 127.0.0.1 (native install) or http://betterdesk-server:21114/api (Docker).
|
|
# Do not expose the Go API port directly to WAN — use the console proxy on :21121 for RustDesk clients.
|
|
|
|
# Billing / NTP (commercialization module — merged on update, missing keys only)
|
|
NTP_SERVERS=pool.ntp.org,time.google.com,time.cloudflare.com
|
|
BILLING_MAX_CLOCK_SKEW_MS=2000
|
|
BILLING_REQUIRE_SYNCED_CLOCK=1
|
|
BILLING_ROUNDING_MINUTES=1
|
|
BILLING_REQUIRE_WORK_REPORT=1
|