Ludovic Frank - Freelance developer

Access your machines easily from anywhere with RustDesk

ionicons-v5-k Ludovic Frank May 1, 2025
68 reads Level: Confirmed beginner

Hi, hi 🙂,

Thanks for clicking on this article, hope you like it 😁.

Today we're going to talk about remote offices, yeah I know, put like that, it sells dreams.
But the thing is, in my current life right now, I really use it a lot...

So, why not make an article out of it? 😁.

Are you ready? Ready to go? 😝

Why this article? A multi-OS world...

In my current life, I'll be switching between Windows and MacOS non-stop...

In the corporate world, Windows is omnipresent, even more so now than before with solutions like Intune and Entra ID.

As a result, my clientele is Windows-based, so I need to know Windows, and you've already seen in the past that I know this OS pretty well, especially when I decided to inject some code into explorer.exe .
In fact, I've even gone one step further by creating code that allows you to escalate your privileges... (Become administrator without respecting Microsoft's "UAC" process).

Windows is a great system, it gets the job done, but...

I can do and say what I want, I always come back to my Mac in the end, the reason? macOS and especially its software.

My pleasure is to please people, I want the user experience of what I create to be as nice as possible, and for inspiration I use macOS and iOS a lot...

Apple, they're way too good at that...

I think if I had to give an example of why macOS, I'd say "Pixelmator Pro".

Yes, I know Affinity Photo or Photoshop, but they're too much of a gas factory for me.

I do loads of illustrations left and right (just for this blog, I want something fast and efficient. And I've never found anything better than Pixelmator Pro (and I don't feel like changing anyway).

Having said that, sometimes I use a Windows PC to access my PCs, and sometimes it's the other way round.

That's why on my machines, I always have a remote desktop lying around...

In the Microsoft world, the remote desktop (MS RDP) is king.

I use it absolutely every day, and I've configured it so that it exposes an SSL certificate signed by a real certification authority, in order to limit possible "man in the middle" attacks on my connection.
Of course, using a certificate signed by an authority present in the Windows "certificate store" doesn't block man in the middle attacks; if I don't control the machine I'm connecting from, there may be some "uncool" certificates in the trust store.

But at least when I connect, the remote desktop doesn't complain, and from time to time I check the status of the certificate via the little padlock at the top to make sure it's mine.

Anyway, all that to say that I use MS RDP every day, because I'm on a client in a Microsoft environment and I need to connect to a Windows PC.

When the client is Windows and the server is Windows, it works really well... What's more, as it's integrated into the Microsoft OS, the server locks onto the screen, so nobody can see what you're doing.

The connection is ultra-smooth, and the keyboard shortcuts all work on the remote host (apart from Ctrl+Alt+Del, which we don't use very often).

Really, it's top-notch in this type of environment, you don't even realize you're on a remote machine.

(Except for video games, but that's not what I use, after which I ran WoW.exe remotely to test).

There's also a client (the Windows application) for MS RDP on macOS, but it's not as fluid as from Windows to Windows.

RustDesk works everywhere

Here we are, at the heart of this article

What is RustDesk?

At first glance, when I heard about RustDesk, I thought "self-hosted", "open source", cool, but it must be a gas machine...

Because, let's face it, one of the problems with open source is often the user experience: video streams and inputs pass through a relay under our control.It's all very well, but if it's complicated to implement and maintain, it's completely dead (and even more so in the corporate world).

When you launch RustDesk for the first time, you immediately recognize the inspiration: it's Teamviewer.

With the same login and temporary password system, I'd say it's basically the same interface, but without the ads everywhere.

So, in terms of UX, I'm not disappointed. Even though it's open source, you can tell right away that there are commercial interests behind it, so everything UX-related is worked on.

In open source, for example, we can take the case of VLC, which from a technical point of view is completely incredible, it can read everything, but the user interface has always been one of VLC's "not crazy" points.

A system you can self-host

When you first launch RustDesk, you'll see a message inviting you to create your own server for better performance.

And the cool thing is, with Docker, it's super-simple to do - I, for example, run it on my Synology NAS.

How does self-hosting work?

To start with, here's a diagram I found here.

RustDesk works with two services on the server:

  • HBBS: This is the server that allows your clients to signal and store the ids of the various machines that communicate with your server. When a machine wants to connect to another, it asks this service "Say, do you know who ID xxxx is?" and the server answers yes or no and whether the machine is online.
  • HBBR: It's simply a relay, so if your machines can't communicate directly with each other in the case of a NAT for example (your box does this for those who don't know), the relay server will put itself between your two machines as a "pass-through", simply relaying information.

So, in this configuration, everything goes through your own infrastructure.

Docker compose to deploy your server

RustDesk offers docker images to facilitate server deployment. As I said above, I've deployed this on a Synology NAS, and it works perfectly.

You can also find this docker-compose.yml on the official RustDesk documentation.

As you can see, they put networking in "host" mode, simply because the RustDesk server uses a lot of ports

HBBS service (reporting server)

  • Port 21114 (TCP) : Used for the web console, only available in the Pro version.
  • Port 21115 (TCP): Used for NAT testing.
  • Port 21116 (TCP/UDP): The most important port, must be both TCP and UDP enabled. The UDP part is used for ID registration and the heartbeat service. The TCP part is used for TCP hole punching and connection service.

hbbr service (relay server)

  • Port 21117 (TCP): Used for relay services.

(I'm not including ports for the Pro version).

Once your server is up and running, you'll find your public and private keys in the volume. Remember to set aside your public key, as you're going to need it.

Connect your machines to your server

Now that your server is ready, all you need to do is connect your machines to it.

To do this in RustDesk client (whatever the platform), click on the three dots next to your id (the number).

Then go to "Network", then "Server ID/Relay".

Here, all you need to do is enter your IP (or domain name) in "server ID" and "relay server".

Finally, at the bottom of the page, enter your public key. This will enable your customer to check that he's really talking to your server, and thus prevent "man in the middle" attacks.

I also invite you to wander through RustDesk's options, for example to set a permanent password.

RustDesk in everyday use

Once you've got everything set up, it's time to actually use it 😁.

In my use case, I use it either macOS to macOS, or Windows to macOS, as I said earlier for Windows to Windows, I prefer Microsoft's system.

For me, the "deal breaker" features are :

  • Self-hosting: I'm talking about passing my image and the passwords I type through third-party machines.
  • No "bloatware": unlike teamviewer, it doesn't remind me every 5 seconds that it must be used for commercial purposes and that there's a paid version (yes, teamviewer are ultra relouou with that).
  • The ability to change host resolution and adapt scaling on the client side
  • The ability to save the host's session password, unlock it on connection and relock it on disconnection (THANK YOU ❤️).
  • The file transfer system

As far as the fluidity of the solution is concerned, it's no match for Microsoft Remote Desktop (let alone Parsec, for gaming), but when you need to connect to do a little touch-up work on Pixelmator Pro, it's handy.

Conclusion

RustDesk is going to stay in my toolbox, in a world where I'm always on the go, allowing me to access all my computers (four, in all), no matter where I am.

It's very practical, but not necessarily the best choice depending on the platform, as its all-terrain nature gives it points that MS RDP doesn't have.

Have a great week and see you next time 😁.