software:rust:server_devuan
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| software:rust:server_devuan [2025/09/18 16:40] – rodolico | software:rust:server_devuan [2025/09/29 16:51] (current) – rodolico | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== RustDesk Server on Devuan ====== | ====== RustDesk Server on Devuan ====== | ||
| - | |||
| - | <WRAP center round alert 60%> | ||
| - | Warning. I am still editing this on 18 Sep 2025. Do not use these instructions until I have finished editing, then tested the procedure. This notice will be removed at that time. | ||
| - | </ | ||
| <WRAP center round important 60%> | <WRAP center round important 60%> | ||
| - | The RustDesk Server must be accessible from any connecting clients on ports 21115-21119, TCP and UDP. If any workstation will be accessing from outside your network, you will need to forward those ports on your router to your server | + | The RustDesk Server must be accessible from any connecting clients on ports 21114-21119, TCP and UDP. If any workstation will be accessing from outside your network, you will need to forward those ports on your router to your server. Not all are required for all installations. See section //Open Ports// for more information. |
| </ | </ | ||
| Line 14: | Line 10: | ||
| This article describes how to set up the Rust Server on Devuan, and may be helpful for other systems also. | This article describes how to set up the Rust Server on Devuan, and may be helpful for other systems also. | ||
| + | |||
| + | |||
| + | ===== Open Ports ===== | ||
| + | |||
| + | On your firewall/ | ||
| + | |||
| + | Following table shows what the ports are used for. | ||
| + | |||
| + | ^Port | ||
| + | | 21114 | HBBS (RustDesk server) | TCP | Default port for API (not required) | ||
| + | | 21115 | HBBS (RustDesk server) | TCP/UDP | Default port for the RustDesk server. | ||
| + | | 21116 | HBBS (RustDesk server) | TCP/UDP | Used for client connections to the server. | ||
| + | | 21117 | HBBS (RustDesk server) | TCP/UDP | Additional port for server communication. | ||
| + | | 21118 | HBBS (RustDesk server) | TCP/UDP | Another port for server communication. | ||
| + | | 21119 | HBBS (RustDesk server) | TCP/UDP | Used for additional server functionalities. | | ||
| + | | 80 | HTTP (optional fallback) | TCP | Commonly allowed port for web traffic; can be used for fallback. | | ||
| + | | 443 | HTTPS (optional fallback) | TCP | Secure web traffic; can be used for fallback | ||
| ===== Set up user ===== | ===== Set up user ===== | ||
| Line 37: | Line 50: | ||
| LATEST=$(curl https:// | LATEST=$(curl https:// | ||
| wget " | wget " | ||
| - | wget ###Paste the URL from above here### | ||
| unzip rustdesk-server-linux-amd64.zip | unzip rustdesk-server-linux-amd64.zip | ||
| mv / | mv / | ||
| Line 56: | Line 68: | ||
| **Note**: The check is made in the current working directory, so you **must** run hbbs from within it's home directory (/ | **Note**: The check is made in the current working directory, so you **must** run hbbs from within it's home directory (/ | ||
| - | |||
| - | A way that gives you more control is to run the rustdesk-utils, | ||
| <code bash> | <code bash> | ||
| cd / | cd / | ||
| - | sudo -u rust ./ | ||
| - | # verify they exist | ||
| - | ls -ablph id_ed25519* | ||
| - | # make them owned by the rust user | ||
| - | chown rust:rust id_ed25519* | ||
| echo Starting signaling server for testing. Press ^c to exit when you are happy | echo Starting signaling server for testing. Press ^c to exit when you are happy | ||
| sudo -u rust ./hbbs | sudo -u rust ./hbbs | ||
| Line 72: | Line 77: | ||
| cat id_ed25519.pub | cat id_ed25519.pub | ||
| echo To find this again at a later date, just run the command cat id_ed25519.pub | echo To find this again at a later date, just run the command cat id_ed25519.pub | ||
| - | </ | ||
| + | </ | ||
| ===== Set automatic run ===== | ===== Set automatic run ===== | ||
| Line 79: | Line 84: | ||
| Copy the following two files to /etc/init.d (Devuan), or wherever your init scripts are stored. By the way, I built these starting with the template at [[https:// | Copy the following two files to /etc/init.d (Devuan), or wherever your init scripts are stored. By the way, I built these starting with the template at [[https:// | ||
| + | |||
| + | Create the file / | ||
| <code bash hbbs> | <code bash hbbs> | ||
| Line 92: | Line 99: | ||
| ### END INIT INFO | ### END INIT INFO | ||
| - | dir="/ | + | dir="/ |
| - | cmd=" | + | cmd="/ |
| user=" | user=" | ||
| name=`basename $0` | name=`basename $0` | ||
| pid_file="/ | pid_file="/ | ||
| - | stdout_log="/ | + | stdout_log="/ |
| - | stderr_log="/ | + | stderr_log="/ |
| get_pid() { | get_pid() { | ||
| Line 180: | Line 187: | ||
| exit 0 | exit 0 | ||
| + | |||
| </ | </ | ||
| + | |||
| + | Create the file / | ||
| + | |||
| <code bash hbbr> | <code bash hbbr> | ||
| #!/bin/sh | #!/bin/sh | ||
| ### BEGIN INIT INFO | ### BEGIN INIT INFO | ||
| - | # Provides: | + | # Provides: |
| # Required-Start: | # Required-Start: | ||
| # Required-Stop: | # Required-Stop: | ||
| Line 194: | Line 205: | ||
| ### END INIT INFO | ### END INIT INFO | ||
| - | dir="/ | + | dir="/ |
| - | cmd=" | + | cmd="/ |
| user=" | user=" | ||
| name=`basename $0` | name=`basename $0` | ||
| pid_file="/ | pid_file="/ | ||
| - | stdout_log="/ | + | stdout_log="/ |
| - | stderr_log="/ | + | stderr_log="/ |
| get_pid() { | get_pid() { | ||
| Line 282: | Line 293: | ||
| exit 0 | exit 0 | ||
| + | |||
| </ | </ | ||
| Line 300: | Line 312: | ||
| If you made it through the last step with no errors, you should now be able to access the server from one of the clients. | If you made it through the last step with no errors, you should now be able to access the server from one of the clients. | ||
| - | ===== Optional Steps ===== | + | ===== Set automatic log rotate |
| - | The script that techahold wrote will ask permission, then automatically install a lightweight web server and create customized installers for Windows and Linux. I'm not going into that here, but it is pretty straightforward. Another github user, dinger1986, has install scripts for [[https:// | + | Your logs can get quite large, so it is best to rotate them occassional. Devuan uses the logrotate script to do this for, and it is fairly simple to add a new definition in /etc/logrotate.d for the next pass. |
| - | Basically, you can download those scripts and run the following commands on them. Then, 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. | + | Following command will create |
| - | Download | + | This is just one command. Just copy and paste it anywhere into the server. |
| - | <code bash> | + | <code bash rotatelogs> |
| - | #!/usr/bin/env sh | + | cat << EOF > /etc/logrotate.d/rustdesk |
| - | + | /var/log/rustdesk/*.log /var/log/rustdesk/*.err { | |
| - | WANIP=your.url.or.ip | + | daily |
| - | KEY=contents_of_public_key_file_on_your_server | + | rotate 14 |
| - | string=" | + | |
| - | string64=$(echo -n " | + | |
| - | string64rev=$(echo -n " | + | |
| - | wget https://raw.githubusercontent.com/dinger1986/rustdeskinstall/master/WindowsAgentAIOInstall.ps1 | + | |
| - | sudo sed -i " | + | service hbbr restart > /dev/null |
| - | # Create linux install script | + | service hbbs restart > /dev/null |
| - | wget https://raw.githubusercontent.com/dinger1986/rustdeskinstall/ | + | |
| - | sudo sed -i " | + | |
| + | | ||
| + | | ||
| + | } | ||
| + | EOF | ||
| </ | </ | ||
| + | |||
| ===== Links ===== | ===== Links ===== | ||
software/rust/server_devuan.1758231609.txt.gz · Last modified: 2025/09/18 16:40 by rodolico
