Find a server you already have with sufficient memory and other resources.
Using Docker Images to Quickly Start Services on the Server
Refer to: https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/docker/
Step 1: Configure Service Ports
[root@awesome-choice-2 Download]# cat firewallConfig.sh
firewall-cmd --zone=public --add-port=21114/tcp --permanent
firewall-cmd --zone=public --add-port=21115/tcp --permanent
firewall-cmd --zone=public --add-port=21116/tcp --permanent
firewall-cmd --zone=public --add-port=21116/udp --permanent
firewall-cmd --zone=public --add-port=21118/tcp --permanent
firewall-cmd --zone=public --add-port=21117/tcp --permanent
firewall-cmd --zone=public --add-port=21119/tcp --permanent
firewall-cmd --reload
[root@awesome-choice-2 Download]# bash firewallConfig.sh
success
success
success
success
success
success
success
success
Step 2: Pull the Docker Image
[root@awesome-choice-2 Download]# sudo docker image pull rustdesk/rustdesk-server
Using default tag: latest
latest: Pulling from rustdesk/rustdesk-server
9e455e83a929: Pull complete
cf1dc9594c7d: Pull complete
4f3b5a2b0508: Pull complete
Digest: sha256:680f8ba5accafc264d15076f33a6fdb9cb6f4d963a0fc92e01023ca0e919cc83
Status: Downloaded newer image for rustdesk/rustdesk-server:latest
docker.io/rustdesk/rustdesk-server:latest
Step 3: Start Containers
Simple startup commands:
sudo docker run --name hbbs -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbs
sudo docker run --name hbbr -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbr
[root@awesome-choice-2 Download]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
rustdesk/rustdesk-server latest 9227b43758be 6 weeks ago 12.8MB
hello-world latest 74cc54e27dc4 6 weeks ago 10.1kB
Step 4: Check Containers
[root@awesome-choice-2 Download]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
320bea0bd027 rustdesk/rustdesk-server "hbbr" 18 minutes ago Up 18 minutes hbbr
57f130718a96 rustdesk/rustdesk-server "hbbs" 18 minutes ago Up 18 minutes hbbs
Step 5: Stop and Remove Containers
Stop containers:
[root@awesome-choice-2 Download]# docker stop 320bea0bd027 57f130718a96
320bea0bd027
57f130718a96
Remove containers:
[root@awesome-choice-2 Download]# docker rm 320bea0bd027 57f130718a96
320bea0bd027
57f130718a96
Step 6: Start Containers with Configuration File
Using the official docker-compose.yml
:
[root@awesome-choice-2 Download]# docker-compose -f docker-compose.yml up
[+] Running 2/1
✔ Container hbbr Created 0.1s
✔ Container hbbs Created 0.1s
Attaching to hbbr, hbbs
hbbr | [2025-03-10 08:30:00.783374 +00:00] INFO [src/relay_server.rs:61] #blacklist(blacklist.txt): 0
hbbr | [2025-03-10 08:30:00.783436 +00:00] INFO [src/relay_server.rs:76] #blocklist(blocklist.txt): 0
hbbr | [2025-03-10 08:30:00.783446 +00:00] INFO [src/relay_server.rs:82] Listening on tcp :21117
Client Configuration
Follow Section 2: Manual Config in Client Configuration Guide:
- Fill in the ID Server and Key in the RustDesk client.
- Export and import server settings between clients:
Use the steps above to configure RustDesk Client on a Device.
Using the above machine, go to Settings > Network, and unlock the settings.
Click "Export Server Config".
Paste the copied string into a text editor (e.g., Notepad).
On the new client, copy the configuration string.
Go to Settings > Network in the RustDesk client, unlock the settings, and click "Import Server Config".
The settings will be automatically pasted.
Click "Apply".
