目录

「RustDesk」一切尽在老夫掌握之中

记录自建开源远程桌面工具 RustDesk 过程。

部署

当前采用 Docker 容器部署方案,相关配置参考如下:

services:
  hbbs:
    image: rustdesk/rustdesk-server:1.1.16
    container_name: rustdesk.hbbs
    restart: unless-stopped
    command: hbbs
    ports:
      - "21115:21115/tcp"
      - "21116:21116/tcp"
      - "21116:21116/udp"
    volumes:
      - /path/to/your/rustdesk/data:/root
    depends_on:
      - hbbr
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 256M
        reservations:
          memory: 32M

  hbbr:
    image: rustdesk/rustdesk-server:1.1.16
    container_name: rustdesk.hbbr
    restart: unless-stopped
    command: hbbr
    ports:
      - "21117:21117/tcp"
    volumes:
      - /path/to/your/rustdesk/data:/root
    deploy:
      resources:
        limits:
          cpus: '1.00'
          memory: 512M
        reservations:
          memory: 32M

步骤:

  1. 创建 docker-compose.yml 文件,并填上如上配置内容
    1. 注意修改挂在路径为实际路径
    2. 当前示例仅映射了最小端口,即 21115~21117,若需支持网页客户端,还需映射 2111821119 端口
    3. 打印并记录 /path/to/your/rustdesk/data 目录下 id_ed25519.pub 文件的内容
  2. 路由器中添加上述端口的 NAT

使用

参考文档博客

  1. 客户端中做如下配置(控制端和受控端均需设置
    1. 设置->网络->解锁网络设置->ID/中继服务器,并填入
      • ID 服务器:部署端公网域名或IP
      • 中继服务器:部署端公网域名或IP
      • Key:部署时记录的 id_ed25519.pub 文件内容
  2. 客户端主页左下角提示就绪即可