Skip to main content

RustDesk Server

caution
portfor
21114API Server - 未开源,可自行实现
21115RustDesk Server hbbs - NAT type test
21116/UDPRustDesk Server hbbs - ID registration and heartbeat service
21116/TCPRustDesk Server hbbs - TCP hole punching and connection service
21117RustDesk Server hbbr - Relay services
21118,21119/TCPRustDesk Server hbbr - web clients
# AlpineLinux
apk add -X https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/testing/ --no-cache rustdesk-server
KEY=$(uuidgen)
RELAY_SERVER=hbbs.example.com:21116
echo "command_args='-k $KEY -r $RELAY_SERVER'" | sudo tee -a /etc/conf.d/hbbs
echo "command_args='-k $KEY'" | sudo tee -a /etc/conf.d/hbbr

# 会附带启动 hbbr
sudo service hbbs start

# Docker rustdesk/rustdesk-server:latest
docker image pull rustdesk/rustdesk-server
docker run --name hbbs -v ./data:/root -td --net=host rustdesk/rustdesk-server hbbs -r <relay-server-ip[:port]>
docker run --name hbbr -v ./data:/root -td --net=host rustdesk/rustdesk-server hbbr
version: '3'

services:
hbbs:
container_name: hbbs
image: rustdesk/rustdesk-server:latest
command: hbbs
volumes:
- ./data:/root
network_mode: 'host'
depends_on:
- hbbr
restart: unless-stopped

hbbr:
container_name: hbbr
image: rustdesk/rustdesk-server:latest
command: hbbr
volumes:
- ./data:/root
network_mode: 'host'
restart: unless-stopped
hbbsdefaultfor
-c, --config FILE
-k, --key KEY
--mask MASKCIDR mask
-p,--port NUMBER21116
-r, --relay-servers HOST:分割
-R, --rendezvous-servers HOSTS:分割
-M, --rmem NUMBER0
-S, --serial NUMBER0configure update serial number
-u, --software-url URL下载地址
hbbrdefaultfor
-k, --key KEY
-p,--port NUMBER21117
# rmem
# 52428800
sysctl net.core.rmem_max

参考