How to install the rustdesk self hosted server
How to install the rustdesk self hosted server
How to install the rustdesk self hosted server
first make sure you have ubuntu server setup and installed
MINI REQUIRMENTS :
incase you also want to upgrade the distribution then you can use the command below
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
Please setup your firewall on your server prior to running the script.
Make sure you have got access via ssh or otherwise setup prior setting up the firewall, command
for UFW is:
These are 3 commands run each one separatly copy one by one don’t copy all
wget https://raw.githubusercontent.com/dinger1986/rustdeskinstall/master/install.sh
chmod +x install.sh
./install.sh
Follow the on screen instructions you will be asked to choose ip / domain
Choose according to your needs
1)IP
2) DNS/ Domain
If you choose 1 then enter the ip address that will be used for rust server
If you choose 2 then enter domain or dns if you use domain
Make sure you create a dns (A) record for your server ip in your domain host (dns
only) not proxied record .
Choose 1 for http server (gohttp) will be installed ( I don’t recommend it)
Copy this into a text file these information is critical and needed
You must copy it because it can’t be retrieved later and it is needed for client
configuration and web access .
username of web portal and your password to log in if you used gohttp .
USEFULL LINKS:
Documentations :
https://rustdesk.com/docs/en/
RUSTDESK CLIENT CONFIGURATION :
https://github.com/rustdesk/rustdesk/releases
if you want to make a preconfigured client install script read the below section
RUSTDESK WINDOWS POWERSHELL INSTALL SCRIPT
How to Generates a powershell script to install a Preconfigured client to your server for easy
deployment.
Go to this link :
https://rustdesk.com/docs/en/self-host/client-deployment/
MAKE SURE YOU CHANGE configstring MARKED BELOW WITH YOUR STRING.
https://github.com/rustdesk/rustdesk/releases
9JSPSvJzNrBDasJjNSdXOVVBlERDlleoNWZzIHcOJiOikXZr8mcw5yazVGZ0NXdy5CdyciojI0N3b
oJye
This is the configstring now paste it script below replace highlighted configstring with it and
save script as for example :
Rust-PreconfigClientinstall.PS1
Now you can use this script to install the preconfigured client linked to your self
hosted server to any PC or machine directly just by right click on script and
choose run with powershell .
https://rustdesk.com/docs/en/self-host/client-deployment/#powershell
POWERSHELL SCRIPT:
$ErrorActionPreference= 'silentlycontinue'
# Get your config string from your Web portal and Fill Below
$rustdesk_cfg="configstring"
if (-Not
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsIn
Role([Security.Principal.WindowsBuiltInRole]::Administrator))
{
Start-Process PowerShell -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy
Bypass -Command `"cd '$pwd'; & '$PSCommandPath';`"";
Exit;
# This function will return the latest version and download link as an object
function getLatest()
try
$HTML.IHTMLDocument2_write($Page.Content)
catch
$src = [System.Text.Encoding]::Unicode.GetBytes($Page.Content)
$HTML.write($src)
}
# Current example link:
https://github.com/rustdesk/rustdesk/releases/download/1.2.3/rustdesk-1.2.3-x86_64.exe
$Version = "unknown"
$Version = $matches['content']
Exit
return($Result)
$RustDeskOnGitHub = getLatest
$rdver = ((Get-ItemProperty
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RustDesk\").Version)
Exit
if (!(Test-Path C:\Temp))
{
New-Item -ItemType Directory -Force -Path C:\Temp > null
cd C:\Temp
Start-Sleep -seconds 20
$ServiceName = 'Rustdesk'
cd $env:ProgramFiles\RustDesk
Start-Sleep -seconds 20
}
while ($arrService.Status -ne 'Running')
Start-Service $ServiceName
Start-Sleep -seconds 5
$arrService.Refresh()
cd $env:ProgramFiles\RustDesk\
Write-Output "..............................................."