Self-Hosted TeamViewer Alternative: How to Deploy a Private RustDesk Server and Client on Linux VPS?

Giteqa

Greetings, friends!

Over recent years, remote desktop tools like TeamViewer and AnyDesk have tightened their corporate policies, introduced free usage limits, and restricted access across various regions. For system administrators, developers, and businesses, this serves as a clear signal to transition toward self-hosted solutions.

Today, I want to talk about one such solution: RustDesk. It is a modern, open-source alternative to TeamViewer written in Rust. It allows you to deploy a private Signal and Relay server directly on your VPS, granting you full control over network traffic, end-to-end encryption, and instant remote desktop access across any operating system (Windows, macOS, Linux, Android, iOS).

In this guide, we will examine the RustDesk architecture, configure a private Relay server on a Linux VPS using Docker, step-by-step install the client application on Ubuntu 26.04, and demonstrate how to connect to Ubuntu via RustDesk from a Windows PC.

 Key Takeaways: Core Conclusions

  • Total Privacy & Security: All graphical traffic and input handling are routed through your personal VPS. No third-party vendors can access your remote sessions, and all data is secured using Ed25519 encryption.

  • Low Latency & High Speed: Hosting your signal and relay servers on a VPS located in a nearby data center eliminates the frustrating delays typical of overloaded public AnyDesk/TeamViewer relay nodes. Reduced latency directly improves responsiveness.

  • Cross-Platform without Subscriptions: The RustDesk client runs natively across all major platforms (Windows, macOS, Linux, Android, iOS) without licensing fees or session time limits.

  • Streamlined Linux VPS Installation: Running the desktop client on a server with a graphical user interface (GUI) requires only a few terminal commands and the libfuse2 library.

Personal Experience: How I Integrated RustDesk Server into My Workflow

"I previously relied on various RDP and remote access tools to connect to my Ubuntu server, but almost every solution introduced friction that impacted my work productivity. Heavy system overhead was the most frustrating factor. However, I decided to switch to RustDesk and have been using it ever since.

The result: interface response time is minimal and extremely smooth, file transfer between Linux and Windows works seamlessly, and most importantly, I have absolute certainty that sensitive administrative sessions do not pass through third-party proxy nodes. Everything is under my direct control, making it maximally secure."

— Anatolie Cohaniuc

Architecture of a Private RustDesk Infrastructure

A self-hosted RustDesk deployment relies on two key components (services or Docker containers):

  1. hbbs (RustDesk ID / Rendezvous Server): The signaling server. It manages client registrations, assigns unique IDs, and establishes direct peer-to-peer (P2P) connections between devices.

  2. hbbr (RustDesk Relay Server): The traffic relay server. It routes traffic when direct P2P connections are obstructed by NAT or strict firewalls.

Part 1. Step-by-Step Installation Guide for RustDesk Server via Docker

Deploying your private RustDesk server on a virtual private server (Ubuntu/Debian) takes under 5 minutes using Docker.

Step 1: Open Firewall Ports Ensure the following ports are open on your VPS firewall to allow proper communication:

Port / ProtocolPurpose
21115/tcpInternal system calls for hbbr / hbbs
21116/tcp, 21116/udpPrimary P2P signaling and NAT hole punching
21117/tcpTraffic Relay Server (hbbr)
21118/tcp, 21119/tcpWeb client support (optional)

If you are using UFW, enable access using these commands:

Bash
sudo ufw allow 21115/tcp
sudo ufw allow 21116/tcp
sudo ufw allow 21116/udp
sudo ufw allow 21117/tcp
sudo ufw allow 21118/tcp
sudo ufw allow 21119/tcp

Step 2: Installing dependencies and the RustDesk Client Execute the following commands in sequence to install dependencies and deploy the RustDesk .deb package on Ubuntu:

Bash
# Install required dependencies
sudo apt update && sudo apt install -y wget libfuse2

# Download the official RustDesk .deb package
wget https://github.com/rustdesk/rustdesk/releases/download/1.3.8/rustdesk-1.3.8-x86_64.deb

# Install the RustDesk client
sudo apt install -y ./rustdesk-1.3.8-x86_64.deb

After running these commands, open your Linux desktop environment (GUI) to view your connection ID, enter your private server IP and Key under settings, and accept incoming connections.

Video Installation & Connection Tutorial

We filmed a detailed video tutorial walking through the complete setup process and demonstrating a live connection to Ubuntu from a Windows 11 machine:

FAQ: Frequently Asked Questions

  • What VPS specs are required to host a RustDesk Server? RustDesk is extremely resource-efficient. An entry-level VPS with 1 vCPU, 1 GB RAM, and 10 GB NVMe storage easily handles dozens of concurrent active sessions.

  • What should I do if connections fail when the public Key is omitted? If authentication is enforced on hbbs, client connections without a matching server public Key will be rejected. Requiring key verification protects your relay server against unauthorized third-party bandwidth usage.

  • Can RustDesk Server run on a dynamic IP address? Yes. You can use a DDNS provider (such as Cloudflare DDNS or DuckDNS) and supply your domain name in parameter flags (e.g., -r your_domain.com:21117) instead of a static IP.

  • How do I configure a permanent access password on a Linux VPS? Inside the RustDesk application window on your server, click the gear/settings icon next to the Password field and select Set permanent password. This permits unattended remote access without requiring manual temporary confirmation.

Conclusion

Deploying your own RustDesk server and client is the definitive choice for professionals seeking a stable, independent, and secure remote desktop access setup. It frees you from commercial restrictions, session drops, and vendor lock-in while placing complete traffic control in your hands.

The primary requirement for smooth desktop streaming is a low-latency network connection and a stable VPS infrastructure.

If you are looking to host a private RustDesk server or remote administration platform, explore NVMe Cloud VPS options from MivoCloud. Powered by pure KVM virtualization, dedicated hardware resources, high-speed Enterprise NVMe drives, and 1 Gbps+ network ports, MivoCloud guarantees flawless remote desktop performance 24/7.


Article Author: Anatolie Cohaniuc