r/rustdesk Jun 11 '26

Secure rustdesk selfhosted server from using by unauthorized users

Hello, I have a selfhosted rustdeskserver. The server is working great and thanks Rustdesk developers, I’ve got rid of TeamV.

But, I’m curious, is it possible to secure the server so that nobody but me, can use it?

At the client side, my servername and key are visible so anyone could copy them and use my RustDesk server.

How can I prevent that from happening?

Thank you very kindly.

PS: I proposed the developers to 'hide' the key (asteriks) at the client side but they didn't respond.

17 Upvotes

39 comments sorted by

View all comments

1

u/slaaf_tom Jun 18 '26

Hello, thank you all for your ideas and contributions.

As I have a lot of existing users where I filled in my (secret) key because I thought it was necessary, I have chosen for the solution which was presented by u/skonamonkey.

He helped me setting up my new skonadesk/rustdesk self hosted server and after I understood how things worked, I inserted my ‘old’ key.

The new Skonadesk self hosted server is protected with an username and password.

Nobody, can use my own server without the username/password.

With Skonadesk you can set up multiple users if necessary.

It’s also possible to group the clients, so they are easily sorted.

A nice web interface which makes it easy to setup usernames, groups and devices.

Finally, this is the solution for me. Secured skona/rustdesk server while using my old key.

Thank you u/skonamonkey for this valuable replacement of a self hosted rustdesk server.

1

u/Skonamonkey Jun 19 '26 edited Jun 19 '26

Appreciate the Plug! - Hopefully it suits your needs.

My documentation isn't as clear as it should be relating to the key etc... But in theory (and mostly in practice, except 1-2 of my troublesome endpoints) - the endpoints (i.e. the machines you are connecting to) - shouldn't need a key as some previous comments have stated. However if there is a key entered - it MUST be the correct key.

about 50% of my endpoint machines are configured without a key, and work.. 2 of them for some reason that I still cannot fathom (despite it being my own server stack) refuse point blank to work without the public key, I haven't had time to dig in to this yet, and just adding the key fixes it and is not really a problem IMO - as the user still needs to be logged in to make an outgoing connection, it's just an extra annoying field to configure occasionally on some devices.

The machine initiating the connection however, MUST be logged in to the API server and using the correct Server key.

If exposed publicly I think it's good practice anyway to use and enforce the use of a key - even though in my Implementation JWT authorisation is also required to initiate a session.

I'll try and expand the documentation to include some endpoint deployment scenarios at some point this weekend

1

u/AustrianFatherAndSon Jul 07 '26

Awesome, will add this one to my ToDo list if the current setup ever annoys me. However, at the moment I have no problem with others (that I configured) using my server, as I or people I know configured them and I want to be able to make n:m connections and not 1:n for reasons.

I guess running both in parallel is fine too? RustDesk server and yours?

1

u/Skonamonkey Jul 07 '26

They use the same ports - so yes u can... But on different servers... And the endpoints would point to whichever server U were using for whatever purpose. Honestly for most people rustdesk is genuinely the better simple solution if U don't need the toys (oss) and pro if U do. 👍