How To Install RustDesk on Ubuntu 26.04 LTS

Install RustDesk on Ubuntu 26.04

Remote desktop access remains one of those critical tools that separates functional infrastructure from chaos when servers misbehave at 3 AM. RustDesk has emerged as the open-source alternative that actually delivers on performance without the privacy concerns of proprietary solutions. This guide walks through installing RustDesk on Ubuntu 26.04 LTS with the depth needed for production environments, covering everything from basic client installation to self-hosted server deployment, firewall configuration, and performance tuning that matters in real-world scenarios.

Whether you’re managing a single workstation or orchestrating remote access across a distributed team, getting RustDesk right means understanding not just the commands but the underlying mechanics—why certain dependencies matter, how Wayland affects screen capture, and what happens when NAT traversal fails. The steps below reflect actual production deployment patterns tested across multiple Ubuntu releases.

Understanding RustDesk Architecture Before Installation

RustDesk isn’t just another remote desktop client. It’s built in Rust with a focus on security, performance, and the ability to self-host your own relay infrastructure. The architecture consists of two main components: the client application you install on endpoints, and the server infrastructure (hbbs and hbbr) that handles ID resolution and traffic relay when direct peer-to-peer connections fail.

The client uses modern video codecs including VP8, VP9, and AV1 for efficient screen transmission, with end-to-end encryption via TLS 1.3 protecting all sessions. What sets RustDesk apart from TeamViewer or AnyDesk is the option to run your own server infrastructure, eliminating dependence on third-party relay servers and keeping all connection metadata under your control.

For Ubuntu 26.04 LTS specifically, you’re working with a relatively fresh release that ships with newer kernel versions, updated graphics stacks, and Wayland as the default display server in many desktop environments. This matters because RustDesk’s screen capture mechanisms interact directly with these underlying systems. Understanding this relationship helps troubleshoot issues when they arise—something that happens more often than documentation suggests when dealing with display servers and permissions.

Prerequisites and System Requirements

Before diving into installation commands, verify your Ubuntu 26.04 system meets the baseline requirements. RustDesk is relatively lightweight compared to alternatives, but certain dependencies must be present for proper functionality.

Minimum hardware requirements:

  • 64-bit x86_64 or ARM64 processor
  • 2 GB RAM (4 GB recommended for smooth operation)
  • 500 MB available disk space
  • Network connectivity with outbound access to RustDesk servers (or your self-hosted infrastructure)

Software prerequisites:

  • Ubuntu 26.04 LTS (Noble Numbat or later)
  • sudo privileges or root access
  • X11 or Wayland display server (X11 recommended for full feature compatibility)
  • PulseAudio or PipeWire for audio transmission

Run a quick system audit before proceeding:

# Verify Ubuntu version
cat /etc/os-release

# Check available disk space
df -h /

# Verify display server session
echo $XDG_SESSION_TYPE

# Check available RAM
free -h

The display server check is particularly important. While RustDesk 1.2.0+ introduced experimental Wayland support, X11 remains the most reliable option for full functionality including login screen access. If you’re running Wayland and encounter issues, switching to X11 involves editing /etc/gdm3/custom.conf and setting WaylandEnable=false, then rebooting.

Method 1: Installing RustDesk Client via DEB Package (Recommended)

The DEB package installation method provides the cleanest integration with Ubuntu’s package management system. This approach handles dependencies automatically and makes future updates straightforward through standard apt commands.

Step 1: Update System Packages

Start by ensuring your package repositories are current. This prevents dependency conflicts and ensures you’re pulling the latest compatible library versions.

sudo apt update && sudo apt upgrade -y

This command refreshes the package index and applies any pending security updates. In production environments, consider scheduling this during maintenance windows rather than running upgrades ad-hoc.

Step 2: Install Required Dependencies

RustDesk requires several development and runtime libraries for graphics rendering, audio capture, and system integration. While the DEB package declares these dependencies, pre-installing them ensures a smoother installation process.

sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev \
    libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev \
    libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake build-essential \
    unzip libclang-dev ninja-build libayatana-appindicator3-1 \
    libgstreamer1.0-dev libayatana-appindicator3-dev

This dependency list covers compilation toolchains, X11 libraries for screen capture, audio subsystems, and app indicator support for system tray integration. Missing any of these can result in runtime errors or degraded functionality.

Step 3: Download the Latest RustDesk DEB Package

Rather than hardcoding a version number, use this command to dynamically fetch the latest release tag from GitHub:

