Skip to content

Commit 206574f

Browse files
authored
Merge pull request #48 from d3vilh/rust
Rustdesktop Server
2 parents 046202b + 1701e9d commit 206574f

File tree

9 files changed

+113
-1
lines changed

9 files changed

+113
-1
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* [**GlueTun**](https://github.com/qdm12/gluetun) - universal OpenVPN and Wireguard client for multiple VPN providers, using DNS over TLS and a few proxy servers built-in.
1111
* [**WireGuard Server**](https://github.com/d3vilh/raspberry-gateway/tree/master/wireguard) with own WEB UI for easy management.
1212
* [**Xray Server**](https://github.com/d3vilh/raspberry-gateway/blob/master/xray/README.md) with experimental Shadowsocks and XTLS-Reality fast tunnel proxy that helps you to bypass firewalls.
13+
* [**Rustdesk OSS Server**](https://rustdesk.com) is a remote desktop software that allows you to connect to a remote computer from anywhere in the world. It is an alternative to TeamViewer, AnyDesk, and Chrome Remote Desktop.
1314
* [**qBittorrent**](https://www.qbittorrent.org) - an open-source software alternative to µTorrent.
1415
* [**Grafana Dashboards**](https://github.com/d3vilh/raspberry-gateway/tree/master/monitoring) for Internet speed, VPN, Raspberry Pi hardware and Docker containers monitoring.
1516
* **Various Prometheus exporters**: cAdviser, AirGradient, StarLink, ShellyPlug and others.
@@ -236,6 +237,8 @@ Overall, this Raspberry Pi Home Internet Gateway provides a universal solution f
236237
237238
![Portainer](/images/portainer.png)
238239
240+
[**Rustdesk OSS Server**](https://rustdesk.com) is a remote desktop software that allows you to connect to a remote computer from anywhere in the world. It is an alternative to TeamViewer, AnyDesk, and Chrome Remote Desktop.
241+
239242
[**Raspi Monitoring**](https://github.com/d3vilh/raspberry-gateway/tree/master/monitoring) The simple yet powerfull monitoring solution for your Raspberry Gateway. Covers performance utilisation (CPU,MEM,I/O, storage usage), Hardware utilisation (Temperature, Voltage, Power States, Devices Clock), Docker containers statistics and Internet connection monitoring:
240243
241244
![Raspberry Monitoring Dashboard in Grafana picture 1](/images/raspi-monitoring_1.png)
@@ -356,6 +359,19 @@ Overall, this Raspberry Pi Home Internet Gateway provides a universal solution f
356359
* default pannel port in `Pannel Settings` > `Pannel Configurations` > `Pannel Port` from `54321` to some random port (the best in the upper end of the range, up to `65535`)
357360
* default configuration pannel URL in `Pannel Settings` > `Pannel Configurations` > `Panel URL Root Path` to something random, like `/mysecretpannel/` or `/superxray/`.
358361
362+
## Rustdesk Server
363+
#### Rustdesk facts:
364+
* **UI access port** No UI available in [OSS version](https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/console/), running in Back-End.
365+
* **Default password** Use public key from configuration files.
366+
* **External ports** used by container in host mode: `21115:tcp` (Relay) `21116:tcp/udp` (ID Registration), `21117:tcp` (WebRTC Hole punching).
367+
* **Configuration files** are available after the installation and located in `~/rustdesk-server/*` directory
368+
Publik Key is located in `~/rustdesk-server/data/id_ed*.pub` file.
369+
You need it to [configure](https://rustdesk.com/docs/en/client/) your [Rustdesk clients](https://rustdesk.com/download) sides:
370+
```shell
371+
pi@d3vpi:~ $ cat ~/rustdesk-server/data/id_ed*.pub
372+
bvij9KsmajenaOdt9AazKURKAtnz1FLBGt8+5goUK4WZs=
373+
```
374+
359375
## Raspberry-monitoring
360376
All the Data sources, Dashboards and exporters are automatically provisioned. Below you can find the list of available dashboards and their URLs.
361377

example.config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,18 @@ qbittorrent_inside_vpn: false # Set true to route qBitTorrent
177177
qbittorrent_inside_gluetun: false # Set true to route qBitTorrent traffic via Gluetun VPN client
178178
qbittorrent_webui_port: 8090 # Do not change it unless you know what you are doing.
179179

180+
181+
# _____ _ ____ _
182+
# | __ |_ _ ___| |_| \ ___ ___| |_
183+
# | -| | |_ -| _| | | -_|_ -| '_|
184+
# |__|__|___|___|_| |____/|___|___|_,_|
185+
# Rustdesk-server configuration.
186+
rustdesk_enable: false # Set true to enable Rustdesk-server
187+
remove_rustdesk: false # Set true to remove Rustdesk-server
188+
# Experimental feature. Not tested yet.
189+
# https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/docker/
190+
191+
180192
# _____ _ _
181193
# | |___ ___|_| |_ ___ ___ ___
182194
# | | | | . | | | _| . | _|_ -|

images/OpenVPN-UI-Home.1.png

12.9 KB
Loading

main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@
8989
ansible.builtin.import_tasks: tasks/xray-xui.yml
9090
when: xray_enable
9191

92+
- name: Setup Rustdesk
93+
become: true
94+
ansible.builtin.import_tasks: tasks/rustdesk-server.yml
95+
when: rustdesk_enable
96+
9297
- name: Setup Raspberry Monitoring
9398
become: true
9499
ansible.builtin.import_tasks: tasks/raspberry-monitoring.yml
@@ -120,4 +125,5 @@
120125
- remove_airgradient_monitoring
121126
- remove_starlink_monitoring
122127
- remove_shelly_plug_monitoring
128+
- remove_rustdesk
123129
when: remove_conditions | select('match', '^remove_') | list | length > 0

tasks/handlers.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,11 @@
9595
project_src: "{{ config_dir }}/xray/"
9696
build: never
9797
state: restarted
98+
become: false
99+
100+
- name: Restart rustdesk
101+
community.docker.docker_compose_v2:
102+
project_src: "{{ config_dir }}/rustdesk-server/"
103+
build: never
104+
state: restarted
98105
become: false

tasks/remove.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@
310310
become: true
311311
when: remove_xray
312312

313-
314313
- name: Remove Samba
315314
block:
316315
- name: Stop and remove Samba Server container
@@ -327,6 +326,23 @@
327326
become: true
328327
when: remove_samba
329328

329+
- name: Remove Rustdesk
330+
block:
331+
- name: Stop and remove Rustdesk server container
332+
community.docker.docker_compose_v2:
333+
project_src: "{{ config_dir }}/rustdesk-server/"
334+
state: absent
335+
become: false
336+
ignore_errors: yes
337+
when: remove_rustdesk
338+
339+
- name: Remove Rustdesk server image
340+
community.docker.docker_image:
341+
name: rustdesk/rustdesk-server
342+
state: absent
343+
become: true
344+
when: remove_rustdesk
345+
330346
# - name: Remove Samba Server network
331347
# community.docker.docker_network:
332348
# name: samba-server-net

tasks/rustdesk-server.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
- name: Create Rustdesk folder on Pi.
3+
ansible.builtin.file:
4+
path: "{{ config_dir }}/rustdesk-server"
5+
state: directory
6+
mode: 0755
7+
become: false
8+
9+
# WA for 60sec TMO bug
10+
- name: Pulling latest Rustdesk server image
11+
community.general.docker_image:
12+
source: pull
13+
name: rustdesk/rustdesk-server
14+
tag: latest
15+
become: false
16+
17+
- name: Copy Rustdesk docker-compose template to Pi.
18+
ansible.builtin.template:
19+
src: templates/rustdesk-docker-compose.yml.j2
20+
dest: "{{ config_dir }}/rustdesk-server/docker-compose.yml"
21+
mode: '0640'
22+
become: false
23+
notify: Restart rustdesk
24+
25+
- name: Ensure Rustdesk server is running.
26+
community.docker.docker_compose_v2:
27+
project_src: "{{ config_dir }}/rustdesk-server/"
28+
build: never
29+
become: false
30+
environment:
31+
DOCKER_CLIENT_TIMEOUT: '180'
32+
COMPOSE_HTTP_TIMEOUT: '180'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
services:
2+
hbbs:
3+
container_name: hbbs
4+
image: rustdesk/rustdesk-server:latest
5+
environment:
6+
- ALWAYS_USE_RELAY=Y
7+
command: hbbs
8+
volumes:
9+
- ./data:/root
10+
network_mode: "host"
11+
12+
depends_on:
13+
- hbbr
14+
restart: unless-stopped
15+
16+
hbbr:
17+
container_name: hbbr
18+
image: rustdesk/rustdesk-server:latest
19+
command: hbbr
20+
volumes:
21+
- ./data:/root
22+
network_mode: "host"
23+
restart: unless-stopped

webinstall

322 KB
Binary file not shown.

0 commit comments

Comments
 (0)