Skip to content

docs: update embedded relay coexistence with external relays#845

Open
josark2005 wants to merge 2 commits into
netbirdio:mainfrom
josark2005:main
Open

docs: update embedded relay coexistence with external relays#845
josark2005 wants to merge 2 commits into
netbirdio:mainfrom
josark2005:main

Conversation

@josark2005

@josark2005 josark2005 commented Jul 10, 2026

Copy link
Copy Markdown

Update documentation to reflect the new behavior where the embedded relay can stay
active when external relays are configured, provided server.authSecret matches
relays.secret.

Changes

  • set-up-external-relays.mdx — Rewrote the "Update Main Server Configuration"
    section with two options: Option A (keep embedded relay via matching authSecret
    and relays.secret) and Option B (remove authSecret, old behavior). Updated
    verification logs, STUN port guidance, and the secret-mismatch warning.

  • high-availability.mdx — Added a note in the Management → Relay config
    section explaining that authSecret can be kept to leave the embedded relay
    running alongside the external relay pool.

  • configuration-files.mdx — Updated the server.authSecret property
    description to document the new coexistence and mismatch behavior.

  • combined.mdx — Updated the relay metrics paragraph to note that metrics
    appear when the embedded relay is enabled via authSecret matching, not only
    when no relays override exists.

Summary by CodeRabbit

  • Documentation
    • Clarified that the embedded relay stays enabled only when server.authSecret matches relays.secret; otherwise it is disabled and logs a warning, while external relays continue to work.
    • Updated external relay setup guide with two paths: keep embedded active (matching secrets) or disable it (remove authSecret and configure external STUN).
    • Refined high-availability Management guidance for embedded relay behavior and peer relay lists.
    • Improved observability notes on when relay_* metrics appear (or don’t) on the combined /metrics endpoint.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f6304559-1f9d-4a49-a73f-074c2c83f792

📥 Commits

Reviewing files that changed from the base of the PR and between dce3408 and 08517e8.

📒 Files selected for processing (1)
  • src/pages/selfhosted/maintenance/scaling/set-up-external-relays.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/selfhosted/maintenance/scaling/set-up-external-relays.mdx

📝 Walkthrough

Walkthrough

The documentation now explains embedded relay behavior with external relay configurations, including matching secrets, high-availability Management settings, setup alternatives, verification output, and relay metric conditions.

Changes

Relay configuration documentation

Layer / File(s) Summary
Embedded relay enablement contract
src/pages/selfhosted/maintenance/configuration-files.mdx, src/pages/selfhosted/observability/combined.mdx
Documents when the embedded relay remains enabled, when mismatched secrets disable it with a warning, and when relay metrics are emitted.
High-availability Management configuration
src/pages/selfhosted/maintenance/scaling/high-availability.mdx
Explains optional embedded relays on Management replicas and requires matching secrets across Relay instances and Management replicas.
External relay setup and verification
src/pages/selfhosted/maintenance/scaling/set-up-external-relays.mdx
Documents configuring external relays alongside or instead of the embedded relay, with corresponding STUN settings, logs, relay ordering, and peer status verification.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit hops through config lines,
Where relays match their secret signs.
Embedded paths stay bright and clear,
Or warnings hop into your ear.
Metrics bloom when routes align.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main docs change about embedded relay behavior alongside external relays.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/pages/selfhosted/maintenance/scaling/set-up-external-relays.mdx

Oops! Something went wrong! :(

ESLint: 9.39.2

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/selfhosted/maintenance/scaling/set-up-external-relays.mdx`:
- Line 157: The relay-selection documentation is contradictory about whether the
embedded relay is prioritized or randomly selected. Update the Option A wording
near the embedded relay description and the client relay-selection statement to
consistently document the actual behavior, explicitly noting any embedded-relay
priority exception if applicable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 20a1a042-7e6f-4f40-a550-69b6bd22e858

📥 Commits

Reviewing files that changed from the base of the PR and between 44cab34 and dce3408.

📒 Files selected for processing (4)
  • src/pages/selfhosted/maintenance/configuration-files.mdx
  • src/pages/selfhosted/maintenance/scaling/high-availability.mdx
  • src/pages/selfhosted/maintenance/scaling/set-up-external-relays.mdx
  • src/pages/selfhosted/observability/combined.mdx

Comment thread src/pages/selfhosted/maintenance/scaling/set-up-external-relays.mdx
@josark2005

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant