mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2024-12-26 17:09:14 +01:00
Merge pull request #268 from dinger1986/master
various changes, adding configuring clients under self hosting, batch file etc
This commit is contained in:
commit
e6e6d8a042
@ -7,7 +7,7 @@ You can deploy using a number of methods, some are covered in [Client](/docs/en/
|
|||||||
|
|
||||||
Alternatively you can use mass deployment scripts with your RMM, Intune etc., the ID and password is output by the script, you should collect this, or split this off into different scripts to collect the ID and password.
|
Alternatively you can use mass deployment scripts with your RMM, Intune etc., the ID and password is output by the script, you should collect this, or split this off into different scripts to collect the ID and password.
|
||||||
|
|
||||||
The permanent password can be changed from random to one you prefer using by changing the content inside `()` after `rustdesk_pw` to your preferred password.
|
The permanent password can be changed from random to one you prefer using by changing the content inside `()` after `rustdesk_pw` to your preferred password for powershell and the corresponding line for any other platform.
|
||||||
|
|
||||||
### PowerShell
|
### PowerShell
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ The permanent password can be changed from random to one you prefer using by cha
|
|||||||
$ErrorActionPreference= 'silentlycontinue'
|
$ErrorActionPreference= 'silentlycontinue'
|
||||||
|
|
||||||
# Assign the value random password to the password variable
|
# Assign the value random password to the password variable
|
||||||
$rustdesk_pw = (-join ((65..90) + (97..122) | Get-Random -Count 12 | % {[char]$_}))
|
$rustdesk_pw=(-join ((65..90) + (97..122) | Get-Random -Count 12 | % {[char]$_}))
|
||||||
|
|
||||||
# Get your config string from your Web portal and Fill Below
|
# Get your config string from your Web portal and Fill Below
|
||||||
rustdesk_cfg="configstring"
|
rustdesk_cfg="configstring"
|
||||||
@ -84,11 +84,48 @@ Write-Output "RustDesk ID: $rustdesk_id"
|
|||||||
# Show the value of the Password Variable
|
# Show the value of the Password Variable
|
||||||
Write-Output "Password: $rustdesk_pw"
|
Write-Output "Password: $rustdesk_pw"
|
||||||
Write-Output "..............................................."
|
Write-Output "..............................................."
|
||||||
|
|
||||||
echo "Please complete install on GUI, launching RustDesk now."
|
|
||||||
open -n /Applications/RustDesk.app
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Windows batch/cmd
|
||||||
|
|
||||||
|
```bat
|
||||||
|
REM Assign the value random password to the password variable
|
||||||
|
set rustdesk_pw=
|
||||||
|
|
||||||
|
REM Get your config string from your Web portal and Fill Below
|
||||||
|
set rustdesk_cfg="configstring"
|
||||||
|
|
||||||
|
REM ############################### Please Do Not Edit Below This Line #########################################
|
||||||
|
|
||||||
|
if not exist C:\TEMP\ md C:\TEMP\
|
||||||
|
cd c:\temp\
|
||||||
|
|
||||||
|
curl -L "https://github.com/rustdesk/rustdesk/releases/download/1.2.2/rustdesk-1.2.2-x86_64.exe" -o rustdesk.exe
|
||||||
|
|
||||||
|
rustdesk.exe --silent-install
|
||||||
|
|
||||||
|
$ServiceName = 'Rustdesk'
|
||||||
|
$arrService = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
cd "c:\Program Files\RustDesk\"
|
||||||
|
for /f "delims=" %i IN ('rustdesk.exe --get-id ^| more') DO set rustdesk_id=%i
|
||||||
|
|
||||||
|
net stop rustdesk > null
|
||||||
|
RustDesk.exe --config %rustdesk_cfg%
|
||||||
|
|
||||||
|
|
||||||
|
net start rustdesk > null
|
||||||
|
|
||||||
|
RustDesk.exe --password %rustdesk_pw%
|
||||||
|
|
||||||
|
echo "..............................................."
|
||||||
|
REM Show the value of the ID Variable
|
||||||
|
echo "RustDesk ID: %rustdesk_id%"
|
||||||
|
|
||||||
|
REM Show the value of the Password Variable
|
||||||
|
echo "Password: %rustdesk_pw%"
|
||||||
|
echo "..............................................."
|
||||||
|
```
|
||||||
|
|
||||||
### macOS Bash
|
### macOS Bash
|
||||||
|
|
||||||
@ -178,7 +215,7 @@ open -n /Applications/RustDesk.app
|
|||||||
rustdesk_pw=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)
|
rustdesk_pw=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)
|
||||||
|
|
||||||
# Get your config string from your Web portal and Fill Below
|
# Get your config string from your Web portal and Fill Below
|
||||||
rustdesk_cfg="encryptedconfigstring"
|
rustdesk_cfg="configstring"
|
||||||
|
|
||||||
################################### Please Do Not Edit Below This Line #########################################
|
################################### Please Do Not Edit Below This Line #########################################
|
||||||
|
|
||||||
|
@ -84,9 +84,6 @@ Write-Output "RustDesk Kimlik: $rustdesk_id"
|
|||||||
# Şifre Değişkeninin değerini gösterin
|
# Şifre Değişkeninin değerini gösterin
|
||||||
Write-Output "Şifre: $rustdesk_pw"
|
Write-Output "Şifre: $rustdesk_pw"
|
||||||
Write-Output "..............................................."
|
Write-Output "..............................................."
|
||||||
|
|
||||||
echo "Lütfen kurulumu GUI üzerinde tamamlayın, RustDesk'i şimdi başlatıyorum."
|
|
||||||
open -n /Applications/RustDesk.app
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
32
content/self-host/client-configuration/_index.en.md
Normal file
32
content/self-host/client-configuration/_index.en.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
title: Self-host
|
||||||
|
weight: 200
|
||||||
|
pre: "<b>2. </b>"
|
||||||
|
chapter: true
|
||||||
|
---
|
||||||
|
|
||||||
|
### Overview
|
||||||
|
|
||||||
|
There are a number of ways to configure RustDesk clients to use your own self-hosted server, we will cover some below.
|
||||||
|
|
||||||
|
### Manual Config
|
||||||
|
|
||||||
|
In the main RustDesk Client home click on the 3 dots next to your ID then click on Network, you can now unlock the settings using elevated privileges and set your ID, Relay, API and Keys.
|
||||||
|
|
||||||
|
![image](/docs/en/self-host/client-configuration/images/network-config.png)
|
||||||
|
|
||||||
|
### Automatic Config
|
||||||
|
|
||||||
|
The easiest way to setup automatically is using deployment scripts found [here](/docs/en/client/client-deployment/)
|
||||||
|
|
||||||
|
You can fix the Password is required and use a reverse base64 string in the format `{"host":"HOSTADDRESS","key":"HOSTKEY","api":"http://HOSTADDRESS:21114"` to automatically configure the clients, this is available automatically with RustDesk Server Pro via the console.
|
||||||
|
|
||||||
|
|
||||||
|
### URL
|
||||||
|
|
||||||
|
To ease integration with other systems you can call RustDesk using a URL, it should be in the following format
|
||||||
|
|
||||||
|
`rustdesk://connection/new/agentid?password=agentpassword`
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
content/self-host/client-configuration/images/network-config.png
Normal file
BIN
content/self-host/client-configuration/images/network-config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@ -26,7 +26,7 @@ sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -td --r
|
|||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
|
|
||||||
With Docker Compose you HAVE to use `network_mode: "host"`. Install Docker using this [guide](https://docs.docker.com/engine/install) to ensure its the most up to date!
|
With Docker Compose you HAVE to use `network_mode: "host"` to ensure licensing works. Install Docker using this [guide](https://docs.docker.com/engine/install) to ensure its the most up to date!
|
||||||
|
|
||||||
Copy the below into `docker-compose.yml`.
|
Copy the below into `docker-compose.yml`.
|
||||||
|
|
||||||
|
@ -226,3 +226,31 @@ If the script installed Nginx then remove using:
|
|||||||
```sh
|
```sh
|
||||||
sudo apt remove nginx
|
sudo apt remove nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How can I remove devices from the device list in the web console?
|
||||||
|
Disable and then delete will now be available.
|
||||||
|
|
||||||
|
## How Can I update RustDesk Wth Powershell?
|
||||||
|
|
||||||
|
```ps
|
||||||
|
$ErrorActionPreference= 'silentlycontinue'
|
||||||
|
|
||||||
|
$rdver = ((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RustDesk\").Version)
|
||||||
|
|
||||||
|
if($rdver -eq "1.2.2")
|
||||||
|
{
|
||||||
|
write-output "RustDesk $rdver is the newest version"
|
||||||
|
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
If (!(Test-Path c:\Temp)) {
|
||||||
|
New-Item -ItemType Directory -Force -Path c:\Temp > null
|
||||||
|
}
|
||||||
|
|
||||||
|
cd c:\Temp
|
||||||
|
|
||||||
|
powershell Invoke-WebRequest "https://github.com/rustdesk/rustdesk/releases/download/1.2.2/rustdesk-1.2.2-x86_64.exe" -Outfile "rustdesk.exe"
|
||||||
|
Start-Process .\rustdesk.exe --silent-install -wait
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: RustDesk Server Pro
|
title: RustDesk Server Pro
|
||||||
weight: 200
|
weight: 2
|
||||||
pre: "<b>2.2. </b>"
|
pre: "<b>2.2. </b>"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -50,3 +50,27 @@ What it does:
|
|||||||
- Download and extract RustDesk Pro Services to the above folder
|
- Download and extract RustDesk Pro Services to the above folder
|
||||||
- Create systemd services for hbbs and hbbr (service names are rustdesk-hbbs.service and rustdesk-hbbr.service)
|
- Create systemd services for hbbs and hbbr (service names are rustdesk-hbbs.service and rustdesk-hbbr.service)
|
||||||
- If you choose Domain, it will install Nginx and Certbot, allowing the API to be available on port 443 (https) and get an SSL certificate over port 80, it is automatically renewed
|
- If you choose Domain, it will install Nginx and Certbot, allowing the API to be available on port 443 (https) and get an SSL certificate over port 80, it is automatically renewed
|
||||||
|
|
||||||
|
## Backup/Restore
|
||||||
|
|
||||||
|
To make life easy we have created a backup and restore script, this will take the keys, all configuration and database and create a tar file which can be saved to else where.
|
||||||
|
|
||||||
|
To setup the backup script on your RustDesk Server do the following:
|
||||||
|
```
|
||||||
|
wget https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/backup.sh
|
||||||
|
chmod +x backup.sh
|
||||||
|
```
|
||||||
|
You now have options.
|
||||||
|
|
||||||
|
Run the backup script to create a one time backup `./backup.sh`
|
||||||
|
Or /
|
||||||
|
Run the backup script `--schedule` (full command would be `./backup.sh --schedule` this will schedule the backup script to run nightly and autorotate.
|
||||||
|
|
||||||
|
To Restore do the following:
|
||||||
|
```
|
||||||
|
wget https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/restore.sh
|
||||||
|
chmod +x
|
||||||
|
```
|
||||||
|
Copy the backup file into the same folder as the restore.sh file and then run
|
||||||
|
`./restore.sh`
|
||||||
|
This will restore your server to how it was prior, you will need to revoke your [license](/docs/en/self-host/rustdesk-server-pro/license) to move it to the restored server.
|
||||||
|
Loading…
Reference in New Issue
Block a user