RustDesk is my favorite remote desktop tool which is the best alternative to any closed-source solutions, such as TeamViewer and Anydesk. It’s kinda like Bitwarden in the post-breach era of the cloud password manager (LastPass/1Password) market.
As a light user of RustDesk, I use it only occasionally. So I didn’t setup my own RD server on VPS even though I suppose to.
For some reason, one of my RustDesk client got blocked to the official servers. So now I have enough reason to properly making it up.
First, login to my CentOS server via mRemoteNG and perform a sudo yum update
since it has been forever.
Docker has been installed already with:
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install docker-ce docker-ce-cli containerd.io docker compose-plugin
systemctl --now enable docker
Download official docker repo using git clone https://github.com/rustdesk/rustdesk-server.git && cd rustdesk-server
The docker-compose.yml
looks better than what they have on their document.
Use docker compose up -d
to run it, docker ps -a
or docker compose logs -f
to check.
Open up ports with:
firewall-cmd --permanent --add-port=21115-21119/tcp
firewall-cmd --permanent --add-port=21116/udp
firewall-cmd --reload
Then copy the key file content with nano ./data/id_ed25519.pub
inside the repo folder.
Now, go to the clients: Settings
- Network
- ID/Relay server
, pasting the domain/IP of VPS and the key content accordingly. (There is also an optional checkbox for always connect via relay
inside each remote ID card’s 3-dots.)
Upon connection, use watch -n 1 "ss -tup | grep rustdesk"
to monitor the network uasges, then I can see port 2111*
is being using by rustdesk process. For Windows, netstat -an
would do it too.