docker 自建rustdesk服务器测试

参考https://blog.csdn.net/tootsy_you/article/details/130010564

注意:

docker-compose.yml

version: '3'

networks:
  rustdesk-net:
    external: false

services:
  hbbs:
    container_name: hbbs
    ports:
      - 21115:21115
      - 21116:21116
      - 21116:21116/udp
      - 21118:21118
    image: rustdesk/rustdesk-server:latest
    command: hbbs -r 10.73.30.241:21117
    volumes:
      - ./data:/root
    networks:
      - rustdesk-net
    depends_on:
      - hbbr
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    ports:
      - 21117:21117
      - 21119:21119
    image: rustdesk/rustdesk-server:latest
    command: hbbr
    volumes:
      - ./data:/root
    networks:
      - rustdesk-net
    restart: unless-stopped

起动

kt@kt4028:~/rustdesk$ docker compose up -d
WARN[0000] /home/kt/rustdesk/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Running 3/3
 ✔ Network rustdesk_rustdesk-net  Creat...                                 0.1s 
 ✔ Container hbbr                 Started                                  0.3s 
 ✔ Container hbbs                 Started                                  0.6s 
kt@kt4028:~/rustdesk$ docker ps -a
CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS                    PORTS                                                                                                                                                                 NAMES
996219c21c99   rustdesk/rustdesk-server:latest   "hbbs -r 10.73.30.24..."   20 seconds ago   Up 19 seconds             0.0.0.0:21115-21116->21115-21116/tcp, :::21115-21116->21115-21116/tcp, 0.0.0.0:21118->21118/tcp, :::21118->21118/tcp, 0.0.0.0:21116->21116/udp, :::21116->21116/udp   hbbs
ac9ef80c7ad9   rustdesk/rustdesk-server:latest   "hbbr"                   20 seconds ago   Up 19 seconds             0.0.0.0:21117->21117/tcp, :::21117->21117/tcp, 0.0.0.0:21119->21119/tcp, :::21119->21119/tcp               

查看密码

kt@kt4028:~/rustdesk$ docker logs hbbs
[2025-01-12 08:13:33.181897 +00:00] INFO [src/common.rs:122] Private key comes from id_ed25519
[2025-01-12 08:13:33.181918 +00:00] INFO [src/rendezvous_server.rs:1205] Key: CV6jEZIB3HDnAbUPwtbdzrMzzZF6yxbaBuSlAUR5pNQ=
[2025-01-12 08:13:33.181924 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
[2025-01-12 08:13:33.183226 +00:00] INFO [src/rendezvous_server.rs:99] serial=0
[2025-01-12 08:13:33.183246 +00:00] INFO [src/common.rs:46] rendezvous-servers=[]
[2025-01-12 08:13:33.183251 +00:00] INFO [src/rendezvous_server.rs:101] Listening on tcp/udp :21116
[2025-01-12 08:13:33.183256 +00:00] INFO [src/rendezvous_server.rs:102] Listening on tcp :21115, extra port for NAT test
[2025-01-12 08:13:33.183261 +00:00] INFO [src/rendezvous_server.rs:103] Listening on websocket :21118
[2025-01-12 08:13:33.183321 +00:00] INFO [libs/hbb_common/src/udp.rs:36] Receive buf size of udp [::]:21116: Ok(212992)
[2025-01-12 08:13:33.183434 +00:00] INFO [src/rendezvous_server.rs:138] mask: None
[2025-01-12 08:13:33.183448 +00:00] INFO [src/rendezvous_server.rs:139] local-ip: ""
[2025-01-12 08:13:33.183464 +00:00] INFO [src/common.rs:46] relay-servers=["10.73.30.241:21117"]
[2025-01-12 08:13:33.183586 +00:00] INFO [src/rendezvous_server.rs:153] ALWAYS_USE_RELAY=N
[2025-01-12 08:13:33.183606 +00:00] INFO [src/rendezvous_server.rs:185] Start
[2025-01-12 08:13:33.183684 +00:00] INFO [libs/hbb_common/src/udp.rs:36] Receive buf size of udp [::]:0: Ok(212992)
kt@kt4028:~/rustdesk$ 

无头运行本地ubuntu,被控端

rustdesk --start-service

根据提示。一次不行就再启动一次。被控制端ubuntu。

控制端win

成功

这会好了。在局网中可自由了。

相关推荐
love静思冥想37 分钟前
在 CentOS/Red Hat Linux 中安装 Docker
linux·docker·centos
王军新42 分钟前
CentOS下安装Docker
docker
我的ID配享太庙呀1 小时前
计科高可用服务器架构实训(防火墙、双机热备,VRRP、MSTP、DHCP、OSPF)
运维·服务器·开发语言·网络·web安全·架构·云计算
KeyPan1 小时前
【Ubuntu与Linux操作系统:三、用户与组管理】
linux·运维·服务器·算法·ubuntu
KeyPan1 小时前
【Ubuntu与Linux操作系统:八、Ubuntu桌面应用】
linux·运维·服务器·pytorch·ubuntu·机器学习
wxuejunzi2 小时前
docker中jenkins流水线式部署GitLab中springboot项目
spring boot·docker·jenkins
庄小焱2 小时前
Mac——Docker desktop安装与使用教程
macos·docker·容器
x66ccff3 小时前
️ 如何将 Julia 包切换为本地开发版本?以 Reactant 为例
linux·服务器·julia
想做富婆3 小时前
linux: 文本编辑器vim
linux·运维·服务器
我曾经是个程序员3 小时前
C#中收发QQ邮箱电子邮件
服务器·前端·c#