Self-hosted RustDesk hbbs/hbbr signaling and relay.
Educational example only. Review every volume path, port, and credential before you run this. Do not copy production secrets into your wiki or git repo.
_shared/.env for non-secrets, _shared/.secret for credentialsmkdir -p /path/to/docker/stacks/rustdesk
cd /path/to/docker/stacks/rustdesk
# paste compose.yaml below, then:
docker compose pull
docker compose up -d
services:
hbbs: # ID / signaling server
container_name: hbbs
image: rustdesk/rustdesk-server:latest
command: hbbs -r YOUR_HOST.YOUR_DOMAIN:21117
env_file:
- /path/to/docker/stacks/_shared/.env
- /path/to/docker/stacks/_shared/.secret
logging:
driver: json-file
options:
max-file: ${DOCKERLOGGING_MAXFILE:-10} # Max number of log files
max-size: ${DOCKERLOGGING_MAXSIZE:-200k} # Max file size
ports:
- "21115:21115"
- "21116:21116"
- "21116:21116/udp"
- "21118:21118"
volumes:
- /path/to/docker/data/rustdesk/data:/root
depends_on:
- hbbr
restart: unless-stopped
hbbr: # Relay server
container_name: hbbr
image: rustdesk/rustdesk-server:latest
command: hbbr
env_file:
- /path/to/docker/stacks/_shared/.env
- /path/to/docker/stacks/_shared/.secret
logging:
driver: json-file
options:
max-file: ${DOCKERLOGGING_MAXFILE:-10} # Max number of log files
max-size: ${DOCKERLOGGING_MAXSIZE:-200k} # Max file size
ports:
- "21117:21117"
- "21119:21119"
volumes:
- /path/to/docker/data/rustdesk/data:/root
restart: unless-stopped