I'm currently testing RustDesk and am thinking about trying to put it behind Traefik. I've found various articles that suggest it should work but nothing that actually shows how to do it with v3 in docker compose.
Has anyone got this working and able to share the compose config at all please?
Hello,
I am currently testing RustDesk as well.
I managed to launch the RustDesk server and Traefik on my local network.
Unfortunately, I can’t access a machine outside my local network, which makes it lose some of its usefulness…
Here is my setup (Traefik and RustDesk are running via Docker on my Synology 920+, hence the MAC VLAN).
Traefik :
traefik:
image: traefik:v3
container_name: traefik_v3
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /volume1/docker/reverseProxy/Traefik/traefik.yml:/traefik.yml
- /volume1/docker/reverseProxy/Traefik/config:/config:ro
- /volume1/docker/reverseProxy/Traefik/acme.json:/acme.json
- /volume1/docker/reverseProxy/Traefik/certs:/certs
- /volume1/docker/reverseProxy/Traefik/access.log:/log/access.log
labels:
- "traefik.enable=true"
# Routeur pour l'accès général à Traefik
- "traefik.http.routers.traefik-public.rule=Host(`host.synology.me`)"
- "traefik.http.routers.traefik-public.entrypoints=websecure"
- "traefik.http.routers.traefik-public.service=api@internal"
- "traefik.http.routers.traefik-public.tls=true"
# Routeur pour les métriques Prometheus de Traefik
- "traefik.http.routers.traefik-metrics.rule=Host(`host.synology.me`) && PathPrefix(`/metrics`)"
- "traefik.http.routers.traefik-metrics.entrypoints=websecure"
- "traefik.http.routers.traefik-metrics.tls=true"
- "traefik.http.services.traefik-metrics.loadbalancer.server.port=8180"
# Routeur sécurisé pour le tableau de bord avec middleware Authelia
- "traefik.http.routers.traefik-dashboard.rule=Host(`host.synology.me`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))"
- "traefik.http.routers.traefik-dashboard.entrypoints=websecure"
- "traefik.http.routers.traefik-dashboard.service=api@internal"
- "traefik.http.routers.traefik-dashboard.middlewares=authelia@docker"
- "traefik.http.services.traefik-dashboard.loadbalancer.server.port=9091"
- "traefik.http.routers.traefik-dashboard.tls=true"
networks:
traefik_bridge:
macvlan:
ipv4_address: 192.168.1.241
networks:
traefik_bridge:
external : true
macvlan:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: "192.168.1.0/24"
ip_range: "192.168.1.240/29"
gateway: "192.168.1.1"
traefik.yaml
entryPoints:
rustdesk-17tcp:
address: ":21117"
rustdesk-16udp:
address: ":21116/udp"
RustDesk
rustdesk:
image: rustdesk/rustdesk-server-s6
container_name: rustdesk
security_opt:
- no-new-privileges:true
restart: unless-stopped
networks:
traefik_bridge:
reverse-proxy_macvlan:
ipv4_address: 192.168.1.243
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
- 21117:21117
volumes:
- /volume1/docker/rustdesk/appdata:/data
environment:
- "RELAY=192.168.1.243:21117"
- "ENCRYPTED_ONLY=1"
- "DB_URL=/data/db.sqlite3"
- "RUST_LOG=debug"
labels:
- "traefik.enable=true"
###
- "traefik.http.routers.rustdesk.rule=Host(`rustdesk.host.synology.me`)"
- "traefik.http.routers.rustdesk.entrypoints=websecure"
- "traefik.http.services.rustdesk.loadbalancer.server.port=21115"
- "traefik.http.routers.rustdesk.tls={}"
- "traefik.tcp.routers.rustdesk-relay.rule=HostSNI(`*`)"
- "traefik.tcp.routers.rustdesk-relay.entrypoints=rustdesk-17tcp"
- "traefik.tcp.services.rustdesk-relay.loadbalancer.server.port=21117"
- "traefik.udp.routers.rustdesk-udp.entrypoints=rustdesk-16udp"
- "traefik.udp.services.rustdesk-udp.loadbalancer.server.port=21116"
I also had to open my port 21116 (UDP and TCP) on my router and forward it to 192.168.1.243
I hope it will help you