From 051aa88c5c71e47441bb6addf1e82b0e66c1b3aa Mon Sep 17 00:00:00 2001 From: Mr-Update <37781396+Mr-Update@users.noreply.github.com> Date: Wed, 13 Sep 2023 23:30:18 +0200 Subject: [PATCH] Update _index.en.md --- .../rustdesk-server-pro/relay/_index.en.md | 60 +++++++++---------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/content/self-host/rustdesk-server-pro/relay/_index.en.md b/content/self-host/rustdesk-server-pro/relay/_index.en.md index fb25420..754d697 100644 --- a/content/self-host/rustdesk-server-pro/relay/_index.en.md +++ b/content/self-host/rustdesk-server-pro/relay/_index.en.md @@ -7,31 +7,32 @@ weight: 17 You can have several relay servers running across the globe and leverage GeoLocation to use the closest relay server, giving you a faster experience when connecting to remote computers. -> You will need the private key pair **id_ed25519** and **id_ed25519.pub** +> You will need the private key pair `id_ed25519` and `id_ed25519.pub`. + +1 - If docker is already installed, connect to your server via SSH and create a volume for hbbr. -1 - If docker is already installed, connect to your server via SSH and create a volume for HBBR ``` # docker volume create hbbr ``` -The volume hbbr should be located in /var/lib/docker/volumes/hbbr/_data -2 - Copy the private key pair to the volume location, in this case we will use SCP to copy the files. +The volume hbbr should be located in `/var/lib/docker/volumes/hbbr/_data`. -The command syntax is: scp username@server: +2 - Copy the private key pair to the volume location, in this case we will use SCP to copy the files. + +The command syntax is: `scp username@server:`. ``` # scp id_ed25519 root@100.100.100.100:/var/lib/docker/volumes/hbbr/_data # scp id_ed25519.pub root@100.100.100.100:/var/lib/docker/volumes/hbbr/_data ``` - -3 - Deploy the HBBR container using the volume previously created. This volume has the private key pair needed to run your private relay. +3 - Deploy the hbbr container using the volume previously created. This volume has the private key pair needed to run your private relay server. ``` # sudo docker run --name hbbr -v hbbr:/root -td --net=host rustdesk/rustdesk-server hbbr -k _ ``` -4 - Check the running logs to verify that hbbr is running using your key pair +4 - Check the running logs to verify that hbbr is running using your key pair. ``` # docker logs hbbr @@ -45,78 +46,73 @@ INFO [src/relay_server.rs:81] Listening on tcp :21117 Depending on your OS, you might want to block/allow IPs using a firewall. -In our case, running ubuntu we want to allow any tcp connections, to ports 21117 and 21119 +In our case, running Ubuntu we want to allow any TCP connections, to ports 21117 and 21119. ``` # sudo ufw allow proto tcp from any to any port 21117,21119 ``` -**enable the firewall** +**Enable the firewall** ``` # sudo ufw enable ``` -**check the status** +**Check the status** ``` # ufw status Status: active -To Action From +To Action From -- ------ ---- -21117,21119/tcp ALLOW Anywhere -21117,21119/tcp (v6) ALLOW Anywhere (v6) +21117,21119/tcp ALLOW Anywhere +21117,21119/tcp (v6) ALLOW Anywhere (v6) ``` - ## Configure RustDesk Pro for Geo Location using Web Console ### Register and Download the GeoLite2 City database file To use geo location, hbbs needs access to the MaxMind GeoLite2 City database. The database is free and you can register to download the file and get an API key. -Start by creating an account (if you don’t have one) by going to the website https://www.maxmind.com/en/account/login -Go to Download Databases and download the GeoLite2 City, choose the gzip file and you should have the mmdb when decompressing it. +Start by creating an account (if you don’t have one) by going to the [website](https://www.maxmind.com/en/account/login). +Go to `Download Databases` and download the GeoLite2 City, choose the gzip file and you should have the `mmdb` file when decompressing it. image +If you installed RustDesk Pro using the installation script on a Linux machine, the `mmdb` file needs to be moved to `/var/lib/rustdesk-server/`. -If you installed RustDesk Pro using the installation script on a Linux machine, the mmdb file needs to be moved to **/var/lib/rusted-server/** - -For docker installations the file should be in the volume you mapped when deploying the container mapped to \/root +For Docker installations the file should be in the volume you mapped when deploying the container mapped to `/root`. #### Get an API key to automate the process - Linux servers + You need to update this file regularly and we can use a cronjob to do that. You will need an API key to access the download link which is free. -Go to Manage License Keys and generate a new license key
+Go to `Manage License Keys` and generate a new license key.
image
image - -You can automate the download process in a few ways (https://dev.maxmind.com/geoip/updating-databases) but you add the following command to your crontab replacing {Your Access Key} with the API key you got from the previous step. +You can automate the [download process](https://dev.maxmind.com/geoip/updating-databases) in a few ways, but you add the following command to your crontab replacing {Your Access Key} with the API key you got from the previous step. ``` -/usr/bin/curl -L --silent 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key={Your Access Key}&suffix=tar.gz' | /bin/tar -C '/var/lib/rustdesk-server/‘’ -xvz --keep-newer-files --strip-components=1 --wildcards '*GeoLite2-City.mmdb' +/usr/bin/curl -L --silent 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key={Your Access Key}&suffix=tar.gz' | /bin/tar -C '/var/lib/rustdesk-server/' -xvz --keep-newer-files --strip-components=1 --wildcards '*GeoLite2-City.mmdb' ``` - ### Change settings in RustDesk Pro Web Console -Add your relay server IP addresses to the the Relay Server List, using just the IP address. **Do not add the port**
+Add your relay server IP addresses to the the Relay Server List, using just the IP address. **Do not add the port.**
image Add a Geo Override but adding the server IP address and the coordinates where the server is located.
image -Click Reload Geo and your list should look similar to this.
+Click `Reload Geo` and your list should look similar to this.
image +To confirm the results, check your hbbs logs when clicking `Reload Geo`, you should see a message showing the relay server IP addresses and their coordinates. -To confirm the results, check your HHBS logs when clicking Reload Geo, you should see a message showing the relay server IP addresses and their coordinates - -> If you are runninf RustDesk Pro on a linux machine use the command **RUST_LOG=debug ./hbbs** to view the logs, if you are running on a docker container user **docker logs hbbs** - +> If you are running RustDesk Pro on a Linux machine use the command `RUST_LOG=debug ./hbbs` to view the logs. If you are running on a Docker container user `docker logs hbbs`. ``` RUST_LOG=debug ./hbbs @@ -130,7 +126,7 @@ INFO [src/common.rs:119] relay-servers=["1xx.xxx.xxx.x7", "1xx.xxx.xxx.xx8", "7x NFO [src/rendezvous_server.rs:1467] parsed relay servers: [("1xx.xxxx.xxx.xx7", Some((-1x, xxx))), ("1xx.xxx.xxx.xx8", Some((-3x, xxx))), ("7xx.xxx.xxx.xx1", Some((6x, xxx)))] ``` -You can also confirm the relay requests diercelty on your HBBR instancies, simply by checking the container logs +You can also confirm the relay requests directly on your hbbr instances, simply by checking the container logs. ``` # docker logs hbbr