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 08:16] – rodolico | software:rust:server_devuan [2025/09/18 11:18] (current) – rodolico | ||
---|---|---|---|
Line 8: | Line 8: | ||
We use [[https:// | We use [[https:// | ||
- | The Rust Server install script unfortunately assumes SystemD, and will fail halfway through as it is attempting to set up the SystemD service. The same is true of the .deb package which is available. | + | An excellent |
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. | ||
Line 50: | Line 50: | ||
**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> | ||
+ | cd / | ||
+ | sudo -u rust ./ | ||
+ | # verify they exist | ||
+ | ls -ablph id_ed25519* | ||
+ | # make them owned by the rust user | ||
+ | chown rust:rust id_ed25519* | ||
+ | sudo -u rust ./hbbs | ||
+ | # watch for errors, press ^c to leave. | ||
+ | |||
+ | echo Your key for the clients is | ||
+ | cat id_ed25519.pub | ||
+ | echo To find this again at a later date, just run the command cat id_ed25519.pub | ||
+ | </ | ||
+ | |||
+ | ===== Set automatic run ===== | ||
+ | |||
+ | Everything up to this point will work on all Unix systems, and we have done nothing that techahold' | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | <code bash hbbs> | ||
+ | #!/bin/sh | ||
+ | ### BEGIN INIT INFO | ||
+ | # Provides: | ||
+ | # Required-Start: | ||
+ | # Required-Stop: | ||
+ | # Default-Start: | ||
+ | # Default-Stop: | ||
+ | # Short-Description: | ||
+ | # Description: | ||
+ | ### END INIT INFO | ||
+ | |||
+ | dir="/ | ||
+ | cmd=" | ||
+ | user=" | ||
+ | |||
+ | name=`basename $0` | ||
+ | pid_file="/ | ||
+ | stdout_log="/ | ||
+ | stderr_log="/ | ||
+ | |||
+ | get_pid() { | ||
+ | cat " | ||
+ | } | ||
+ | |||
+ | is_running() { | ||
+ | [ -f " | ||
+ | } | ||
+ | |||
+ | case " | ||
+ | start) | ||
+ | if is_running; then | ||
+ | echo " | ||
+ | else | ||
+ | echo " | ||
+ | cd " | ||
+ | if [ -z " | ||
+ | sudo $cmd >> " | ||
+ | else | ||
+ | sudo -u " | ||
+ | fi | ||
+ | echo $! > " | ||
+ | if ! is_running; then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | fi | ||
+ | ;; | ||
+ | stop) | ||
+ | if is_running; then | ||
+ | echo -n " | ||
+ | kill `get_pid` | ||
+ | for i in 1 2 3 4 5 6 7 8 9 10 | ||
+ | # for i in `seq 10` | ||
+ | do | ||
+ | if ! is_running; then | ||
+ | break | ||
+ | fi | ||
+ | |||
+ | echo -n " | ||
+ | sleep 1 | ||
+ | done | ||
+ | echo | ||
+ | |||
+ | if is_running; then | ||
+ | echo "Not stopped; may still be shutting down or shutdown may have failed" | ||
+ | exit 1 | ||
+ | else | ||
+ | echo " | ||
+ | if [ -f " | ||
+ | rm " | ||
+ | fi | ||
+ | fi | ||
+ | else | ||
+ | echo "Not running" | ||
+ | fi | ||
+ | ;; | ||
+ | restart) | ||
+ | $0 stop | ||
+ | if is_running; then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | $0 start | ||
+ | ;; | ||
+ | status) | ||
+ | if is_running; then | ||
+ | echo " | ||
+ | else | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | ;; | ||
+ | *) | ||
+ | echo " | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | |||
+ | <code bash hbbr> | ||
+ | #!/bin/sh | ||
+ | ### BEGIN INIT INFO | ||
+ | # Provides: | ||
+ | # Required-Start: | ||
+ | # Required-Stop: | ||
+ | # Default-Start: | ||
+ | # Default-Stop: | ||
+ | # Short-Description: | ||
+ | # Description: | ||
+ | ### END INIT INFO | ||
+ | |||
+ | dir="/ | ||
+ | cmd=" | ||
+ | user=" | ||
+ | |||
+ | name=`basename $0` | ||
+ | pid_file="/ | ||
+ | stdout_log="/ | ||
+ | stderr_log="/ | ||
+ | |||
+ | get_pid() { | ||
+ | cat " | ||
+ | } | ||
+ | |||
+ | is_running() { | ||
+ | [ -f " | ||
+ | } | ||
+ | |||
+ | case " | ||
+ | start) | ||
+ | if is_running; then | ||
+ | echo " | ||
+ | else | ||
+ | echo " | ||
+ | cd " | ||
+ | if [ -z " | ||
+ | sudo $cmd >> " | ||
+ | else | ||
+ | sudo -u " | ||
+ | fi | ||
+ | echo $! > " | ||
+ | if ! is_running; then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | fi | ||
+ | ;; | ||
+ | stop) | ||
+ | if is_running; then | ||
+ | echo -n " | ||
+ | kill `get_pid` | ||
+ | for i in 1 2 3 4 5 6 7 8 9 10 | ||
+ | # for i in `seq 10` | ||
+ | do | ||
+ | if ! is_running; then | ||
+ | break | ||
+ | fi | ||
+ | |||
+ | echo -n " | ||
+ | sleep 1 | ||
+ | done | ||
+ | echo | ||
+ | |||
+ | if is_running; then | ||
+ | echo "Not stopped; may still be shutting down or shutdown may have failed" | ||
+ | exit 1 | ||
+ | else | ||
+ | echo " | ||
+ | if [ -f " | ||
+ | rm " | ||
+ | fi | ||
+ | fi | ||
+ | else | ||
+ | echo "Not running" | ||
+ | fi | ||
+ | ;; | ||
+ | restart) | ||
+ | $0 stop | ||
+ | if is_running; then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | $0 start | ||
+ | ;; | ||
+ | status) | ||
+ | if is_running; then | ||
+ | echo " | ||
+ | else | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | ;; | ||
+ | *) | ||
+ | echo " | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | |||
+ | Now (we're almost done), run the following commands to start the both servers up. | ||
+ | |||
+ | <code bash> | ||
+ | chmod 755 / | ||
+ | chmod 755 / | ||
+ | # test hbbs | ||
+ | / | ||
+ | # test hbbr | ||
+ | / | ||
+ | # if both worked correctly, run the following command to automatically start at boot | ||
+ | update-rc.d hbbs defaults | ||
+ | update-rc.d hbbr defaults | ||
+ | </ | ||
+ | |||
+ | 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 ===== | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | 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. | ||
+ | |||
+ | 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 / | ||
+ | |||
+ | <code bash> | ||
+ | # | ||
+ | |||
+ | WANIP=your.url.or.ip | ||
+ | KEY=contents_of_public_key_file_on_your_server | ||
+ | string=" | ||
+ | string64=$(echo -n " | ||
+ | string64rev=$(echo -n " | ||
+ | wget https:// | ||
+ | sudo sed -i " | ||
+ | # Create linux install script | ||
+ | wget https:// | ||
+ | sudo sed -i " | ||
+ | </ | ||
+ | |||
+ | ===== Links ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |
software/rust/server_devuan.1758201419.txt.gz · Last modified: 2025/09/18 08:16 by rodolico