-
-
Notifications
You must be signed in to change notification settings - Fork 537
Add rustdesk server to dietpi-software #7842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
So, sending on 1440p display (while a video is playing) to my laptop, and force-using the RPi3B as relay It uses around 5% CPU time and 8 threads. I also got it working other way around today, with Fedora as host (but I didn't change anything so dunno what went wrong yesterday) I will also install a desktop on the RPi 3B and will make a test, when itÄs the host. |
|
Coincidentally @StephanStS and me were testing this pretty recently, and since it was so straight forward, I thought about adding it myself soon 😄. Great peace of software, and we should add the clients (maybe wrong word*) pretty soon as well. *For everyone who used RustDesk already and is wondering what these servers are for: It is the optional signaling+relay servers that can be used instead of depending on the public ones provided by RustDesk. You will see some notice at the bottom of the GUI that this is suggested to increase bandwidth. The signaling server is used to establish the connection between the peers, in case authentication etc, and the relay server is used in case one of the peers is behind a (different) NAT: In that case they cannot do a P2P connection, but all data is relayed through the relay server instead. I.e. it is like a proxy, or what a TURN server does for WebRTC/video calls. And yeah, pretty efficient thanks to Rust 🙂. We tested the Docker container, their installer (which downloads the archives), and the deb packages they provide. @JappeHallunken any reason you did not use the deb packages? |
|
@copilot please fix the indentation of the added code for us. Align it with the way it is done in surrounding code sections. |
|
Some more info (mainly for the docs) from my side:
|
Just out of curiosity: |
|
The pain with the tab indentation:
|
|
Annoying that the environment variables are nowhere documented anymore. Why the hack have they been removed from the readme? Only way is to search the code: https://github.com/search?q=repo%3Arustdesk%2Frustdesk-server%20%2Fstd%3A%3Aenv%3A%3Avar%2F&type=code |
|
Test installs: https://github.com/MichaIng/DietPi/actions/runs/19839816223 |
Looks like it tries to store the config in the executable's dir rather than the working dir. EDIT: Nope, doesn't go away with EDIT2: Jep: root@VM-Trixie:~# l /mnt/dietpi_userdata/rustdesk/.config/rustdesk/RustDesk.toml
-rw------- 1 rustdesk rustdesk 145 Dec 2 01:16 /mnt/dietpi_userdata/rustdesk/.config/rustdesk/RustDesk.tomlBut we can set the config path explicitly, so it is not that nested. EDIT3: Nope, the EDIT4: Looks like the |
Looks like websockets work with OSS version as well? Signalling port 21116 is listened on UDP as well, and 21115 as additional NAT testing port, I guess to check whether the relay server is needed for a particular connection. |
|
I also don't get why some stuff is only availble via flag, and other via env variable. |
|
Yeah, since hbbs also generates the TOML, I though the setting was related to that one. But instead it seems to be an obsolete alternative to the environment variables. Clients connections do not produce logs, do they? Otherwise we could reduce the log level to warnings by default. |
|
The signaling server does not log anything beside when it's sarted. I guess this only available in the pro version. |
|
What I would want to disable by default is log messages which contain IP or other identifying info about the connected peers. Warnings and errors make sense, also the startup info logs which contain info about version, parsed args/config, and used ports etc are good. But something like access logs can be seen as privacy concern, aside of bloating |
|
Here a sample output from hbbr log: So it would contain IPs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the version from today by executing this:
- backup of
id_ed25519andid_ed25519.pub - uninstall my rustdesk installation
- check the uninstall (directories, services)
- update via
dietpi-update -1 - install rustdesk new via
dietpi-software install 12 - restore
id_ed25519andid_ed25519.pub - restart services via
systemctl restart rustdesksignal.service rustdeskrelay.service
Works again at first tests.
|
Hmm, startup messages would be indeed entirely gone. What do you think, are they relevant enough to leave info logs enabled? On first connection of a peer, the signal server emits a log as well: But I mean for testing and in case debugging, this is actually fine. I would just switch to More points:
And some info regarding the websocket ports: While both servers bind to them, they cannot be used: when enabling the WebSocket option at the client, connection does not work anymore but hangs at "establishing connection ...", without any log message at the server(s). Weird that the OSS version builds bind to those ports at all, and that they cannot be changed or disabled in any way. |
Yes, even though we will link the official documentation in the docs, questions about the options will still arise. It's a preventative measurement 😅
Another yes from me, hbbs and hbbr is too unspecific for the average user.
Yea, to be consequent we would need to change this too. And about the websockets: My guess is they started implementing a lot if this nice features and then made the decision to hid them in the PRO version. But Maybe websockets would be possible in the OSS version with custom client build? Aaand about
rustdesk/rustdesk#594 (comment) Another idea is, that it's a reference to the name of the Rustdesk founder, "Huabing". |
|
Okay, I'll add the changes tomorrow if still open. Good to know that others are wondering about these names as well, and sad to see that devs are not communicative at all on GitHub issues, discussion, and even discord. All seems pretty dead, if not multiple users discussing (and guessing around 😄). The abbreviations are still in their docs, but they are only of minimal use, the part about configuring the client. And the page about the DNS loopback, though we should cover this our end with 2 sentences instead of a whole page. About websockets: yeah, all good that this is a Pro feature. But why do the OSS builds then startup two TCP listeners for those websocket ports? As if splitting OSS and Pro was still a WIP. I cannot hold back but will check their code and try to implement a bunch of changes 😅. |
|
Done, but now I also found this very helpful comment in a discussion: |
…einstallation process so far. TODO: load config from file (probably a data folder in /mnt/dietpi_userdata/rustdesk/)
…data/rustdesk. available options see: https://github.com/rustdes~k/rustdesk-server/blob/c6502179/README.md#env-variables
* Fix indentation in rustdesk code sections Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MichaIng <[email protected]>
* Name it "RustDesk" with that capitalisation * Align GitHub API call for download with fallback URL * Use data dir as working dir, used for keys, leaving the install dir for static files only, which can be entirely removed on reinstall * Do not grant "dietpi" user access to RustDesk data dir, but leave access to "rustdesk" user (and root) only * Apply strict systemd service sandboxing, including some new ones we did not use before, needs testing ;) * Limit to 3 auto-restarts per minute * Remove as well "rustdesk" group on uninstall * Some indentation fixes
…in URL update workflow
It generates `~/.config/rustdesk/RustDesk.toml`. Also extend test by all used network ports.
…ith defaults to the env files.
and align names a little: "signal" instead of "signalling", "RustDesk" instead of "Rustdesk".
9806707 to
c8ad9c3
Compare
|
So, I researched a bit more about the env vars, added all defaults and clarified the meaning of some. E.g. this My goodness, their (open source) community caring is absolute zero 😄. And I removed the |
…rver Since we may want to add the client soon.

