[GH-ISSUE #2857] Feature Request: Add CLI commands for account and setup key creation #6336

Open
opened 2026-08-05 01:07:48 -04:00 by saavagebueno · 2 comments
Owner

Originally created by @dmeremyanin on GitHub (Nov 7, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2857

Is your feature request related to a problem? Please describe.

Currently, the netbird-mgmt CLI tool offers limited functionality when it comes to automating the setup of a NetBird cluster. To enable a more streamlined and IaC-friendly approach, I would like to request additional options for the netbird-mgmt CLI.

Specifically, it would be great to have the ability to:

  1. Create an account through the CLI.
  2. Generate a setup key.

These features would significantly improve the ability to automate the setup of a NetBird cluster, particularly in scenarios where a management node and multiple router nodes need to be provisioned in a reproducible, automated manner. This would allow users to deploy a complete NetBird setup programmatically.

Describe the solution you'd like

Add commands to the CLI for creating a new account and a setup key. Proposed commands:

  1. Create an account

This command would allow users to create a new account directly from the CLI, specifying a domain for the account.

# create a new account
netbird-mgmt account create --domain <domain>
  1. Create a setup key

This command would allow users to generate setup keys with configurable options like expiration time, usage limits, and predefined keys for different purposes (e.g., server setup, admin access). The --key parameter would accept an existing key for generation.

# Create a reusable setup key for server setup with a 30-minute expiration and usage limit
netbird-mgmt setup-key create --name server-setup-key --expires 30m --type reusable --usage-limit <usage-limit> --key <key>

# Create a setup key for admin user with a 2-hour expiration
netbird-mgmt setup-key create --name admin-user-setup-key --expires 2h --key <key>
Originally created by @dmeremyanin on GitHub (Nov 7, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2857 **Is your feature request related to a problem? Please describe.** Currently, the `netbird-mgmt` CLI tool offers limited functionality when it comes to automating the setup of a NetBird cluster. To enable a more streamlined and IaC-friendly approach, I would like to request additional options for the `netbird-mgmt` CLI. Specifically, it would be great to have the ability to: 1. Create an account through the CLI. 2. Generate a setup key. These features would significantly improve the ability to automate the setup of a NetBird cluster, particularly in scenarios where a management node and multiple router nodes need to be provisioned in a reproducible, automated manner. This would allow users to deploy a complete NetBird setup programmatically. **Describe the solution you'd like** Add commands to the CLI for creating a new account and a setup key. Proposed commands: 1. Create an account This command would allow users to create a new account directly from the CLI, specifying a domain for the account. ```bash # create a new account netbird-mgmt account create --domain <domain> ``` 2. Create a setup key This command would allow users to generate setup keys with configurable options like expiration time, usage limits, and predefined keys for different purposes (e.g., server setup, admin access). The `--key` parameter would accept an existing key for generation. ```bash # Create a reusable setup key for server setup with a 30-minute expiration and usage limit netbird-mgmt setup-key create --name server-setup-key --expires 30m --type reusable --usage-limit <usage-limit> --key <key> # Create a setup key for admin user with a 2-hour expiration netbird-mgmt setup-key create --name admin-user-setup-key --expires 2h --key <key> ```
saavagebueno added the feature-requestmanagement-serviceself-hosting labels 2026-08-05 01:07:48 -04:00
Author
Owner

@compumatter commented on GitHub (Jan 5, 2025):

I 2nd that request in the form requested. No way to automate the installation without it.

<!-- gh-comment-id:2571774151 --> @compumatter commented on GitHub (Jan 5, 2025): I 2nd that request in the form requested. No way to automate the installation without it.
Author
Owner

@PizzaLovingNerd commented on GitHub (May 28, 2026):

Hello, automated setup now works through the API. Please see: https://docs.netbird.io/selfhosted/automated-setup

If you are still interested in a CLI of some sort for this, please open a GitHub Discussion rather than an issue.

Cheers!

<!-- gh-comment-id:4561145043 --> @PizzaLovingNerd commented on GitHub (May 28, 2026): Hello, automated setup now works through the API. Please see: https://docs.netbird.io/selfhosted/automated-setup If you are still interested in a CLI of some sort for this, please open a [GitHub Discussion](https://github.com/netbirdio/netbird/discussions) rather than an issue. Cheers!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6336