How to Install RustDesk Remote Desktop Server on Ubuntu 25.10

RustDesk is a free, open-source remote desktop application that supports multiple platforms like Windows, macOS, Linux, iOS, and Android. It provides secure end-to-end encryption, smooth performance, and an easy setup with minimal configuration. RustDesk also supports file transfer and a user-friendly interface, making it ideal for both personal and business use.

Prerequisites

Before starting, ensure the following:

  • Ubuntu 25.10 server deployed (e.g., on Vultr, CrownCloud, or similar)
  • A domain or subdomain pointing to your server
  • Docker and Docker Compose installed
  • SSH access as a sudo user

Install Docker

If Docker is not already installed, run the following commands:

apt update
apt install -y docker.io
systemctl start docker
systemctl enable docker

Next, install Docker Compose:

curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version

Install RustDesk Server

Create a directory for RustDesk files:

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

Create Docker Compose configuration:

nano rustdesk.yml

Add the following configuration to the file:

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 close the file (Ctrl + O, Enter, Ctrl + X).

Start the RustDesk containers:

docker-compose -f rustdesk.yml up -d

Output:

root@server:/opt/rustdesk# docker-compose -f rustdesk.yml up -d
WARN[0000] /opt/rustdesk/rustdesk.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 5/5
 ✔ hbbs Pulled                                                             2.4s
 ✔ hbbr Pulled                                                             2.4s
   ✔ 9e455e83a929 Pull complete                                            0.7s
   ✔ cf1dc9594c7d Pull complete                                            0.9s
   ✔ 4f3b5a2b0508 Pull complete                                            0.9s
[+] Running 3/3
 ✔ Network rustdesk_rustdesk-net  Creat...                                 0.2s
 ✔ Container hbbr                 Started                                  0.8s
 ✔ Container hbbs                 Started                                  1.4s

Verify containers are running:

docker ps

Output:

root@server:/opt/rustdesk# docker ps
CONTAINER ID   IMAGE                             COMMAND                  CREATED              STATUS              PORTS                                                                                                                                                                       NAMES
d5b872220b99   rustdesk/rustdesk-server:latest   "hbbs -r 127.0.0.1:2…"   About a minute ago   Up About a minute   0.0.0.0:21115-21116->21115-21116/tcp, [::]:21115-21116->21115-21116/tcp, 0.0.0.0:21118->21118/tcp, [::]:21118->21118/tcp, 0.0.0.0:21116->21116/udp, [::]:21116->21116/udp   hbbs
b03247a3c28b   rustdesk/rustdesk-server:latest   "hbbr -k _"              About a minute ago   Up About a minute   0.0.0.0:21117->21117/tcp, [::]:21117->21117/tcp, 0.0.0.0:21119->21119/tcp, [::]:21119->21119/tcp                                                                            hbbr

Secure the Server with Nginx

Install Nginx:

apt install -y nginx

Configure Firewall:

ufw allow 80/tcp
ufw enable
ufw reload

Create Nginx configuration file:

nano /etc/nginx/conf.d/rust.domainhere.info.conf

Add the following content (replace rust.domainhere.info with your actual domain):

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

    server_name rust.domainhere.info;

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

Test and restart Nginx:

nginx -t
systemctl restart nginx

View RustDesk Server Public Key

RustDesk uses encryption keys for secure connections. To view your server’s public key:

cat /opt/rustdesk/hbbs/id_ed25519.pub

Output:

kKXp1RaSJZBmRPMTjyZGeWt0SEXGaWiOan48FCDm+3w=root@server:/opt/rustdesk#

Secure Nginx with SSL (Let's Encrypt)

Install Certbot:

apt install -y certbot python3-certbot-nginx

Obtain and configure SSL certificate:

certbot --nginx -d rust.domainhere.info

Follow the prompts to complete SSL installation.

Verify Nginx configuration:

nginx -t
systemctl reload nginx

Configure RustDesk Client

  1. Download the RustDesk client from the official website.
  2. Install and open the client.
  3. Go to Settings → ID/Relay Server.
  4. In ID Server, enter your domain (e.g., rust.domainhere.info).
  5. In Key, paste the server’s public key.
  6. Save settings and connect.

Test the RustDesk Server

  1. Install the RustDesk client on your local computer.
  2. Open and configure it with your server details (domain + key).
  3. Enter the remote machine’s ID.
  4. Click Connect to establish a secure session.

You now have a fully functional and secure RustDesk Remote Desktop Server running on Ubuntu 25.10, with HTTPS protection and end-to-end encryption.


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