Skip to content
VenimK edited this page Jul 24, 2024 · 6 revisions

RustDesk Installer Guide By Deadboy18

Overview

This guide provides detailed instructions for using and customizing the installer.html file. The file offers a web interface to download various installer scripts for RustDesk on different operating systems.

Available Installer Scripts

The table below lists the available installer scripts for different operating systems:

Operating System Script Type File Name Download Link
Windows EXE File rustdesk-licensed-secure-string.exe Download EXE
Windows Batch Script install.bat Download Batch
Windows Powershell Script install.ps1 Download Powershell
Linux Shell Script install-linux.sh Download Shell
Mac Shell Script install-mac.sh Download Shell

Note: Ensure the file names remain unchanged to avoid editing the HTML links.

Using the Installer.html File

File Structure

The installer.html file uses a templating engine to extend a base template and includes several blocks to display installer files and configurations.

Key Sections

  1. Title and Header:

    {% block title %}RustDesk WebUI{% endblock %}
    {% block legend_name %}Installer Files{% endblock %}
  2. Content Block:

    {% block content %}
    ...
    {% endblock %}
  3. Installer Table:

    <table class="layui-table">
        <thead>
            <tr>
                <th>Windows EXE</th>
                <th>Windows Installer</th>
                <th>Linux Installer</th>
                <th>Mac Installer</th>
                <th>QR to scan With Mobile App</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td> <a href="/static/configs/rustdesk-licensed-secure-string.exe">Download</a></td>
                ...
            </tr>
        </tbody>
    </table>

Configurations Table

```html
<table class="layui-table">
    <thead>
        <tr>
            <th>API URL</th>
            <th>Key</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td> https://UniqueURL </td>
            <td> UniqueKey </td>
        </tr>
    </tbody>
</table>
```

Customizing the Installer Scripts

To customize the installer scripts, follow these steps:

  1. Locate the Configuration Directory:

    • The scripts are located in the following directory on your server:
      /rustdesk-api-server-master/static/configs
      
  2. Run File Explorer as Admin:

    • Open GNOME Files or Nautilus.
    • Click on "Other Locations" in the left pane.
    • Press CTRL+L to bring up the address bar.
    • Type admin:/// and hit enter.
    • Authenticate with your admin password to gain root access.
  3. Modify or Replace Scripts:

    • Ensure the file names remain unchanged to avoid editing the HTML links:
      • Windows:
        • Powershell script: install.ps1
        • Batch script: install.bat
        • EXE file: rustdesk-licensed-secure-string.exe
      • Linux:
        • Shell script: install-linux.sh
      • Mac:
        • Shell script: install-mac.sh (or use install-linux.sh)
  4. Upload New Scripts:

    • Replace the existing files in the directory:
      /rustdesk-api-server-master/static/configs
      

Using Different File Names

If you need to use different file names for the installer scripts, update the corresponding links and button data attributes in the installer.html file.

Windows EXE File

Change the filename in the href attribute and the data-content attribute of the "Copy Link" button:

<td>
  <a href="/static/configs/new-filename.exe">Download</a><br><br>
  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-filename.exe">Copy Link</button>
</td>



##Windows Installer (Batch and Powershell)
  Change the filenames for both batch script and Powershell script:
  Replace "new-install.bat" with your desired name don't forget to add the .bat at the end
  Replace "new-install.ps1" with your desired name don't forget to add the .ps1 at the end
Download bat

Copy Link

Download Powershell

Copy Link ```

##Linux Installer Change the filename for the Linux shell script: Replace "new-install-linux.sh" with your desired name don't forget to add the .sh at the end

<td>
  <a href="/static/configs/new-install-linux.sh">Download</a><br><br>
  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-install-linux.sh">Copy Link</button>
</td>

##Mac Installer Change the filename for the Mac shell script: Replace "new-install-mac.sh" with your desired name don't forget to add the .sh at the end

<td>
  <a href="/static/configs/new-install-mac.sh">Download</a><br><br>
  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-install-mac.sh">Copy Link</button>
</td>

##Complete Example with Changed Filenames Here’s how your updated installer.html might look with different filenames:

##Complete Example with Changed Filenames Here’s how your updated installer.html might look with different filenames:

{% extends "base.html" %}
{% block title %}RustDesk WebUI{% endblock %}
{% block legend_name %}Installer Files{% endblock %}
{% block content %}
<div style="padding: 20px; background-color: #F2F2F2;">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md15">
      <div class="layui-card">
        <div class="layui-card-header">Installer Files for {{u.username}}</div>
        <div class="layui-card-body">
          <table class="layui-table">
            <thead>
              <tr>
                <th>Windows EXE</th>
                <th>Windows Installer</th>
                <th>Linux Installer</th>
                <th>Mac Installer</th>
                <th>QR to scan With Mobile App</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td> 
                  <a href="/static/configs/new-rustdesk-licensed-secure-string.exe">Download</a><br><br>
                  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-rustdesk-licensed-secure-string.exe">Copy Link</button>
                </td>
                <td> 
                  <a href="/static/configs/new-install.bat">Download bat</a><br><br>
                  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-install.bat">Copy Link</button><br>
                  <br>
                  <a href="/static/configs/new-install.ps1">Download Powershell</a><br><br>
                  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-install.ps1">Copy Link</button>
                </td>
                <td> 
                  <a href="/static/configs/new-install-linux.sh">Download</a><br><br>
                  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-install-linux.sh">Copy Link</button>
                </td>
                <td> 
                  <a href="/static/configs/new-install-mac.sh">Download</a><br><br>
                  <button onclick="copyToClipboard(this)" data-content="https://UniqueURL/static/configs/new-install-mac.sh">Copy Link</button>
                </td>
                <td> 
                  <img src="/static/configs/qrcode.png">
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    ...
  </div>
</div>
{% endblock %}

By updating the filenames in these sections, you can ensure that the download links and copy buttons will work correctly with the new script names. Make sure to replace new-filename with your actual filenames.

##Reboot Scripts Also add some reboot scripts for API/Relay/Server

API = API REBOOT

Relay = RELAY REBOOT

SERVER = SERVER REBOOT