[PR #6405] [infra] Unify self-hosted deployment paths in getting-started.sh #25636

Open
opened 2026-08-05 07:06:16 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/6405

State: closed
Merged: No


Describe your changes

Makes getting-started.sh the single entry point for all self-hosted deployments, replacing the outdated configure.sh flow.

The wizard now asks two independent questions — identity provider (built-in vs standalone OIDC) and architecture (combined netbird-server vs separate management/signal/relay containers) — and renders the matching Docker Compose deployment with full reverse-proxy parity (built-in Traefik with Let's Encrypt, external Traefik, Nginx, Nginx Proxy Manager, Caddy, manual).

Supported combinations

Built-in IdP Standalone OIDC
Combined default quickstart (unchanged) rejected with clear error (combined server only supports the embedded IdP)
Split new new (PKCE flow, optional device-auth/IdP-sync via setup.env)

Key changes

  • setup.env contract: every wizard answer is persisted; --non-interactive re-renders idempotently from the file (IaC), --render-only generates without starting services. Secrets are generated once and appended so re-renders never rotate them.
  • Split architecture: modern management.json (embedded Dex or external OIDC), no coturn — the relay container serves STUN via NB_ENABLE_STUN; optional PostgreSQL container when the postgres engine is selected without a DSN.
  • IdP framing: the standalone-OIDC path is presented around its real differentiator — multi-account support. The built-in IdP supports external SSO connectors but enforces single account mode.
  • Deprecations: configure.sh, getting-started-with-dex.sh and getting-started-with-zitadel.sh print deprecation banners but keep working; templates are frozen pending removal after a deprecation window.
  • Tests: new tests/test-render.sh validates all combos (JSON validity, compose config, idempotent re-render, invalid-combo rejection) and runs in CI as the test-render-matrix job.

Needs live verification before merge

  • Split + embedded IdP: the standalone management server supports EmbeddedIdP in management.json (config struct + /oauth2 routing verified in code), but this combination hasn't been smoke-tested against a real container.
  • Dashboard external-OIDC login round-trip (env contract follows the legacy template).

Docs PR: netbirdio/docs (selfhosted-wizard-docs branch).

N/A

Stack

  • depends on internal discussion about the deprecation window for configure.sh (2-3 releases proposed)

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added --non-interactive and --render-only command-line options to the deployment setup script
    • Added support for multiple deployment architectures (combined and split) and identity provider modes (embedded and external OIDC)
  • Chores

    • Deprecated legacy setup scripts with migration guidance
    • Updated environment configuration template with new variables for architecture and identity provider selection
    • Enhanced automated testing for deployment configuration rendering
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/6405 **State:** closed **Merged:** No --- ## Describe your changes Makes `getting-started.sh` the single entry point for all self-hosted deployments, replacing the outdated `configure.sh` flow. The wizard now asks two independent questions — **identity provider** (built-in vs standalone OIDC) and **architecture** (combined `netbird-server` vs separate management/signal/relay containers) — and renders the matching Docker Compose deployment with full reverse-proxy parity (built-in Traefik with Let's Encrypt, external Traefik, Nginx, Nginx Proxy Manager, Caddy, manual). ### Supported combinations | | Built-in IdP | Standalone OIDC | |---|---|---| | Combined | ✅ default quickstart (unchanged) | ❌ rejected with clear error (combined server only supports the embedded IdP) | | Split | ✅ new | ✅ new (PKCE flow, optional device-auth/IdP-sync via setup.env) | ### Key changes - **`setup.env` contract**: every wizard answer is persisted; `--non-interactive` re-renders idempotently from the file (IaC), `--render-only` generates without starting services. Secrets are generated once and appended so re-renders never rotate them. - **Split architecture**: modern `management.json` (embedded Dex or external OIDC), **no coturn** — the relay container serves STUN via `NB_ENABLE_STUN`; optional PostgreSQL container when the postgres engine is selected without a DSN. - **IdP framing**: the standalone-OIDC path is presented around its real differentiator — multi-account support. The built-in IdP supports external SSO connectors but enforces single account mode. - **Deprecations**: `configure.sh`, `getting-started-with-dex.sh` and `getting-started-with-zitadel.sh` print deprecation banners but keep working; templates are frozen pending removal after a deprecation window. - **Tests**: new `tests/test-render.sh` validates all combos (JSON validity, compose config, idempotent re-render, invalid-combo rejection) and runs in CI as the `test-render-matrix` job. ### Needs live verification before merge - [ ] Split + embedded IdP: the standalone management server supports `EmbeddedIdP` in `management.json` (config struct + `/oauth2` routing verified in code), but this combination hasn't been smoke-tested against a real container. - [ ] Dashboard external-OIDC login round-trip (env contract follows the legacy template). Docs PR: netbirdio/docs (selfhosted-wizard-docs branch). ## Issue ticket number and link N/A ## Stack - depends on internal discussion about the deprecation window for configure.sh (2-3 releases proposed) ## Checklist - [x] Is it a bug fix - [x] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added `--non-interactive` and `--render-only` command-line options to the deployment setup script * Added support for multiple deployment architectures (combined and split) and identity provider modes (embedded and external OIDC) * **Chores** * Deprecated legacy setup scripts with migration guidance * Updated environment configuration template with new variables for architecture and identity provider selection * Enhanced automated testing for deployment configuration rendering <!-- end of auto-generated comment: release notes by coderabbit.ai -->
saavagebueno added the pull-request label 2026-08-05 07:06:16 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#25636