A service of Daily Data, Inc.
Contact Form

User Tools

Site Tools


software:rust:autoconfig_client

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
software:rust:autoconfig_client [2025/09/19 01:07] – created rodolicosoftware:rust:autoconfig_client [2025/09/19 01:57] (current) rodolico
Line 9: Line 9:
  
 ===== Determine your configuration string ===== ===== Determine your configuration string =====
 +
 +Choose one of the following two options, and save the result someplace.
  
 ==== Client already configured ==== ==== Client already configured ====
Line 29: Line 31:
  
 <code bash> <code bash>
-echo '{"host":"rustdesk.example.org","key":"wMloYQ1ITxrK/IMDcusccQZC0isjybRA16r9bSDhvqk="}' | base64 -w 0 | tr -d '=' | rev | echo+echo '{"host":"rustdesk.example.org","key":"wMloYQ1ITxrK/IMDcusccQZC0isjybRA16r9bSDhvqk="}' | base64 -w 0 | tr -d '=' | rev
 </code> </code>
  
Line 35: Line 37:
 <code> <code>
 gC9JSPrFndoR0Uiljc2ETQSJWeqNXawMkWRN2YzV3YE1USvskc4RVSxEVWvxWT3JiOikXZrJCLicmcv5SZsBXbhhXZus2clRGdzVnciojI0N3boJye gC9JSPrFndoR0Uiljc2ETQSJWeqNXawMkWRN2YzV3YE1USvskc4RVSxEVWvxWT3JiOikXZrJCLicmcv5SZsBXbhhXZus2clRGdzVnciojI0N3boJye
-<code>+</code>
  
 Store it someplace; you'll need it to customize your installers Store it someplace; you'll need it to customize your installers
Line 41: Line 43:
 ===== Download installer scripts ===== ===== Download installer scripts =====
  
 +Several installer scripts are available from [[https://rustdesk.com/docs/en/self-host/client-deployment/|RustDesk]]. These include:
 +  * PowerShell script for Microsoft Windows
 +  * Batch/cmd script for Microsoft Windows (use the PowerShell)
 +  * Bash script for MacOS
 +  * Bash script for Linux
 +    * Note that this only works on systems which use SystemD as the init, but will give an error message if the distribution is unsupported
  
 +Download the installers you want to use.
  
 +===== Customize Scripts =====
  
-Substitute your DNS name for rustdesk.example.org and echo '{"host":"rustdesk.example.org","key":"wMloYQ1ITxrK/IMDcusccQZC0isjybRA16r9bSDhvqk="}' | base64 -w 0 | tr -d '=' | rev | echo+Edit each installer scriptIn the script, you will find the string **configstring**, probably in single or double quotesReplace **configstring** with what you received in the first step (your configuration string)
  
 +These installers can be run on workstations which will automatically download and install RustDesk Client and do the base configuration.
  
  
-The first part is to +===== Single script =====
  
 +If you are on a Unix machine (includes MacOS), all of the steps can be done at one time. Download all of your installer scripts into one directory. Save them all with either a .sh or a .ps1 suffix (bash shell and powershell respectively), then run the command below in that directory.
  
-The script that techahold wrote will ask permissionthen automatically install lightweight web server and create customized installers for Windows and Linux. I'm not going into that herebut it is pretty straightforwardAnother github userdinger1986has install scripts for [[https://raw.githubusercontent.com/dinger1986/rustdeskinstall/master/WindowsAgentAIOInstall.ps1|Microsoft Windows]] and many flavors of [[https://raw.githubusercontent.com/dinger1986/rustdeskinstall/master/linuxclientinstall.sh|Linux]] (not Devuan, unfortunately).+If you already have your configuration stringcreate file named configstr.txt and put it in therewith **no line returns**No blank lines beforeafteretc...
  
-Basically, you can download those scripts and run the following commands on themThen, make them available to your users who can run them on their computer and have RustDesk Client installed on their computer, already set up for your server.+WARNING: All .sh and .ps1 files in the directory will be modified with no backup.
  
-Download and edit the following file. Change your.url.or.ip to the URL or IP of your new server, and change contents_of_public_key_file_on_your_server to the contents of /opt/rustdesk/id_ed25519.pub. When done, you will have two files, //WindowsAgentAIOInstall.ps1//, which can be run with Windows Power Shell, and //linuxclientinstall.sh// which can be run from the command line on a Linux machine. +<code bash installers
- +#! /usr/bin/env bash
-<code bash> +
-#!/usr/bin/env sh+
  
-WANIP=your.url.or.ip +if [ ! -f configstring.txt ] 
-KEY=contents_of_public_key_file_on_your_server +then 
-string="{\"host\":\"${wanip}\",\"relay\":\"${wanip}\",\"key\":\"${key}\",\"api\":\"https://${wanip}\"}+   echo -n '{"host":"rustdesk.example.org","key":"wMloYQ1ITxrK/IMDcusccQZC0isjybRA16r9bSDhvqk="}| base64 -w 0 | tr -d '=' | rev > configstring.txt 
-string64=$(echo -n "$string" | base64 -w 0 | tr -d '='+fi 
-string64rev=$(echo -n "$string64" | rev) +config=`cat configstring.txt` 
-wget https://raw.githubusercontent.com/dinger1986/rustdeskinstall/master/WindowsAgentAIOInstall.ps1 +for file in `ls *.ps1 *.sh
-sudo sed -i "s|secure-string|${string64rev}|g" WindowsAgentAIOInstall.ps1 +do 
-# Create linux install script +   sed -i "s|configstring|$config|g" $file 
-wget https://raw.githubusercontent.com/dinger1986/rustdeskinstall/master/linuxclientinstall.sh +done
-sudo sed -i "s|secure-string|${string64rev}|g" linuxclientinstall.sh+
 </code> </code>
  
 +This will also put the configuration string into the file configstring.txt. If you can not use an installer, just open that file and copy that in the clipboard and import it into your client (same as exporting above, just using the other icon)
software/rust/autoconfig_client.1758262072.txt.gz · Last modified: 2025/09/19 01:07 by rodolico