RustDesk
Rust Desk
Installation
Installation :: Documentation for RustDesk https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/install/
ufw allow 22/tcp comment "SSH"
ufw allow 21114:21119/tcp comment "RustDesk" ufw allow 8000/tcp comment "RustDesk Web" ufw allow 21116/udp comment "RustDesk" sudo ufw enable
wget https://raw.githubusercontent.com/techahold/rustdeskinstall/master/install.sh chmod +x install.sh ./install.sh
Docker Option
ref: https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/docker/
sudo docker image pull rustdesk/rustdesk-server sudo docker run --name hbbs -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbs sudo docker run --name hbbr -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbr
Services
hbbs - RustDesk ID/Rendezvous server hbbr - RustDesk Relay server
Installation Creator
https://rdgen.crayoneater.org/
Web Client
https://rustdesk.com/web/
Config Location
%AppData%\RustDesk\config\
RustDesk Docker
See https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/install/
Docker Compose Example:
bash <(wget -qO- https://get.docker.com) wget rustdesk.com/oss.yml -O compose.yml sudo docker compose up -d
Manual Docker Example:
sudo docker image pull rustdesk/rustdesk-server sudo docker run --name hbbs -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbs sudo docker run --name hbbr -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbr
System status for RustDesk:
systemctl status rustdesksignal /opt/rustdesk/hbbs systemctl status rustdeskrelay /opt/rustdesk/hbbr
systemctl stop rustdesksignal systemctl stop rustdeskrelay
Docker Guide:
Manual Installation
https://github.com/techahold/rustdeskinstall
[1]
https://github.com/rustdesk/rustdesk-server/releases/tag/1.1.16
Web Client
If you do not need web client support, the corresponding ports 21118, 21119 can be disabled.
Web Client:
When WebSocket is enabled (ports 21118/21119 are open for the web client), hbbs/hbbr trust the X-Real-IP / X-Forwarded-For headers of incoming WebSocket connections to determine the real client IP, so that the client IP is preserved when the WebSocket traffic goes through a reverse proxy (WSS).
Firewall ports
hbbs:
21114 (TCP): used for web console, only available in Pro version.- 21115 (TCP): used for the NAT type test.
- 21116 (TCP/UDP): Please note that 21116 should be enabled both for TCP and UDP. 21116/UDP is used for the ID registration and heartbeat service. 21116/TCP is used for TCP hole punching and connection service.
- 21118 (TCP): used to support web clients.
hbbr:
- 21117 (TCP): used for the Relay services.
- 21119 (TCP): used to support web clients.
ufw allow 21115:21119/tcp comment RustDesk ufw allow 2116/udp comment RustDesk
Deployment Scripts
See
- https://rustdesk.com/docs/en/self-host/client-deployment/
- https://rustdesk.com/blog/rustdesk-unattended-access-setup/
Windows Powershell
Windows Batch
Windows EXE Rename
WARNING: This stopped working in version v1.4.7 due to stricter IPC security scoping that rejects processes with mismatched executable names [2]
rustdesk-host=<YOUR_SERVER_IP_OR_DOMAIN>,key=<YOUR_PUBLIC_KEY>,.exe
See https://github.com/rustdesk/rustdesk/discussions/8898
Linux
rustdesk.com/oss.ym
Summary:
bash <(wget -qO- https://get.docker.com) wget rustdesk.com/oss.yml -O compose.yml sudo docker compose up -d
Install docker
bash <(wget -qO- https://get.docker.com)
mkdir /opt/rustdesk cd /opt/rustdesk
wget rustdesk.com/oss.yml -O compose.yml
docker compose up -d
cat data/id_ed25519.pub
UKi8wfaLEP3j8w0qIoq68PwE1N9Rz38RJABgwFQ4Wg4=
services:
hbbs:
container_name: hbbs
image: rustdesk/rustdesk-server:latest
command: hbbs
volumes:
- ./data:/root
network_mode: "host"
depends_on:
- hbbr
restart: unless-stopped
hbbr:
container_name: hbbr
image: rustdesk/rustdesk-server:latest
command: hbbr
volumes:
- ./data:/root
network_mode: "host"
restart: unless-stopped
Note: This standard compose.yml file uses host network mode as recommended by the RustDesk Documentation for performance and simpler firewall rules.
- https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/docker/
- "For most Linux deployments, Docker Compose with network_mode: "host" is the simplest and most reliable option. It keeps the setup repeatable, makes upgrades easier, and avoids extra port-mapping complexity when host networking is available."
- https://billing.flokinet.is/index.php?rp=/knowledgebase/124/Self-hosted-RustDesk-server.html