docker部署RustDesk自建服务器
客户端:
Releases · rustdesk/rustdesk · GitHub
服务端:
项目官方地址:GitHub - rustdesk/rustdesk-server: RustDesk Server Program
1、拉取RustDesk库
docker pull rustdesk/rustdesk-server:latest
阿里云库:
docker pull crpi-k5k93ldwfc7o75ip.cn-hangzhou.personal.cr.aliyuncs.com/rustdesk-su/rustdesk:latest
2、创建一个rustdesk文件,进入rustdesk文件
mkdir rustdesk && cd rustdesk
3、在该目录下创建docker-compose.yml的配置文件
vim docker-compose.yml
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 rustdesk.example.com: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
把rustdesk.example.com换成自己服务器的IP地址即可。
4、配置完成后,运行docker-compose up -d启动配置文件。
5、然后防火墙打开UDP端口21116和TCP端口21116-21118。
6、客户端上配置服务器网络
查看日志 docker-compose logs -f 可以查看到key