# Byte-Bak RustDesk Manual Install / Fallback

Use this if the main package does not work on a client.

## Current Byte-Bak RustDesk server
- **Server host:** `remote.byte-bak.com`
- **ID server port:** `21116` TCP + UDP
- **Relay port:** `21117` TCP
- **Extra NAT-test port:** `21115` TCP
- **Current reachability note:** `21115`, `21116`, and `21117` are expected to be externally mapped for normal field use.
- **Web client ports:** `21118` / `21119` TCP only, not required for normal Windows client use
- **Public key:** `3MrrIaLhWVgL8vP40V7VyKVgyg5YPwgfRuDxbCXukiM=`

## What the key is
- This is the **public** half of the RustDesk server keypair.
- It is safe to copy into clients.
- It is used so the client trusts the Byte-Bak RustDesk server and encrypts connections correctly.
- The private key stays on the server.

## Fast manual install path
1. Download the Windows client from the RustDesk GitHub release page.
   - Pinned bundle version: `1.4.6`
   - Pinned x64 EXE: `https://github.com/rustdesk/rustdesk/releases/download/1.4.6/rustdesk-1.4.6-x86_64.exe`
2. Run the installer as Administrator.
3. Start RustDesk once.
4. Open **Settings → Network**.
5. Unlock the network settings.
6. Enter:
   - **ID server:** `remote.byte-bak.com:21116`
   - **Relay server:** `remote.byte-bak.com:21117`
   - **Key:** `3MrrIaLhWVgL8vP40V7VyKVgyg5YPwgfRuDxbCXukiM=`
7. Apply/save.
8. Open **Settings → Security** and set a permanent password.
9. Make sure the RustDesk service is installed and set to automatic start.
10. Reboot once if you want to prove autostart.

## If the GUI does not keep the settings
Try writing the same RustDesk2.toml to these locations:
- `%APPDATA%\RustDesk\config\RustDesk2.toml`
- `C:\ProgramData\RustDesk\config\RustDesk2.toml`
- `C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk2.toml`
- `C:\Windows\System32\config\systemprofile\AppData\Roaming\RustDesk\config\RustDesk2.toml`

Then restart the RustDesk service.

## If you need the CLI instead of the GUI
From an elevated PowerShell or CMD in the RustDesk install folder:
- install service: `RustDesk.exe --install-service`
- set Byte-Bak server config: `RustDesk.exe --config "host=remote.byte-bak.com,key=3MrrIaLhWVgL8vP40V7VyKVgyg5YPwgfRuDxbCXukiM="`
- set password: `RustDesk.exe --password 'YourPasswordHere'`
- check ID: `RustDesk.exe --get-id`

## What a healthy client should look like
- RustDesk service running and set to Automatic
- RustDesk ID visible
- config contains the Byte-Bak server host and public key
- client can reach `remote.byte-bak.com:21116` and `remote.byte-bak.com:21117`

## Troubleshooting
- If ID does not appear, restart the service and wait 10 seconds
- If connections fail, confirm the client can reach the host on ports 21116 and 21117
- If the password did not stick, rerun `RustDesk.exe --password 'YourPasswordHere'` as Administrator and restart the service
- If the config is ignored, delete the local RustDesk config files and reapply
- If the package seems broken, run the verification script in this folder:
  - `Verify-ByteBak-RustDesk.ps1`
- If you launch the PowerShell installer directly from a normal non-admin shell, include `-SelfElevate` so it can relaunch itself as admin.
