# Rustdesk Server - Self-hosted remote desktop
# Ports:
#   - 21115: NAT type test
#   - 21116: TCP/UDP relay
#   - 21117: Relay
#   - 21118, 21119: WebSocket

networks:
  rustdesk-net:
    external: false

services:
  hbbs:
    container_name: Rustdesk-HBBS
    image: rustdesk/rustdesk-server
    command: hbbs -r 100.103.48.78:21117
    ports:
      - "21115:21115"
      - "21116:21116"
      - "21116:21116/udp"
      - "21118:21118"
    volumes:
      - /volume1/docker/rustdeskhbbs:/root:rw
    networks:
      - rustdesk-net
    depends_on:
      - hbbr
    restart: on-failure:5

  hbbr:
    container_name: Rustdesk-HBBR
    image: rustdesk/rustdesk-server
    command: hbbr
    ports:
      - "21117:21117"
      - "21119:21119"
    volumes:
      - /volume1/docker/rustdeskhbbr:/root:rw
    networks:
      - rustdesk-net
    restart: on-failure:5
