feat: improve RustDesk template configuration (#571)

* feat: improve RustDesk template configuration

- Add comprehensive environment variables for RustDesk server
- Add RELAY_HOST, API_SERVER, ID_SERVER, and ENCRYPTION_KEY variables
- Follow Dokploy best practices (no container_name, proper port format)
- Use restart: unless-stopped policy
- Add encryption key generation with password helper

* fix: use explicit port mapping for RustDesk services

RustDesk requires explicit port bindings (host:container format) to function properly. The service uses specific ports for:
- 21115-21116 (TCP/UDP): hbbs service for ID and NAT traversal
- 21117-21119 (TCP): hbbr relay service

Without explicit port mapping, RustDesk clients cannot establish connections to the server.

This is an exception to Dokploy's general port guidelines due to RustDesk's specific networking requirements.

---------

Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
This commit is contained in:
Muzaffer Kadir YILMAZ
2025-12-15 08:23:05 +03:00
committed by GitHub
parent efea22e1f0
commit 32da868c01
2 changed files with 7 additions and 2 deletions

View File

@@ -9,7 +9,6 @@ services:
- "21115:21115"
- "21116:21116"
- "21116:21116/udp"
- "21118:21118"
depends_on:
- hbbr
@@ -21,7 +20,8 @@ services:
- rustdesk-data:/root
ports:
- "21117:21117"
- "21118:21118"
- "21119:21119"
volumes:
rustdesk-data: {}
rustdesk-data:

View File

@@ -1,9 +1,14 @@
[variables]
server_domain = "${domain}"
encryption_key = "${password:32}"
[config]
[config.env]
RELAY_HOST = "${server_domain}"
RUSTDESK_RELAY_SERVER = "${server_domain}:21117"
RUSTDESK_API_SERVER = "http://${server_domain}:21118"
RUSTDESK_ID_SERVER = "${server_domain}:21116"
ENCRYPTION_KEY = "${encryption_key}"
[[config.mounts]]