I added rustdesk server OSS version (https://github.com/rustdesk/rustdesk-server) which is somewhat requested from users
It creates 2 systemd services, one for the relay server and one for the signaling server.
Both services can be configured via env files, the available options are listed here: https://github.com/rustdes~k/rustdesk-server/blob/c6502179/README.md#env-variables and it need's to be in
iniformat, likePORT=22222. Sections can be ommited.The env files are located in
/mnt/dietpi_userdata/rustdesk, working directory is/opt/rustdesk.On the first start, right after the installation, it will generate a private and public key, both located in the working directory. The public key is needed for the clients for connection to the signal and/or relay server.
It also comes with
rustdesk-utils, it can generate new key pairs, validate them and can do a basic "health check". (It checks if the API is running, which the OSS version does not need. It can also check if the configured ports are reachable.)I tested it on a RPi3B to connect a Windows PC to my Fedora Laptop. It works in both directions, but controlling the Laptop from the Windows machine is not really possible, wayland support is still experimental. But the installation is working tho.
Reinstallation does not overwrite the .env files, so configs are preserved. ✔️
To test that the environment files actually work, I changed the listening ports for both services. ✔️
Tomorrow I will config rustdesk to force-use the relay server, because I just tested inside my LAN and then it will use a P2P connection between the clients, no relay needed. So let's see how capabale a RPi3B is for this task. But I guess no problem with only 2 clients.