RustDesk Server with Docker

Version: 25.6.01

RustDesk is a free, open-source remote desktop tool — similar to TeamViewer or AnyDesk — that allows secure remote access and support between devices. Unlike proprietary solutions, RustDesk allows you to host your own server, giving you full privacy and data control.

🔍 What is RustDesk?
  • Cross-platform: Windows, macOS, Linux, Android, iOS
  • End-to-end encrypted
  • Uses a public server by default – but can also be self-hosted
  • Written in Rust, making it fast and resource-efficient

🛠️ Everyday Use Cases

  • Remote support for family PCs (e.g., helping grandparents with computer issues)
  • IT support in companies – without expensive license models
  • Accessing your own PC while on the go
  • Self-hosted control over privacy and security
  • Managing and developing servers via GUI access

Advantages over Commercial Solutions

RustDeskCommercial Providers
Open SourceClosed Source
Self-hosted ServerProvider-hosted Cloud
Free to UseLicense Fees
No Account RequiredRegistration Required
🔧 Requirements
  • A Linux server or VPS (Ubuntu recommended)
  • Docker & Docker Compose installed
  • A public IP
  • Open ports: 21115–21119 TCP and 21115+21116 UDP

We start and log in to the server:

Navigate to your Docker project folder, which in my case is located under /home/.

A folder named “rustdesk” is created:

And then navigated into:

📁 Now let’s focus on the RustDesk server and create the following file inside the /home/rustdesk folder:

We insert the following content into the file and save it:

⚠️ IMPORTANT: VPS-IP = This is the IP address of your VPS server. Make sure to replace it accordingly.

We start the RustDesk server with:

Now let’s take a look at the public key:

After that:

We now see the public key in the file, which the clients need in order to connect to the RustDesk server:

here: Screenshot of the RustDesk Software on Windows (Network Settings)

Firewall settings:
Ports 21115 to 21119 are opened for TCP.
Additionally, ports 21115 and 21116 are also opened for UDP.

What have we accomplished in this tutorial?

  • Set up your own RustDesk server for remote support (Client software: https://rustdesk.com)
  • Secured with end-to-end encryption
  • Configured the firewall to allow required ports (on your VPS or via UFW)

All done! 😊


bc1q8dxp9mlt3mkvaklu2vn8j6jteqyv53kschc90v

Lightning: itsc@strike.me

Leave a Reply

Your email address will not be published. Required fields are marked *