← Back to rustdesk

How to Deploy & Use rustdesk

RustDesk Deployment and Usage Guide

1. Prerequisites

Development Environment

  • Rust toolchain (latest stable version recommended)
  • C++ build environment (gcc/clang with development headers)
  • Git for cloning the repository
  • vcpkg package manager for dependencies

System Dependencies by Platform

Ubuntu/Debian:

sudo apt install -y zip g++ gcc git curl wget nasm yasm libgtk-3-dev clang \
libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libasound2-dev libpulse-dev cmake make libclang-dev ninja-build \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libpam0g-dev

Fedora/CentOS/RHEL:

sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang \
libxcb-devel libxdo-devel libXfixes-devel pulseaudio-libs-devel cmake \
alsa-lib-devel gstreamer1-devel gstreamer1-plugins-base-devel pam-devel

Arch/Manjaro:

sudo pacman -Syu --needed unzip git cmake gcc curl wget yasm nasm zip make \
pkg-config clang gtk3 xdotool libxcb libxfixes alsa-lib pipewire

openSUSE:

sudo zypper install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang \
libxcb-devel libXfixes-devel cmake alsa-lib-devel gstreamer-devel \
gstreamer-plugins-base-devel xdotool-devel pam-devel

Sciter Library

Download the appropriate Sciter dynamic library for your platform:

Place the downloaded file in your system library path or project directory.

2. Installation

Clone the Repository

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

Install vcpkg

git clone https://github.com/microsoft/vcpkg
cd vcpkg
git checkout 2023.04.15  # Use specific version for compatibility
cd ..
./vcpkg/bootstrap-vcpkg.sh
export VCPKG_ROOT=$HOME/vcpkg

Install Required Libraries via vcpkg

Windows:

vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static \
opus:x64-windows-static aom:x64-windows-static

Linux/macOS:

vcpkg install libvpx libyuv opus aom

Fix libvpx on Fedora (if needed)

cd vcpkg/buildtrees/libvpx/src
cd *
./configure
sed -i 's/CFLAGS+=-I/CFLAGS+=-fPIC -I/g' Makefile
sed -i 's/CXXFLAGS+=-I/CXXFLAGS+=-fPIC -I/g' Makefile
make
cp libvpx.a $HOME/vcpkg/installed/x64-linux/lib/
cd

3. Configuration

Environment Variables

Set the vcpkg root path in your shell profile:

export VCPKG_ROOT=$HOME/vcpkg

Server Configuration

RustDesk can use different server configurations:

  1. Default Public Servers: Uses RustDesk's public rendezvous/relay servers
  2. Self-Hosted Server: Set up your own RustDesk Server
  3. Custom Server: Write your own using the rustdesk-server-demo

To configure custom servers, use the UI settings:

  • Navigate to ID/Relay Server in settings
  • Enter your server addresses
  • Use Import server config to load configurations
  • Use Export Server Config to save configurations

Security Settings

Configure through the RustDesk UI:

  • Set your own password for persistent access
  • Enable keyboard/mouse control permissions
  • Enable clipboard sharing
  • Enable file transfer capabilities
  • Enable TCP tunneling for direct connections
  • IP Whitelisting to restrict access to specific IP addresses

4. Build & Run

Development Build

cargo run

This will compile and run RustDesk with default settings using Sciter for GUI.

Production Build

cargo build --release

The compiled binary will be available at target/release/rustdesk (or rustdesk.exe on Windows).

Alternative GUI Build (Flutter)

For Flutter-based GUI builds, check the CI configuration for detailed instructions.

5. Deployment

Self-Hosting Options

Option 1: Using RustDesk's Public Infrastructure

  • Simplest deployment - works out of the box
  • No server setup required
  • Your data passes through RustDesk's relay servers

Option 2: Self-Hosted RustDesk Server

  1. Deploy the RustDesk Server on your infrastructure
  2. Configure clients to use your server addresses
  3. Maintain full control over your data and traffic

Option 3: Docker Deployment Refer to the Docker section in the README for containerized deployment options.

Platform Recommendations

For Personal/Small Team Use:

  • Use public servers for simplicity
  • Set up IP whitelisting for basic security
  • Use strong, unique passwords

For Enterprise/Organization Use:

  • Deploy self-hosted RustDesk Server
  • Implement network-level security
  • Use TCP tunneling for internal connections
  • Maintain audit logs

For Developers:

  • Build from source for customization
  • Implement custom relay servers using the demo server codebase
  • Contribute translations via the language files

6. Troubleshooting

Common Issues and Solutions

Issue: "Service is not running"

  • Check if RustDesk service is enabled: Enable service in settings
  • Ensure firewall allows RustDesk connections
  • Verify network connectivity to relay servers

Issue: "not_ready_status" or connection failures

  • Check your internet connection
  • Verify relay server addresses are correct
  • Try switching between TCP and UDP protocols
  • Check if your organization's firewall blocks the ports

Issue: Build failures on Linux

# Ensure all dependencies are installed
sudo apt update && sudo apt upgrade  # For Debian/Ubuntu
sudo yum update  # For Fedora/CentOS

# Verify vcpkg installation
echo $VCPKG_ROOT  # Should point to your vcpkg directory

# Clean and rebuild
cargo clean
cargo build

Issue: Sciter library not found

  • Download the correct Sciter library for your platform
  • Place it in a directory in your library path
  • On Linux, you may need to run: sudo ldconfig

Issue: "Invalid server configuration"

  • Verify server configuration format
  • Use Export Server Config from a working setup
  • Import to new installation using Import server config

Issue: Clipboard or file transfer not working

  • Ensure Enable clipboard is checked in permissions
  • Verify Enable file transfer is enabled
  • Check that both sides have matching permission settings
  • Try disabling and re-enabling the features

Performance Issues:

  • Use TCP tunneling for more stable connections
  • Reduce screen quality in settings for slower networks
  • Ensure both sides have adequate bandwidth

Getting Help

Contributing

Found a bug or want to contribute?