How to Install RustDesk Remote Desktop Server on Rocky Linux 10

RustDesk is a fast, secure, and open-source remote desktop application that supports multiple platforms. It features end-to-end encryption, file transfer, a modern UI, and easy setup, making it ideal for both personal and enterprise use.

Prerequisites

  • Rocky Linux 10 server
  • Domain name pointed to the server
  • Docker and Docker Compose installed
  • Sudo user with SSH access

Install Docker

Update the system and install Docker:

dnf update -y
dnf install -y yum-utils nano
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce docker-ce-cli containerd.io
systemctl start docker
systemctl enable docker

Install Docker Compose

dnf install -y curl
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo dnf install libxcrypt-compat
sudo dnf install docker-compose-plugin
docker-compose --version

Set Up RustDesk Server

Create Directory

mkdir -p /opt/rustdesk
cd /opt/rustdesk

Create Docker Compose File

vi rustdesk.yml

Paste the following configuration:

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 127.0.0.1:21117 -k _
    volumes:
      - ./hbbs:/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 -k _
    volumes:
      - ./hbbr:/root
    networks:
      - rustdesk-net
    restart: unless-stopped

Save and exit the file.

Start RustDesk Containers

docker-compose -f rustdesk.yml up -d
docker ps

Configure Nginx Reverse Proxy

Install Nginx

dnf install -y nginx

Configure Firewall

firewall-cmd --permanent --add-service=http
firewall-cmd --reload

Create Nginx Configuration

vi /etc/nginx/conf.d/rust.yourdomain.com.conf

Replace rust.yourdomain.com with your actual domain:

server {
    listen 80;
    listen [::]:80;

    server_name rust.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:21117;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Save and exit.

View RustDesk Public Key

cat /opt/rustdesk/hbbs/id_ed25519.pub

Example output:

WfgvfV002mcFRevj205Fd+3vEEEWpeHlcL3xAXnAxJ4=

Secure Nginx with Let's Encrypt SSL

Enable EPEL and Install Certbot

dnf install -y epel-release
dnf install -y certbot python3-certbot-nginx

Obtain SSL Certificate

Replace the domain with your actual domain:

certbot --nginx -d rust.yourdomain.com

Verify and Reload Nginx

nginx -t
systemctl reload nginx

Configure RustDesk Client

  1. Download and install RustDesk from https://rustdesk.com.
  2. Open the client and go to Settings > ID/Relay Server.
  3. Set:
    • ID Server to: rust.yourdomain.com
    • Key to: your server’s public key
  4. Save the configuration.

Test the Setup

  1. Launch RustDesk on the client.
  2. Input the remote machine’s ID.
  3. Click Connect to establish a secure remote session.

Conclusion

You have successfully installed and configured the RustDesk Remote Desktop Server on Rocky Linux 10, secured with Docker, Nginx, and SSL. This setup provides private, encrypted remote access with a user-friendly interface and no third-party dependency.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS