RustDesk is an interesting new remote desktop platform. It’s open-source, self-hostable, and seems to be fairly performant to boot.
I wanted to run it for myself. I use Tailscale to connect my devices together, a truly wonderful piece of software that magically connects everything in a private VPN.
RustDesks documentation makes no reference to Tailscale. It also makes no reference to the AUR package for the RustDesk server that was apparently put up. So I’m providing my simple instructions that I discovered through trial and error to run the RustDesk server on an Arch Linux host with KDE Plasma.
I’m happy to be proven wrong about this— please hit me up in the comments below— but after a few years of daily driving Wayland, I found that remote desktop is simply not possible with it.
I tried a couple different applications:
- NoMachine advertises support for Wayland, but I got a black screen and/or lockups when I tried to use it.
- KRFB managed to connect and display a single frame, but cannot display subsequent frames.
- KRDP is an in-development RDP server that intends to ship with Plasma 6, but it’s not done yet. Additionally, it has no plans to support unattended access. If I’m reading that right, it means that you’ll always need to be physically present to connect.
- Sunshine has a long-standing bug that makes it unusable on Wayland because the mouse cursor is invisible.
- RustDesk itself has promising Wayland support, but when you open it under a Wayland session it reports the following:
While it’s possible to successfully connect to RustDesk under Wayland, you must be physically present, as it opens a confirmation window asking which screen you’d like to share.
I’m optimistic that RustDesk will improve their Wayland support (and/or Wayland will implement the necessary protocols to handle this use case), Sunshine will fix their bug, and KRDP will hopefully ship as being usable, but after many attempts of my own at making this functional it’s clear that we just aren’t there yet in 2023. So for now I’ll begrudgingly switch back to X11.
What we’ll be doing
RustDesk is composed of two parts— a client, which all devices run, and connect to each other to create remote desktop connections, and a server, which all clients talk to to negotiate connections.
RustDesk has two free servers but the app strongly recommends that you run your own server, so that’s what we’ll do. I can confirm that self-hosting the server massively improves my quality of service.
Installing the client on each device is trivial, but installing the server is a bit trickier.
On to the content
These were the steps I took to get RustDesk working with Tailscale. Ideally they’ll work for you, but if they don’t, please don’t start a mob. I’m just a guy on the internet writing what worked for me.
On both host and client:
yay -S rustdesk
I found some bug or another with the binary package, I don’t remember what it was, so we’ll build from source. This takes a while so get comfortable!
On the host only:
yay -S rustdesk-server-bin
sudo systemctl enable rustdesk-server-hbbr
sudo systemctl enable rustdesk-server-hbbs
sudo systemctl start rustdesk-server-hbbr
sudo systemctl start rustdesk-server-hbbs
There don’t seem to be AUR packages for building the server from source.
On both host and client:
Open RustDesk and set the ID server to the name of your Tailscale node of your host.
This is the key part that I don’t think anyone else has jotted down yet. You must do this on both the client and the host!
My desktop is named
glados in Tailscale, so I’ll set it accordingly on both the host and the client:
Optional: Set a permanent password in the Security tab of settings.
Finally, take the RustDesk ID of the host, plug it in to the guest, and you should be connected! Enjoy!