Remote access with RustDesk

A complete guide to installing and using RustDesk for remote desktop; from installation on Windows and Linux to configuring ID, one-time password, and secure server connection.

6 min Updated 18 Oct 2026

Why RustDesk for Remote Desktop?

When it comes to remote desktop, names like TeamViewer or AnyDesk often come to mind. But if you're looking for an open-source, lightweight solution that can be self-hosted on your own server, RustDesk is a smart choice. This tool is written in Rust and, unlike commercial competitors, has no session limits or annoying notifications. More importantly, you can run the relay server on your own infrastructure so traffic doesn't pass through third-party servers—this means full control over security and privacy.

In this article, you'll learn step by step how to install RustDesk on clients, manage IDs and passwords, establish a secure connection, and fix the most common errors. If you have a server (for example, a VPS from ServerNet or any other provider), you can also set up a personal relay; however, this is optional and not required to get started.

Installing RustDesk on Windows and Linux

RustDesk has versions for all major platforms (Windows, Linux, macOS, Android, and iOS). Here, we'll focus on two common scenarios: installation on Windows for regular users and installation on Linux for server management.

Installation on Windows

Download the executable file rustdesk.exe from the project's official website. No installation is required; you can run the file and the program will launch immediately. However, to have the program run in the background and remain active after a restart, it's better to perform a full installation:

  1. Open the executable file.
  2. Click the "Install" button at the bottom of the window.
  3. Allow the system service installation (you'll need Administrator rights for this).
  4. After installation, the program will run automatically and display the ID and password.

Important note: If you only run the file without installing, you'll need to reopen the program every time the system restarts. For permanent use, be sure to perform a full installation.

Installation on Linux (Ubuntu/Debian)

For Linux servers, the best approach is to use the official package. First, get the latest version from the GitHub Releases page:

wget https://github.com/rustdesk/rustdesk/releases/download/1.3.2/rustdesk-1.3.2-x86_64.deb
sudo apt install ./rustdesk-1.3.2-x86_64.deb

After installation, run the program:

rustdesk

To run it automatically in the background (for example, on a server without a monitor), you can enable the systemd service:

sudo systemctl enable rustdesk
sudo systemctl start rustdesk

If you're using another distribution like Fedora or Arch, .rpm or .pkg.tar.zst packages are also available on the same page.

ID and Password; The Heart of the Connection

When RustDesk runs, you'll see two important numbers: ID and Password. These two are essential for establishing a remote desktop connection.

How is the ID Generated?

The ID is a 9 or 10-digit number generated based on hardware specifications (such as the network card's MAC address). This ID is permanent and won't change unless the hardware changes. If you replace the motherboard or network card, a new ID will be generated.

Permanent or Temporary Password?

By default, RustDesk generates a temporary password that changes every time the program restarts. For permanent access (for example, to a server), you need to set a fixed password:

  1. Click the gear icon (Settings).
  2. Go to the Security tab.
  3. Select the "Set permanent password" option.
  4. Enter a strong password of at least 8 characters with a combination of uppercase, lowercase letters, and numbers.

Do this on every client you want to connect to. The permanent password is stored in the config file; so if the system is compromised, the password is also accessible. For better security, keep the temporary password for sensitive sessions.

Secure Connection to a Computer or Server

Now that you have the ID and password, you can connect from anywhere in the world. The steps are simple:

  1. On the source device, open RustDesk.
  2. In the "Remote ID" field, enter the ID of the destination device.
  3. Click the "Connect" button.
  4. Enter the password and wait for the connection to be established.

After connecting, a window with the destination desktop will open. You can use the mouse and keyboard, transfer files (via the File Transfer tab), and even have text chat.

Security Settings You Shouldn't Ignore

RustDesk uses AES-256 encryption by default, but there are a few other settings that multiply security:

  • Enable Two-Factor Authentication (2FA): In the Security settings, enable the "Enable 2FA" option. After entering the password, a 6-digit code from an Authenticator app will be required.
  • Restrict Access: In the Security tab, you can allow only specific devices (based on ID) to connect to you. This prevents brute-force attacks.
  • Disable Passwordless Login: Make sure the "Allow remote access without password" option is disabled.

Setting Up a Personal Relay Server (Optional)

If you want traffic to not pass through RustDesk's public servers, you can set up a personal relay on your own server. This is especially recommended for companies working with sensitive data. To do this, install Docker on the server and run the following command:

docker run --name rustdesk-server -d --net=host --restart=always rustdesk/rustdesk-server:latest

After running, two ports will be opened: 21115 for registration and 21116 for communication. Open these ports in the server's firewall. Then, on the clients, enter the server address in the settings (Settings → Network). If your server is from ServerNet, you just need to open the ports in the management panel, and everything else works like any other VPS.

Troubleshooting Common Issues

No tool is without errors. Here are the most common problems RustDesk users face and their solutions.

Connection Fails; "Failed to connect" Error

This error usually occurs for one of the following reasons:

  • Incorrect ID: Enter the ID carefully; a single misplaced digit will break the entire connection.
  • The destination program isn't running: Make sure RustDesk is running on the destination device and is active in the background.
  • The destination firewall is blocking: Open ports 21115 to 21119 in the destination device's firewall.

For a quick test, ping https://rustdesk.com from the destination device and make sure the internet connection is healthy.

Permanent Password Not Being Saved

If after setting a permanent password, the program restarts and the password changes, the config file probably wasn't written correctly. On Windows, the config file is located at:

C:\Users\<username>\AppData\Roaming\RustDesk\config\RustDesk.toml

Open the file and make sure the following line exists:

password = "your_secure_password"

If the line doesn't exist, add it and restart the program. On Linux, the path is similar: ~/.config/rustdesk/RustDesk.toml.

Black Screen After Connecting

This issue is often due to lack of GPU support or graphics driver problems. Solution:

  1. In RustDesk settings, open the Display tab.
  2. Disable the "Use hardware encoding" option.
  3. Try the connection again.

If the problem persists, from the destination device, change the screen resolution to a lower value (for example, 1280x720).

Important Note About Connecting to a Server Without a Monitor

If you're connecting to a Linux server that has no monitor, you may encounter a blank screen. This is normal because the server operates in headless mode. To fix this, install a virtual display:

sudo apt install xserver-xorg-video-dummy
Xorg -config /etc/X11/xorg.conf

Or more simply, use xvfb:

sudo apt install xvfb
Xvfb :1 -screen 0 1920x1080x24 &
export DISPLAY=:1

After this, run RustDesk with the DISPLAY=:1 variable to have a virtual display.

Conclusion

RustDesk is a powerful, open-source tool for remote desktop that is useful for both home users and server administrators. With simple installation, ID and password management, and security settings like 2FA, you can have a reliable and encrypted connection. If you need full control over the infrastructure, setting up a personal relay on your server (for example, a VPS from ServerNet) isn't difficult and guarantees your privacy. Finally, by knowing the common troubleshooting steps, you can resolve most issues without wasting time. If you have any experiences or special tips, share them in the comments section so others can benefit too.

Was this page helpful?