KavoshRust is a safe installer and maintenance manager for RustDesk Server OSS on Debian/Ubuntu, designed for shared production servers.
For the current Kavosh deployment, the intended hostname is rust.kavosh.info, but the installer always asks for the final domain interactively.
The target Kavosh server already runs Nginx, sing-box, Unbound and other production services. KavoshRust therefore installs the official RustDesk Server binaries directly and manages them with systemd.
This avoids introducing Docker bridge networking or Docker-managed iptables rules on a shared host.
Read-only preflight:
bash <(curl -fsSL https://raw.githubusercontent.com/bagdeli/KavoshRust/main/install.sh) --preflightInteractive installation:
bash <(curl -fsSL https://raw.githubusercontent.com/bagdeli/KavoshRust/main/install.sh)After installation:
kavoshrustYou freely choose the main ID and Relay ports. RustDesk itself derives additional listeners:
ID_PORT-1/TCP— NAT testID_PORT/TCP— rendezvous / connectionID_PORT/UDP— registration / heartbeat / hole punchingID_PORT+2/TCP— hbbs WebSocket listenerRELAY_PORT/TCP— relayRELAY_PORT+2/TCP— hbbr WebSocket listener
Because native RustDesk binds the WebSocket listeners even when you do not expose them publicly, KavoshRust requires all five derived host ports to be free before installation.
The installer rejects any layout touching RustDesk's default range 21115-21119.
Ports below 1024 are selectable, but KavoshRust warns before using privileged/common ports. The systemd units include only CAP_NET_BIND_SERVICE so low ports can work without running RustDesk as root.
For normal desktop clients, only these need to be allowed through the public firewall:
ID_PORT-1/TCP
ID_PORT/TCP
ID_PORT/UDP
RELAY_PORT/TCP
KavoshRust does not add allow-rules for the WebSocket ports by default. If no host firewall is active, block those ports in the provider/network firewall unless you intentionally need the web client.
Native RustDesk desktop traffic does not use HTTPS, but KavoshRust can create a health/landing endpoint for the selected hostname.
If DNS points to the server and existing Nginx owns TCP 80/443, KavoshRust:
- adds only
/etc/nginx/conf.d/kavoshrust.conf, - runs
nginx -t, - reloads Nginx only after validation succeeds,
- obtains the certificate with Certbot webroot mode,
- validates Nginx again,
- enables HTTPS,
- installs a Certbot renewal deploy hook that validates and reloads Nginx.
If validation or certificate issuance fails, the KavoshRust Nginx change is rolled back. Existing virtual hosts are not replaced.
- RustDesk runs as the dedicated
kavoshrustsystem user. - SSH is not changed.
- Existing services are never stopped to free a port.
- UFW/firewalld is never enabled automatically.
- Only KavoshRust's exact firewall rules are added/removed when a host firewall is already active.
- The private key
id_ed25519stays on the server. - Only
id_ed25519.pubis given to clients. - RustDesk release assets are downloaded from the official GitHub release and SHA-256 verified when the release API provides a digest.
The interactive manager includes:
- Install / Repair
- Status
- Server/client connection information
- Port scan
- Change domain
- Change RustDesk ports
- SSL / HTTPS manager
- Firewall manager
- Restart
- Start
- Stop
- Logs
- Update RustDesk binaries with pre-update backup and rollback
- Backup
- Restore
- Force-relay toggle
- Diagnostics
- Self-update manager
- Uninstall
- WebSocket firewall toggle
- Read-only preflight
/opt/kavoshrust/
├── .env
├── bin/
│ ├── hbbs
│ └── hbbr
├── data/
│ ├── id_ed25519
│ └── id_ed25519.pub
├── client-config.txt
├── version
└── nginx-site.conf # copy of KavoshRust vhost when SSL is enabled
/etc/systemd/system/kavoshrust-hbbs.service
/etc/systemd/system/kavoshrust-hbbr.service
/etc/nginx/conf.d/kavoshrust.conf
/var/backups/kavoshrust/
/var/log/kavoshrust-manager.log
Run:
kavoshrust --infoThen configure both technician and customer RustDesk clients with the exact displayed:
- ID Server
- Relay Server
- Key
Leave API Server empty for OSS.
See docs/CLIENT.md.
- Persian guide
- Client setup
- Server operations
- Kavosh deployment checklist
- Maintenance
- Security
- Troubleshooting
- RustDesk Server OSS: https://github.com/rustdesk/rustdesk-server
- RustDesk install docs: https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/install/
- Client configuration: https://rustdesk.com/docs/en/self-host/client-configuration/
RustDesk Server OSS is a separate upstream project licensed under AGPL-3.0.