Special Offers: Up to 75% OFF on Hostinger & High-RAM Contabo Cloud VPS available this month.Compare Plans

How to Self-Host RustDesk Remote Desktop Server on Contabo VPS (TeamViewer Alternative)

Alex Vance
Alex VanceCloud Infrastructure Architect
November 01, 2026
•
15 min read
•
4.8 / 5.0
Transparency Notice: This article contains affiliate links to hosting providers like Hostinger and Contabo. If you purchase through our links, we may earn a commission at zero extra cost to you. We only recommend products we personally benchmark and test. Read full disclosure.
How to Self-Host RustDesk Remote Desktop Server on Contabo VPS (TeamViewer Alternative)
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Contabo High-Performance Cloud VPS

Massive 4 vCPU cores, 8GB RAM, and 32TB monthly traffic. Ideal for Linux developers.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe

The Problem with Commercial Remote Desktop Tools

Commercial remote desktop tools like TeamViewer and AnyDesk have become increasingly frustrating for IT administrators and developers, imposing aggressive "Commercial Use Detected" timeouts, rising subscription rates, and privacy concerns. RustDesk is an open-source, self-hosted remote desktop software written in Rust that delivers smooth 60 FPS desktop streaming with end-to-end encryption.

Step 1: Deploying RustDesk ID and Relay Servers with Docker

RustDesk consists of two core components: hbbs (ID/rendezvous server) and hbbr (relay server). Create a dedicated directory on your Contabo VPS:

mkdir -p ~/rustdesk && cd ~/rustdesk
nano docker-compose.yml
services:
  hbbs:
    image: rustdesk/rustdesk-server:latest
    container_name: hbbs
    command: hbbs -r YOUR_CONTABO_IP:21117 -k _
    volumes:
      - ./data:/root
    network_mode: host
    restart: always

  hbbr:
    image: rustdesk/rustdesk-server:latest
    container_name: hbbr
    command: hbbr -k _
    volumes:
      - ./data:/root
    network_mode: host
    restart: always

Launch the relay containers:

docker compose up -d

Step 2: Opening Required Firewall Ports in UFW

RustDesk requires specific TCP and UDP ports for NAT traversal and encrypted streaming:

sudo ufw allow 21115:21119/tcp comment "RustDesk TCP"
sudo ufw allow 21116/udp comment "RustDesk UDP"
sudo ufw reload

Step 3: Obtaining Your Server Public Encryption Key

RustDesk generates a cryptographic public key in ./data/id_ed25519.pub:

cat ~/rustdesk/data/id_ed25519.pub

Step 4: Configuring Desktop and Mobile Clients

Download the free RustDesk client on your Windows, macOS, Linux, or Android device. Navigate to Settings -> Network -> ID/Relay Server:

  • ID Server: YOUR_CONTABO_IP
  • Relay Server: YOUR_CONTABO_IP:21117
  • Key: Paste the contents of your id_ed25519.pub key.

Your client will immediately show a green status light: Ready. You can now establish high-speed, encrypted remote desktop connections globally with zero third-party intermediaries.

Editorial Verdict: Pros & Cons

What We Love (Pros)

  • Replace expensive TeamViewer ($50+/mo) and AnyDesk subscriptions with your own private server
  • End-to-end cryptographic encryption guarantees no third party can eavesdrop on desktop sessions
  • Zero connection timeouts, commercial use warnings, or bandwidth throttling
  • Contabo VPS provides low latency and unlimited monthly bandwidth across US and EU nodes

Drawbacks (Cons)

  • Requires opening multiple custom TCP/UDP ports in your server firewall
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Deploy Your Contabo Cloud Server

Includes 4 vCPU Cores, 8GB RAM, 50GB NVMe SSD, and 32TB Outbound Traffic.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe
#RustDesk#Remote Desktop#TeamViewer Alternative#Contabo VPS#Self-Hosted
Alex Vance

Written by Alex Vance

Cloud Infrastructure Architect

Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.

Recommended Next Reads