Skip to content

Instantly share code, notes, and snippets.

@Kambaa
Last active February 2, 2024 07:15
Show Gist options
  • Save Kambaa/b4d303d7795f531895254b0663e481da to your computer and use it in GitHub Desktop.
Save Kambaa/b4d303d7795f531895254b0663e481da to your computer and use it in GitHub Desktop.
RustDesk Self Hosted Server Working Example

RustDesk Server Working Example

This example runs a RustDesk server (with detailed/debug logs enabled and secured with id_ed25519 key that only you can use in your machines if you configure RustDesk clients) and you can use the server resources instead of RustDesk public resources.

  • For clients, use nightly builds of RustDesk (Patiently waiting 1.2.0 version https://github.com/rustdesk/rustdesk/releases/tag/nightly)
  • Use the docker-compose.yaml file and run sudo docker-compose up
  • Allow these ports open to public:
    • TCP ports:
      • 21115
      • 21116
      • 21117
      • 21118
      • 21119
      • 8000
    • UDP Ports:
      • 21116
  • Open and read the file ./rustdesk-data/id_ed25519.pub, copy its contents
  • Open your RustDesk Client go to settings, enter network menu and enter:
    • ID Server: hbbs.yourdomain.com (as you entered in docker-compose.yaml)
    • Key: Enter the contents of id_ed25519.pub file that you have read.
  • Close setting and check bottom of the menu that service is Ready

resim

Using Self Hosted Server On mobile:

You can use this even in your mobile RustDesk app, just copy your domain and key and generate a json like this:

config={"host": "hbbs.yourdomain.com", "key": "<YOUR id_ed25519.pub KEY>"}

And then go to a QR Code Generator site like https://www.qr-code-generator.com and paste it, and on RustDesk mobile app go to Settings and tap the QR code icon on top right and scan the qr code.

Links to read:

TODOS:

  • After a stable id/login registration configuration enabled, add config here and show the world we don't need T.V. anymore.
  • Add anything new here.
version: '3'
networks:
rustdesk-net:
external: false
services:
hbbs:
container_name: hbbs
environment:
- RUST_LOG=debug
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
- 21118:21118
image: rustdesk/rustdesk-server:latest
command: hbbs -r hbbs.yourdomain.com:21117 -k _
volumes:
- ./rustdesk-data:/root
networks:
- rustdesk-net
depends_on:
- hbbr
restart: unless-stopped
hbbr:
container_name: hbbr
environment:
- RUST_LOG=debug
ports:
- 21117:21117
- 21119:21119
image: rustdesk/rustdesk-server:latest
command: hbbr -k _
volumes:
- ./rustdesk-data:/root
networks:
- rustdesk-net
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment