RustDesk Remote Desktop Self-Hosted Server
Timeline
2025-03-14
- init
After using ToDesk for a few days, since it was not shut down(I prefer to leaving the computer open), the free quota was used up in the middle of the month, and I could no longer continue using it for free. I uninstalled it and switched to RustDesk, it really astonished me, using Self-host, which is free and offers much higher frame rates and resolution than ToDesk’s free version. Below is the setup log.
Basic Environment Setup
I am using two Windows (win10) and one Ubuntu (with the configuration shown below). The Ubuntu server acts as the ID/relay server, allowing one Windows machine to connect to another. Ubuntu needs Docker installed, and both Windows machines need to install RustDesk and perform some configuration.
My three machines are all in the same local area network (LAN)
Installing Docker and Docker Compose Plugin
Reference:
Once installation is complete, add the current user to the Docker group:
1 | # Add docker user group, it should already exist |
docker-compose.yaml
Reference the official documentation:
If you have ufw enabled, you need to open these ports:
1 | sudo ufw status |
Choose a directory to store the ID/relay server data:
1 | mkdir -p ~/rustdesk |
Here is the docker-compose.yaml file from the official RustDesk documentation:
1 | services: |
Then start it.
1 | docker compose up -d |
Installing and Configuring RustDesk
Installation reference:
After installation, open the network settings and enter the IP address of the ID/relay server, which is the server running Docker. The controlled machine does not need to enter the relay server, but it’s recommended for the controlling machine to do so. Then, the controlling machine should enter the key (the contents of the .pub file in the data folder above).
Finally, enter the controlled machine’s ID and password to connect.

