Add /relay* location block to Caddyfile template so that NetBird relay WebSocket connections (rels://) are correctly forwarded to the relay container instead of falling through to the dashboard handler. Without this fix, all relay WebSocket connections silently hit the dashboard container, causing STUN/relay connectivity failures for all deployed NetBird instances. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
772 B
Django/Jinja
42 lines
772 B
Django/Jinja
{
|
|
auto_https off
|
|
}
|
|
|
|
:80 {
|
|
# Embedded IdP OAuth2/OIDC endpoints
|
|
handle /oauth2/* {
|
|
reverse_proxy netbird-{{ subdomain }}-management:80
|
|
}
|
|
|
|
# NetBird Management API + gRPC
|
|
handle /api/* {
|
|
reverse_proxy netbird-{{ subdomain }}-management:80
|
|
}
|
|
handle /management.ManagementService/* {
|
|
reverse_proxy netbird-{{ subdomain }}-management:80 {
|
|
transport http {
|
|
versions h2c
|
|
}
|
|
}
|
|
}
|
|
|
|
# NetBird Signal gRPC
|
|
handle /signalexchange.SignalExchange/* {
|
|
reverse_proxy netbird-{{ subdomain }}-signal:80 {
|
|
transport http {
|
|
versions h2c
|
|
}
|
|
}
|
|
}
|
|
|
|
# NetBird Relay WebSocket (rels://)
|
|
handle /relay* {
|
|
reverse_proxy netbird-{{ subdomain }}-relay:80
|
|
}
|
|
|
|
# Default: NetBird Dashboard
|
|
handle {
|
|
reverse_proxy netbird-{{ subdomain }}-dashboard:80
|
|
}
|
|
}
|