Docker自建Rustdesk服务器
配置docker-compose.yaml
新建一个rustdesk目录
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 此处填写你的公网IP:21117 -k _
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 -k _
volumes:
- ./data:/root
networks:
- rustdesk-net
restart: unless-stopped
启动
打开服务器端口
启动服务
docker compose up -d
配置文件提前设置了加密
查看公钥文件
cd rustdeks/data
ls
cat id_id_ed25519.pub
复制显示的公钥
使用
进入到设置网络
将服务器的IP填到ID服务器中
将复制的公钥填到Key中