Rustdesk-server container with many neat features

Rustdesk is an opensource alternative for Anydesk and Teamviewer (cannot 100% replace Teamviewer but is good enough for the price).
Rustdesk is composed of couple components:

  • A server (api and registration)
  • A relay server
  • A client
  • An installer

I have added a “secure” (password protected) http server to serve the customized installer scripts for both windows and linux desktops.

The software page is at:
https://rustdesk.com/

The source of the software are at:
https://github.com/rustdesk/rustdesk

The installer which I have used couple of it’s components is at:
https://github.com/techahold/rustdeskinstall

The sources of my container are at:
https://github.com/elico/rustdesk-server-container

The Rustdesk services( hbbs, hbbr) are listening on ports:

  • 21115
  • 21116
  • 21116/udp
  • 21117
  • 21118
  • 21119

and it cannot be changed for now.
The web server is listening by default on port: 8080 but it’s configurable using environment variables.

I will publish a video on how it looks and works later on.
One of the purposes of this container is to give SMB/Enterprises the ability to host an internal RDP and remote support service.
The only option now to publish this service publicly is using a domain name or to customize the installer for an internal one and an external one.
By default the bundled Windows AIO Powershell and Linux client installer script that downloads and installs the service enable direct IP connections and also via a relay.

This is an example on how to spin up this container in cli:

/interface/bridge/add name=dockers
/ip/address/add address=172.20.0.254/24 interface=dockers

/interface/veth/add name=veth91 address=172.20.0.91/24 gateway=172.20.0.254
/interface/bridge/port add bridge=dockers interface=veth91

/container/config/set registry-url=https://registry-1.docker.io tmpdir=disk1/pull

/container/envs/add name=rustdesk_envs key=TZ value="Asia/Jerusalem"

/container/envs/add name=rustdesk_envs key=IP value="172.20.0.91"
/container/envs/add name=rustdesk_envs key=DOMAIN value="172.20.0.91"
/container/envs/add name=rustdesk_envs key=RELAY value="172.20.0.91"

/container/envs/add name=rustdesk_envs key=HTTP_ADMIN_USER value="admin"
/container/envs/add name=rustdesk_envs key=HTTP_ADMIN_PASS value="73245937-be70-4921-955d-6cba7e872b18"
/container/envs/add name=rustdesk_envs key=HTTP_PORT value="80"
/container/envs/add name=rustdesk_envs key=ENCRYPTED_ONLY value="0"

/container mounts add dst=/data name=rustdesk_data src=/disk1/rustdesk_data
/container mounts add dst=/public name=rustdesk_public_http src=/disk1/rustdesk_public_http

/container/add mounts=rustdesk_data,rustdesk_public_http dns=172.20.0.254 remote-image=elicro/rustdesk-server:latest interface=veth91 root-dir=disk1/rustdesk envlist=rustdesk_envs start-on-boot=yes

Later on a Video demo

An example of usage in video of installation and operation at:
https://www.youtube.com/watch?v=DGC_Wt6HX7w

Thank you for all the containers that you created and shared recently. I could certainly use this one too.
2022-11-18_20-13-34.jpg

Is this working.
I have try it today but no image is download from registry-1.docker.io ?

1- pull the image with Docker or Podman.
2- save image-name > name.tar
3- use the.tar file to create a container.

Nice container!!

I have installed it but, not all working fine.
I have use Client connect local to local PC in local network, or outside to outside.
Connection Local to Outside PC or Outside to Local PC
Error Fail to connect Relay Sever .. ?

someone have same problem ?

Hi
I have the same problem. I switched from a 4G connection where I had no problem with my remote clients being able to connect to my server at home.
Since my remote site switched to fiber with a Mikrotik Hap ac3 router, my clients can no longer reach my server.
If you have an idea I’m a taker for help.
Thanks

I will try to test it on a regular container and server first.
If it’s the same for both a container and a server then it’s something with the rustdesk software and should be discussed in their github issues.

OK, SO I have verified this issue.
The way to handle this issue is to define two things:

  1. is to always use the relay server in the environment variables.
  2. both clients should use the same host domain name, for the local/internal the domain should point to the internal IP
    For the external the domain should point to a cname of the MT device or a specific ip address.

With these it works fine both behind nat and also if there is some part of the network that is shared between sites or as simple as connecting an internal PC to a remote one and vise versa.

I will not update the container for now.

I also have the question, how do I do it.

@jasonwxybj do what?

i want without pub-key
how this ?

First of all, thank you for this contribution, @elico. This is the only version that has worked for me with Mikrotik, which is why I’d like to know if you plan to continue updating it to the latest version, and if there’s any way I can contribute.
Best regards, and thank you again.

@yorman I can upgrade it but I am pretty sure that the server version is the latest one.
What exactly needs to be updated from your eyes?

Hi Elico, thank you again for your input. Yes, you’re right, it’s the most recent version. I was confused by the version shown in the example.

Regards.