docker compose 部署 RustDesk 远程桌面

官方文件

自部署文档

客户端下载地址

创建数据挂载目录

mkdir data

编写docker-compose.yml文件


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

启动服务

docker compose up -d

查看日志中打印的链接秘钥

docker compose logs 

开放端口

需要开放的端口:

21114-21119
hbbs:
  21114 (TCP): used for web console, only available in Pro version.
  21115 (TCP): used for the NAT type test.
  21116 (TCP/UDP): Please note that 21116 should be enabled both for TCP and UDP. 21116/UDP is used for the ID registration and heartbeat service. 21116/TCP is used for TCP hole punching and connection service.
  21118 (TCP): used to support web clients.
hbbr:
  21117 (TCP): used for the Relay services.
  21119 (TCP): used to support web clients.

评论已关闭