Skip to content

Self-host RustDesk

updated Oct 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Oct 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

An open-source remote-desktop app (a TeamViewer/AnyDesk-style tool) plus the self-hostable ID/rendezvous server (hbbs) and relay (hbbr) behind it. Running your own pair means clients register and relay through your VPS instead of RustDesk's public servers; the free OSS server has no web console, accounts or address book (those are RustDesk Server Pro).

Key facts

LicenseAGPL-3.0
StackRust, Flutter
Min RAM256 MB
Official imageyes
Measured idle RAM3 MB
Difficulty
Our recommendation

Pick RustDesk when you want TeamViewer- or AnyDesk-style remote desktop access without sending your sessions through someone else's servers: run the free hbbs (ID/rendezvous) and hbbr (relay) pair on a small VPS and point the RustDesk clients at it. Despite sitting in the VPN & mesh category, it is not a VPN — it relays remote-desktop sessions, not network traffic; for that, look at Headscale or NetBird instead.

What you need

  • Any VPS with at least 256 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# RustDesk Server OSS (hbbs + hbbr) — official image pinned to the latest release, host networking as the docs recommend on Linux
mkdir -p ~/rustdesk && cd ~/rustdesk
cat > compose.yml <<'EOF'
services:
  hbbs:
    container_name: hbbs
    image: rustdesk/rustdesk-server:1.1.16
    command: hbbs
    volumes:
      - ./data:/root
    network_mode: host
    depends_on:
      - hbbr
    restart: unless-stopped
  hbbr:
    container_name: hbbr
    image: rustdesk/rustdesk-server:1.1.16
    command: hbbr
    volumes:
      - ./data:/root
    network_mode: host
    restart: unless-stopped
EOF
docker compose up -d
# open TCP 21115-21117 and UDP 21116 (21118/21119 only for the web client, behind a reverse proxy)
sleep 5 && cat data/id_ed25519.pub
# in each RustDesk client: ID server = SERVER_IP, Key = the public key printed above

What you take on

The open-source server is deliberately small, and upstream is open about where the paid edition starts:

non-negotiableThe free server has no web console — upstream lists the web console port (21114) as "only available in Pro version" — and the docs file accounts, access control and the address book under RustDesk Server Pro, a separate paid product.
non-negotiableClients do not trust your server automatically. Each one needs your server's address as its ID server and the public key from data/id_ed25519.pub entered in its network settings; lose or regenerate that key and every client must be reconfigured.
non-negotiableOpen TCP 21115-21117 and UDP 21116 on the server. Ports 21118 and 21119 serve the web client only, and upstream warns that hbbs and hbbr trust the X-Real-IP header on those WebSocket ports, so anyone who can reach them directly can spoof an IP — leave them closed, or put a reverse proxy in front.
non-negotiableUpstream recommends host networking (network_mode: host) on Linux so the server sees real client addresses; that means the containers bind these ports directly on the host rather than through Docker's port mapping.
non-negotiableIt is AGPL-3.0: network-copyleft terms apply if you modify the server and offer it to others as a service.

More in VPN & Mesh Networking

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.