r/rustdesk • u/skooniefromboonies • May 13 '24
Should you self-host a rustdesk server?
Should you self-host a rustdesk server? Probably yes.
I was reading through some comments and posts on the subreddit and I think there's a common misconception about what the server's role is.
There are technically two servers:
- Signaling Server
- Relay Server
As long as rustdesk is running on a machine, the machine is constantly pinging the Signaling Server to make its current IP address and port known.
When you start a connection from computer A to computer B, computer A contacts the signaling server and says he wants to talk to computer B.
The Signaling Server then tries to connect A and B directly to each other using hole punching.
If hole punching fails, A will talk to B via the Relay Server. This is the only time when hosting your own server will improve peer to peer connection latency.
In a majority of cases, hole punching is successful and the Relay Server is never used.
In other words, for a large majority of people, hosting the rustdesk server only makes establishing the initial connection faster; it does not improve latency once the connection is established.
Any speed issues are likely directly related to the computers themselves or the computers' internet services, not the public server.
So, if this is the case, then why should you still host your own rustdesk server?
The public rustdesk servers are meant for testing and research purposes and are not equipped to handle large amounts of traffic.
This means that the amount of time it takes to establish a connection through the public servers can vary drastically and sometimes even fail if the server is overloaded.
Also, if hole punching ever does fail, and the connection is routed through the public Relay Server.... some days it might be blazing fast... others not so much.
https://github.com/rustdesk/rustdesk/wiki/How-does-RustDesk-work%3F
18
u/wiiznokes May 14 '24
That was the explication I needed for a long time, thanks you 🙂 This should be explained in the repo
7
u/open-trade May 14 '24
Thank you so much, it is pinned.
6
u/xacid May 13 '24
Easy to self host. Been doing it for awhile now.
5
u/severach May 13 '24
I self host per site for customers that are doing high volume, long sessions or heavy graphics.
5
u/cpjet64 May 14 '24
I self host but have a split config. The signal server sits on my local cluster behind reverse proxy with a wireguard vpn to a data center vps for the relay. The relay is on a vps for bandwidth and I’ve gotta say it is blazing fast at 500/500 compared to the local wan of 1g/40.
2
u/JayTe25 May 14 '24
Thanks a lot, that was helpful
2
u/ComfortOld7041 Jun 11 '24
I self host via Digital Ocean droplet and pay $4/month… And if I was really really cheap, I could delete it and set it up from scratch only when needed (maybe takes 15min) and then would probably cost under $1/month. But $4/month is within my budget, so don’t need the extra work and hassle.
2
u/SideofIronyPlease Jun 13 '24
Best summary ever. THIS is what should be in the docs not the rambling un-answering nonsense that's there.
Most of Rustdesk's docs are good; however, an overview of the architecture and components used is what's missing. THIS is so much better of a summary, please include this in Rustdesk docs.
It took Reddit to answer the basic question of what each server's function is. You deserve 1,000 upvotes.
1
u/Kushalx May 17 '24
Thanks for posting this! Much needed!
I was about to figure out how to install more proxies! But I still have one question pending :
I was under the assumption that if a rpoxt is closer to you it would be used? Regardless of direct hole punching? Atleast that's what I got from their site!
My VPS running rustdesk (pro) is on another continent than where I and my clients are (3rd world, local VPSs are x10 of the cost!). Was hoping a locally installed proxy, publicly accessible ofcourse, but potential to be offline sometimes, would help speed up things? From your post, I'm wrong, IF direct hole punching happens?
2
u/MasterBlaster8 Feb 18 '25
I installed Rustdesk on a Docker running on Proxmox behind a Unifi firewall. When I connect from work to home my Fortinet Analyzer shows the client connecting on tcp/21114 to my home. My yml file doesn't contain 21114 and my port forwarding firewall rule is only for TCP 21115-21117 and UDP 21116. I'm curious why my firewall home firewall would be allowing 21114. Any thoughts would be appreciated.
1
u/kirvedx Jan 22 '25
So, in other words, a free GCP compute instance could technically be all anyone needs if they are working with a small group of clients and connect - lets say - on a weekly basis for just a few minutes, or an hour once every couple of months?
1
u/JohnKruger889 Feb 05 '25
Thanks for this. Total noob. Anyone using a hosting company like vultr for this?
1
u/Individual_Fox634 Feb 06 '25
Does anybody know why, besides having my own Relay server (self hosted in the Cloud), when I connect via LAN IP address to one of my other PC's within the same LAN inside the house (which also has the relay server configured under network settings) I still see the armor in red with the message "Direct and unencrypted connection"?
When I connect using the device ID, the armor shows in Green and displays "Direct and Encrypted connection"
Thank you
1
u/Bearly-Compatint Feb 18 '25
I don't know if it's even legal to ask this: if I sent someone here an SSD with W11 pro on it and a 50 dollar check, would you put the server components on it and send it back to me?
1
u/Wise_Category1263 Feb 20 '25
For some reason I never once have connected P2P. I tried setting firewall rules as:
21115/tcp ALLOW IN Anywhere
21115/udp ALLOW IN Anywhere
I set these these rules on both ends, but it always connects via the relay.