There is a Pro Server and an Open-Source Server version of RustDesk. I will put the install instructions in this post for SCALE and Core. Unfortunately the Pro Server is not available on Core as a pkg, but you could install it using a VM and docker.
Note: It is necessary to have the same domain name/ip address on clients that you want to connect to. Otherwise it will not work and error out. Best is to have a domain pointing to your public IP externally, and to your local IP internally.
FreeBSD/TrueNAS Core
1. Create a jail, the run pkg install rustdesk-server
This will install the "open-source" version. The key files will be stored inside the jail at /var/db/rustdesk-server if you need to copy them or copy your own key files to use. Rustdesk will generate a new key file if there are none present, but once created they will persist on reboot.
TrueNAS SCALE (Open-Source Version) Free
You will need to create two containers on your SCALE system for the server, one for the hbbr, and one for the hbbs. I recommend using the TrueCharts "custom-app" as i have not gotten this to work with the official "launch-docker-image"
hbbr
1. Lauch the "custom-app"
2. Name can be whatever you want it to be.
3. Container Repository needs to be rustdesk/rustdesk-server
and tag needs to be latest
4. Tick the box showing "Advanced Settings" under "Workload Settings" and "Add" a "Command" and type hbbr
if you want to force the server to only allow encrypted connections, then you must "Add" an "Environment Variable" and type KEY
for the name and _
for the value
5. Networking and Services: Service Type need to be LoadBalancer (Expose Ports) and the Main Service Port should be tcp,21117:21117 then add an additonal port with tcp,21119:21119
6. Under "Storage and Persistence" click "Add" and choose Host Path. For the Host Path select the dataset you created for rustedesk, and for Mount Path type /root
7. This should be all you need for the hbbr container
hbbs
For this container you will want to create a datasete to store the key files. This can be /mnt/poolname/rustdesk
or whatever you want. Share type should be "Apps"
1. Lauch the "custom-app"
2. Name can be whatever you want it to be.
3. Container Repository needs to be rustdesk/rustdesk-server
and tag needs to be latest
4. Tick the box showing "Advanced Settings" under "Workload Settings" and "Add" a "Command" and type hbbs
if you want to force the server to only allow encrypted connections, then you must "Add" an "Environment Variable" and type KEY
for the name and _
for the value
5. Networking and Services: Service Type need to be LoadBalancer (Expose Ports) and the Main Service Port should be tcp,21115:21115 then add 3 additonal ports with tcp,21116:21116 udp,21116:21116 tcp,21118:21118
6. Under "Storage and Persistence" click "Add" and choose Host Path. For the Host Path select the dataset you created for rustedesk, and for Mount Path type /root
7. This should do it for the hbbs container
TrueNAS Scale (Pro Version)
The instructions for the pro version are essentially the same except for...
1. You only need to specify the commands "hbbr" and "hbbs" without any extra variables because all the setup is done from the WebGUI
2. The "Container Repository" should be rustdesk/rustdesk-server-pro
3. You will need to add one additional port for the "hbbs" container tcp,21114:21114 for the webgui to work