From a5977206b9e996b732385b89895566a9729b5274 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Sat, 12 Oct 2024 14:44:46 +0800 Subject: [PATCH] Update _index.en.md --- content/self-host/_index.en.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/content/self-host/_index.en.md b/content/self-host/_index.en.md index bbe2657..2005f3e 100755 --- a/content/self-host/_index.en.md +++ b/content/self-host/_index.en.md @@ -8,6 +8,29 @@ If you are using RustDesk you should have your own RustDesk Server, these docs w Support is available via our [Discord](https://discord.com/invite/nDceKgxnkV) for OSS and [email](mailto:support@rustdesk.com) for Pro. +### How does self-hosted server work? + +There are technically two executables (services): + +- `hbbs` - RustDesk ID (rendezvous / signaling) server, listen on TCP (`21114` - for http in Pro only, `21115`, `21116`, `21118` for web socket) and UDP (`21116`) +- `hbbr` - RustDesk relay server, listen on TCP (`21117`, `21119` for web socket) + +When you install via installation script / docker compose / deb, the two services will be both installed. + +Here is [illustrations](https://github.com/rustdesk/rustdesk/wiki/How-does-RustDesk-work%3F) of how RustDesk client communicates with `hbbr` / `hbbs`. + +As long as RustDesk is running on a machine, the machine constantly pings the ID server (`hbbs`) to make its current IP address and port known. + +When you start a connection from computer A to computer B, computer A contacts the ID server and requests to communicate with computer B. + +The ID server then attempts to connect A and B directly to each other using hole punching. + +If hole punching fails, A will communicate with B via the relay server (`hbbr`). + +In the majority of cases, hole punching is successful, and the relay server is never used. + +Here is a discussion about [Should you self-host a rustdesk server?](https://www.reddit.com/r/rustdesk/comments/1cr8kfv/should_you_selfhost_a_rustdesk_server/) + ### Basic Setup [Set up your own server instance manually.](https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/install/#set-up-your-own-server-instance-manually)