VER_TAG=$(curl -s https://api.github.com/repos/rustdesk/rustdesk/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')
wget https://github.com/rustdesk/rustdesk/releases/download/$VER_TAG/rustdesk-$VER_TAG-x86_64.deb

This approach ensures you’re always installing the most recent stable version without manually checking release pages. The VER_TAG variable captures the version string, which then constructs the download URL.

Step 4: Install the DEB Package

With the package downloaded, install it using apt’s local package handling:

sudo apt install -fy ./rustdesk-$VER_TAG-x86_64.deb

The -f flag tells apt to fix broken dependencies automatically, while -y accepts prompts without interaction. During installation, apt resolves and pulls in any remaining dependencies not already present on your system.

If you encounter dependency errors, run:

sudo apt-get install -f

This command attempts to correct any dependency issues that may have occurred during the initial installation attempt.

Step 5: Verify Installation and Launch RustDesk

Confirm the installation succeeded by checking the package status:

dpkg -l | grep rustdesk
systemctl status rustdesk

The first command shows the installed package version, while the second verifies the systemd service is active. RustDesk installs a background service that enables unattended access and handles incoming connection requests.

Launch the application either from your desktop environment’s application menu or via terminal:

rustdesk

On first launch, RustDesk generates a unique ID and displays it prominently in the interface. This ID, along with a temporary or permanent password, enables remote connections from other RustDesk clients.

Method 2: Building RustDesk from Source

Building from source provides maximum control over compilation flags and enables customization for specific hardware or use cases. This method is particularly useful for system administrators who need to audit the build process or apply patches before deployment.

Step 1: Install Rust Toolchain

RustDesk is written in Rust, so you need the Rust compiler and Cargo package manager. The recommended installation method uses rustup, which manages Rust versions and toolchains.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

The first command downloads and executes the rustup installer. The second command sources the environment, making rustc and cargo available in your current shell session. Verify the installation:

rustc --version
cargo --version

Step 2: Clone the RustDesk Repository

Fetch the source code from GitHub with submodules included:

cd ~
git clone https://github.com/rustdesk/rustdesk
cd rustdesk

The repository contains not just the main application code but also submodules for internal libraries and dependencies. Ensure submodules are initialized:

git submodule update --init --recursive

Step 3: Set Up vcpkg for Native Dependencies

RustDesk uses vcpkg, Microsoft’s C++ package manager, to handle native library dependencies like video codecs and compression libraries.

cd ~
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
export VCPKG_ROOT=$HOME/vcpkg

The bootstrap script compiles vcpkg itself. Setting the VCPKG_ROOT environment variable tells the build system where to find it. Install required libraries:

./vcpkg install libvpx libyuv opus

These packages provide VPx video encoding, YUV color space conversion, and Opus audio compression—critical components for efficient remote desktop streaming.

Step 4: Download Sciter Library

RustDesk uses the Sciter GUI framework, which requires a shared library placed in the build output directory:

cd ~/rustdesk
mkdir -p target/debug
wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so
mv libsciter-gtk.so target/debug/

This library handles the graphical interface rendering. Without it, compilation succeeds but the application fails at runtime with missing library errors.

Step 5: Compile and Build

With all dependencies in place, compile RustDesk:

cd ~/rustdesk
export VCPKG_ROOT=$HOME/vcpkg
cargo build --release

The --release flag enables optimizations for production use. Initial compilation takes several minutes as Cargo downloads and compiles all Rust dependencies. The resulting binary appears in target/release/rustdesk.

Run the compiled application:

./target/release/rustdesk

Building from source provides flexibility but requires ongoing maintenance to track upstream changes and security patches. For most production deployments, the DEB package method offers better long-term sustainability.

Method 3: Running RustDesk via AppImage or Flatpak

For environments where system-wide installation isn’t feasible or desired, AppImage and Flatpak provide sandboxed alternatives that don’t require root privileges.

AppImage Installation

AppImage delivers RustDesk as a single executable file containing all dependencies:

# Download the AppImage
VER_TAG=$(curl -s https://api.github.com/repos/rustdesk/rustdesk/releases/latest | grep tag_name | cut -d '"' -f 4)
wget https://github.com/rustdesk/rustdesk/releases/download/$VER_TAG/rustdesk-$VER_TAG-x86_64.AppImage

# Make executable
chmod +x rustdesk-$VER_TAG-x86_64.AppImage

# Install FUSE support (required for AppImage)
sudo apt install -y libfuse2

# Run the AppImage
./rustdesk-$VER_TAG-x86_64.AppImage

AppImage works well for portable deployments or testing different versions without affecting system packages. However, integration with system tray and automatic updates requires additional configuration.

Flatpak Installation

Flatpak provides better desktop integration and sandboxing:

# Add Flathub repository
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

# Install RustDesk
flatpak --user install com.rustdesk.RustDesk

# Launch
flatpak run com.rustdesk.RustDesk

Flatpak’s sandboxing enhances security but may restrict access to certain system resources. If you encounter permission issues with screen capture or audio, check Flatpak overrides:

flatpak override --user --filesystem=xdg-run/pulse
flatpak override --user --socket=pulseaudio
flatpak override --user --socket=x11

Both AppImage and Flatpak methods trade some integration depth for portability and isolation—choose based on your security model and deployment requirements.

Configuring RustDesk for Production Use

Fresh installations work out of the box for basic remote access, but production environments demand additional configuration for security, unattended access, and integration with existing infrastructure.

Setting Up Unattended Access

Unattended access enables connecting to machines without someone physically present to accept the connection. This is essential for server management and after-hours support.

  1. Open RustDesk settings (gear icon)
  2. Navigate to the Security tab
  3. Set a permanent password (distinct from the temporary session password)
  4. Enable “Require password for incoming connections”
  5. Optionally configure access control lists for specific IDs

Store permanent passwords securely—consider using a password manager or secrets management system rather than documenting them in plain text.

Configuring Display Server Settings

Ubuntu 26.04 defaults to Wayland in many desktop environments, but RustDesk’s Wayland support remains experimental as of version 1.2.0. For reliable operation including login screen access, switch to X11:

sudo nano /etc/gdm3/custom.conf

Find and modify this line:

#WaylandEnable=false

Remove the hash to uncomment it:

WaylandEnable=false

Save and reboot. This change affects all users on the system, so coordinate with your team before applying in shared environments.

Network and Firewall Configuration

RustDesk uses specific ports for different connection phases. When running behind firewalls or in cloud environments with security groups, ensure these ports are accessible:

Outbound connections (client initiating):

  • TCP 21115-21117 (signal and relay)
  • UDP 21116 (NAT traversal)

Inbound connections (accepting remote access):

  • Same ports as above

For UFW on Ubuntu:

sudo ufw allow 21115:21117/tcp
sudo ufw allow 21116/udp
sudo ufw reload

Cloud providers like AWS, GCP, and Azure require equivalent security group rules. The exact port range depends on whether you’re using public RustDesk servers or self-hosted infrastructure.

Integrating with System Startup

RustDesk installs a systemd service by default when using the DEB package. Verify it’s enabled:

systemctl is-enabled rustdesk
systemctl status rustdesk

If the service isn’t enabled:

sudo systemctl enable rustdesk
sudo systemctl start rustdesk

This ensures RustDesk runs at boot and remains available for unattended connections. Check logs for troubleshooting:

journalctl -u rustdesk -f

Self-Hosting RustDesk Server Infrastructure

Running your own RustDesk server eliminates dependence on public relay infrastructure and provides full control over connection metadata. This is particularly valuable for organizations with compliance requirements or those operating in air-gapped environments.

Server Requirements and Architecture

RustDesk server infrastructure consists of two services:

  • hbbs (ID/Signal server): Handles peer discovery and connection negotiation on TCP ports 21115-21117
  • hbbr (Relay server): Relays traffic when direct P2P connections fail on TCP 21116-21119 and UDP 21116

Minimum hardware requirements are modest—a basic cloud VPS with 512 MB RAM and a single vCPU handles dozens of concurrent connections. Traffic consumption varies by use case: typical office work generates around 100 KB/s per connection, while high-resolution screen sharing can reach 3 MB/s.

Method 1: Docker Deployment (Recommended)

Docker provides the cleanest deployment path with easy upgrades and consistent environments across different hosts.

# Install Docker if not present
bash <(wget -qO- https://get.docker.com)

# Download compose configuration
wget https://rustdesk.com/oss.yml -O compose.yml

# Start services
sudo docker compose up -d

The compose file configures both hbbs and hbbr with appropriate port mappings and volume persistence. Verify services are running:

sudo docker compose ps
sudo docker compose logs -f

Method 2: Native Systemd Installation

For environments where Docker isn’t available, install directly as systemd services using the community-maintained script:

wget https://raw.githubusercontent.com/techahold/rustdeskinstall/master/install.sh
chmod +x install.sh
./install.sh

This script downloads binaries, creates systemd units, generates configuration files, and even provides a simple web interface for distributing client configurations. After installation, note the ID server address and public key displayed at the end—clients need these to connect to your self-hosted infrastructure.

Firewall Configuration for Self-Hosted Servers

Self-hosted servers require specific firewall rules. For UFW:

sudo ufw allow 21114:21119/tcp
sudo ufw allow 21116/udp
sudo ufw enable

If you plan to use the web client with WebSocket support (ports 21118-21119), implement additional security measures. These ports trust X-Real-IP and X-Forwarded-For headers, making them vulnerable to IP spoofing if exposed directly. Best practice is to place a reverse proxy (Nginx or similar) in front and restrict direct access to these ports.

Client Configuration for Self-Hosted Infrastructure

After deploying your server, configure RustDesk clients to use it:

  1. Open RustDesk on the client machine
  2. Click the network/settings icon
  3. Navigate to Network or ID/Relay Server settings
  4. Enter your server’s IP or domain in the “ID Server” field
  5. Enter the public key provided during server setup
  6. Leave other fields blank unless using RustDesk Server Pro

Clients now connect through your infrastructure rather than public RustDesk servers. Test connectivity by attempting a remote session between two configured clients.

Troubleshooting Common RustDesk Issues

Even with careful installation, issues arise—particularly in heterogeneous environments with varying display servers, network configurations, and security policies. Understanding common failure modes accelerates resolution.

Connection Failures and Timeouts

When connections fail to establish or time out immediately, the issue typically lies in network configuration or NAT traversal.

Symptoms:

  • Connection hangs at “Connecting…”
  • Error: “Connection timed out”
  • Direct connection fails but relay works (or vice versa)

Diagnosis:

# Check if RustDesk service is running
systemctl status rustdesk

# Verify outbound connectivity
curl -I https://rustdesk.com

# Test specific ports (replace with your server IP)
nc -zv your-rustdesk-server 21115
nc -zv your-rustdesk-server 21116

Solutions:

  • Ensure firewall rules allow required ports (21115-21117 TCP, 21116 UDP)
  • For self-hosted servers, verify the server is publicly accessible or properly port-forwarded
  • Check for MTU issues on network interfaces causing packet fragmentation
  • In corporate environments, verify proxy settings aren’t blocking RustDesk traffic

Screen Capture and Display Issues

Blank screens, frozen displays, or “no display” errors often relate to display server configuration or permissions.

Symptoms:

  • Remote screen appears black
  • Display freezes after initial connection
  • Error messages about display server or permissions

Diagnosis:

# Check display server type
echo $XDG_SESSION_TYPE

# Verify X11 or Wayland compatibility
ps aux | grep -E '(Xorg|wayland|gnome-shell)'

# Check RustDesk logs for display errors
journalctl -u rustdesk --since "10 minutes ago"

Solutions:

  • Switch from Wayland to X11 by setting WaylandEnable=false in /etc/gdm3/custom.conf
  • Ensure the user running RustDesk has access to the X server (check xhost settings)
  • For headless servers, install a virtual display driver like xvfb:
sudo apt install -y xvfb
Xvfb :99 -screen 0 1920x1080x24 &
export DISPLAY=:99
rustdesk

Audio Transmission Problems

Missing or distorted audio during remote sessions indicates PulseAudio or PipeWire configuration issues.

Symptoms:

  • No audio from remote system
  • Crackling or distorted sound
  • Audio works locally but not remotely

Diagnosis:

# Check audio subsystem
pactl info | grep "Server Name"

# Verify PulseAudio/PipeWire is running
systemctl --user status pulseaudio
systemctl --user status pipewire

Solutions:

  • Ensure PulseAudio or PipeWire is running in the user session
  • For Flatpak installations, verify audio permissions:
flatpak override --user --socket=pulseaudio
  • Check that the correct audio source is selected in RustDesk settings

SELinux and AppArmor Denials

Security modules can block RustDesk operations, particularly in hardened environments.

Symptoms:

  • Application crashes on launch
  • Specific features fail silently
  • Audit logs show denials

Diagnosis:

# Check for SELinux denials
ausearch -m avc -ts recent | grep rustdesk

# Check for AppArmor denials
grep -i denied /var/log/syslog | grep rustdesk

Solutions:

  • For SELinux, apply the RustDesk-specific policy or run in permissive mode temporarily
  • For AppArmor, create a local override:
sudo aa-complain /opt/rustdesk/rustdesk

Document any security module adjustments for audit purposes, and consider whether the security trade-off aligns with your environment’s risk profile.

High CPU Usage and Performance Degradation

Excessive resource consumption during remote sessions affects both user experience and server capacity.

Symptoms:

  • RustDesk process consumes >50% CPU consistently
  • Remote session feels laggy despite good network
  • System becomes unresponsive during active connections

Diagnosis:

# Monitor resource usage
top -p $(pgrep rustdesk)

# Check codec negotiation
rustdesk --help  # Review available flags

Solutions:

  • Adjust image quality settings in RustDesk preferences (lower bitrate, higher quantizer)
  • Ensure hardware acceleration is enabled if available
  • For servers handling multiple connections, consider limiting concurrent sessions
  • Update graphics drivers to latest stable versions
r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.

Related Posts