Self-hosted remote support
Direct Line
Versatile Options
Once the connection is established, the top bar in the window shows the ID at the other end. The icon to the top left shows the type of connection; you can see it in plain text by mousing over the icon. A green shield with a checkmark means a direct and encrypted connection (Figure 1). A green shield with a circular arrow indicates a mediated and encrypted connection routed by a relay server. A red shield with an X represents an unencrypted connection by direct IP access.
![](/var/ezflow_site/storage/images/archive/2024/80/self-hosted-remote-support/figure-1/212196-1-eng-US/Figure-1_large.png)
You can use the other buttons in the middle drop-down bar to toggle between window and full-screen mode, open text chat or voice call with the other party, and transfer files in either direction. RustDesk uses a separate window with a three-column layout to handle file transfers. Two of the columns show the local and remote drives, and the third column lists the completed transfers (Figure 2).
The client also supports a direct TCP tunnel, which you can use to map a port on your local machine to a port on the target machine. Further options include the ability to lock the computer on the remote side or to send a Ctrl+Alt+Del keyboard shortcut to unlock the remote computer again. However, the shortcut only works if the client on the remote computer is the installed version and not the portable version, because only the installed client supports this ability.
You can optionally block the remote computer for local user input and lift this block again. The screen icon influences the display and quality of the remote session. You can display the session at its original resolution or use scaling, with a choice between balanced compression, quality-optimized compression, or optimized response time. Depending on the available bandwidth, optimized response time can cause visible fragmentation. For remote control of unattended target systems, a useful option automatically locks the target at the end of the session, if so desired. You can also save the operating system password in RustDesk to unlock the target automatically when reconnecting.
Setting Up Your Server
RustDesk lets you operate on a self-hosted server; several variants come with or without a container manager [4]. Smaller companies and power users will be pleased to hear that the RustDesk server runs in combination with Docker on network-attached storage (NAS) systems by Synology. The online documentation guides you through the setup process, which consists of a few simple steps in the Synology Disk Station Manager (DSM) web interface without shell access.
I tested my own instances on Microsoft Windows Server 2022 and Ubuntu 20.04 LTS (Focal Fossa). The steps for Linux should work on any distribution with Debian underpinnings.
Getting Started with Linux
To begin, update the Linux system:
sudo apt update sudo apt upgrade
The next step simply involves following the recommendations in the RustDesk documentation and enabling and configuring the firewall:
sudo ufw allow 22/tcp sudo ufw allow 21115:21119/tcp sudo ufw allow 21116/udp sudo ufw allow 8000/tcp sudo ufw enable
The first command makes sure you can use SSH for access, even if the firewall is active, and do not accidentally lock yourself out. The next three lines open up the ports required for the RustDesk server components. The TCP port 8000 of the minimalist Go HTTP File Server (gohttpserver
) is optional. You only need this server if you want to use the automatically generated scripts for client installation; I will get back to this process in a moment. Because the web server uses unencrypted HTTP, I do not recommend publishing on the Internet; send the installation scripts to your clients by some other means.
You need to allow the remaining ports on the other firewalls that protect your server, whether on your local network or cloud provider side. Now download, make executable, and run the RustDesk installation script [5]:
wget https://raw.githubusercontent.com/techahold/rustdeskinstall/master/install.sh chmod +x install.sh ./install.sh
In the first step, the script asks whether you want to install the server by its IP address or its DNS name. If you choose the DNS name, you need to enter it in the next step. The setup wizard then offers to set up the Go HTTP server.
Finally, the setup routine outputs the RustDesk server's public key and the admin user's password for accessing the web server. You will need to keep this information safe for later use. If you want to update your RustDesk server, the steps are the same as for the installation:
wget https://raw.githubusercontent.com/techahold/rustdeskinstall/master/update.sh chmod +x update.sh ./update.sh
As an alternative to the script, the online documentation describes manual installation by Docker Compose or without Docker by the PM2 process manager for Node.js applications.
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
![Learn More”>
</a>
<hr>
</div>
</div>
<div class=](https://www.admin-magazine.com/var/ezflow_site/storage/images/media/images/learn-more/211417-1-eng-US/Learn-More.png)