Skip to content
NebulaCtrldocs

CLI reference

The nebula command, its subcommands and flags, including the commands that validate nebula.toml and template files before you push them.

The nebula binary is the control plane. It also carries the commands that operate it and two that check files before you push them: nebula config validate and nebula template validate. This page is generated from the command tree of the release it describes.

Where to run it

The binary is /usr/local/bin/nebula in the control plane image. When the installer sets up the host updater, which is the default, it also copies the binary to bin/nebula in the install directory (/opt/nebula/bin/nebula by default). The commands that read files, nebula config validate and nebula template validate, need no database and no running control plane.

Settings

Every flag of every command is also a setting. Set it three ways:

  • the flag, such as --base-url;
  • an environment variable named NEBULA_ plus the flag name in capitals with underscores, such as NEBULA_BASE_URL;
  • a key of the same name as the flag in a nebula.yaml file, read from the working directory, from /etc/nebula, or from the path in --config.

A flag wins over the environment variable, and the environment variable wins over the file. The configuration reference groups the nebula serve settings by what they do.

Exit codes

CodeMeaning
0The command succeeded.
1The command ran and failed, or a validation command found a problem.
2The command line was wrong: an unknown flag or log level, an argument the command does not take, or a required setting that is missing.

Global flags

Every command accepts these.

FlagTypeDefaultDescription
--configstringnonepath to a nebula.yaml configuration file; optional
--log-levelstringinfolog level: debug, info, warn or error

nebula

NebulaCtrl is a Kubernetes-native deployment control plane.

The control plane holds projects, environments, services and releases; an agent inside each cluster pulls desired state and reports what it observes.

nebula COMMAND

Commands:

nebula changelog

Print this build's own release feed as JSON.

The same builder GET /api/v1/releases uses turns the embedded CHANGELOG.md into this output, so the two can never list different releases.

nebula changelog

nebula config

Work with nebula.toml repository configuration files.

nebula config COMMAND

Commands:

nebula config validate

Parse a nebula.toml file (a service's or a project's) and report every problem.

Reads FILE, or ./nebula.toml, and reports every problem in it, not only the first. A file with a top-level [services] or [databases] table is checked as a project config. Any other file is checked as a service's nebula.toml, once for each [environments.<name>] table it declares and for production, development and preview.

A problem prints as FILE:LINE: PATH: MESSAGE. A file with none prints FILE: ok and a summary of what it describes. The command exits 1 if it found a problem.

The check needs no database and no control plane, so it sees the file alone. What depends on the project, such as whether a referenced service exists, is checked by the control plane.

nebula config validate [FILE]
nebula config validate
nebula config validate services/api/nebula.toml

nebula migrate

Apply or inspect database migrations.

nebula serve applies pending migrations at boot, so these commands exist for an operator who wants the schema moved without starting the server.

nebula migrate COMMAND

Commands:

Flags:

FlagTypeDefaultDescription
--database-urlstringnonePostgreSQL connection URL

nebula migrate status

Show every migration and whether it has been applied.

nebula migrate status

Also takes --database-url from its parent command.

nebula migrate up

Apply every pending migration.

nebula migrate up

Also takes --database-url from its parent command.

nebula openapi

Print the OpenAPI description to stdout.

The document is built from the same route table the server serves, so the generated TypeScript client cannot describe an API this binary does not have. It needs no database and binds no port.

nebula openapi [flags]

Flags:

FlagTypeDefaultDescription
--indentboolnoneindent the JSON, so a committed copy reads as a diff when the API changes
--server-urlstringnoneadd this URL to the document as its server, for generated example requests

nebula secrets

Maintain credentials sealed in the database.

nebula secrets COMMAND

Commands:

Flags:

FlagTypeDefaultDescription
--database-urlstringnonePostgreSQL connection URL
--master-keystringnonenew current master key, base64 of exactly 32 bytes
--previous-master-keyslistnonecomma-separated previous base64 master keys accepted while resealing

nebula secrets reseal

Re-encrypt every stored credential under the current master key.

Re-encrypts every credential the database holds under the current master key (--master-key). Run it after rotating the master key, with the key you are retiring in --previous-master-keys so the old ciphertext can still be read.

It prints the current key id and how many rows it resealed in each table. Once it has finished, drop the previous keys from the configuration. It needs --database-url and --master-key.

nebula secrets reseal

Also takes --database-url, --master-key, --previous-master-keys from its parent command.

nebula serve

Run the API, the user interface and the cluster agent link.

nebula serve [flags]

Flags:

FlagTypeDefaultDescription
--acme-directory-urlstringhttps://acme-v02.api.letsencrypt.org/directoryACME directory the control plane issues DNS-01 certificates from; point it at Let's Encrypt staging when testing
--acme-dns-resolverslistnonerecursive DNS servers (host:port) used to find a hostname's zone and check DNS-01 propagation; defaults to the system resolver. Set it for split-horizon DNS or a private test CA
--agent-imagestringnonecontainer image the cluster install manifest deploys; defaults to ghcr.io/nebulactrl/nebula-agent at this binary's version
--agent-update-deadlineduration10m0show long a running agent update may go without the new agent reporting in before it is automatically rolled back
--base-urlstringnonepublic URL this installation is reached at, for example https://nebula.example.com
--cloudflare-api-basestringhttps://api.cloudflare.com/client/v4Cloudflare API base URL; override for an end-to-end test fake
--community-templatesbooltrueread the public community template repository; false turns it off entirely, for an air-gapped install
--community-templates-repostringnebulactrl/nebula-templatesthe community template repository, as owner/name; every instance reads its main branch
--database-urlstringnonePostgreSQL connection URL
--github-api-basestringhttps://api.github.comGitHub API base URL; override for GitHub Enterprise Server or an end-to-end test fake
--github-web-basestringhttps://github.comGitHub web base URL used for the App manifest flow; override for GitHub Enterprise Server or an end-to-end test fake
--k3s-channels-urlstringhttps://update.k3s.io/v1-release/channelsK3s public release-channel feed a cluster's available patch/minor upgrades are computed against; override for an end-to-end test fake
--k3s-versionstringv1.36.4+k3s1K3s version the install script pins with INSTALL_K3S_VERSION, for example v1.36.4+k3s1
--listenstring:8080address the API and the user interface listen on
--master-keystringnonebase64 of exactly 32 bytes; every stored secret is sealed under it
--metrics-listenstring127.0.0.1:9090address Prometheus metrics listen on
--oidc-acr-valuesstringnoneoptional acr_values sent on every sign-in, for a provider that only reports a second factor when asked for a stronger context, for example urn:okta:loa:2fa:any
--oidc-client-idstringnoneOIDC client id registered with the issuer
--oidc-client-secretstringnoneOIDC client secret registered with the issuer
--oidc-insecure-httpboolnoneallow a plain http issuer; development and end-to-end tests only
--oidc-issuerstringnoneOIDC issuer URL; this installation delegates all authentication to it
--oidc-provider-namestringyour identity providername shown on the sign-in button
--oidc-scopesstringopenid profile emailspace-separated OIDC scopes to request
--pagerduty-events-urlstringhttps://events.pagerduty.comPagerDuty Events API origin notification channels deliver to; override for an end-to-end test fake
--pprofboolnoneexpose /debug/pprof on the metrics listener
--previous-master-keyslistnoneolder base64 32-byte master keys, comma-separated; retain them only until nebula secrets reseal has re-encrypted every stored secret
--release-feed-urlstringhttps://get.nebulactrl.dev/changelog.jsonrelease feed checked for a newer release, in the shape GET /api/v1/releases serves, for example a mirror. Requests carry no instance id or version, only a plain "NebulaCtrl" User-Agent
--simulated-clusterboolnonerun an in-process simulated cluster instead of waiting for a real one
--simulated-cluster-expandable-storageboolnonegive the simulated cluster an expandable default storage class (longhorn) next to local-path, which cannot expand
--trusted-proxieslistnoneproxy IP addresses or CIDRs allowed to supply client IP headers; use cloudflare for its reviewed edge ranges, and include the exact local reverse-proxy or Docker bridge CIDR
--update-checkbooltruecheck the release feed for a newer NebulaCtrl release; false turns update checks off entirely, for an air-gapped install
--updater-tokenstringnonesecret the host updater presents when it polls the control plane; the installer generates it as NEBULA_UPDATER_TOKEN in .env. Empty turns console updates of the control plane off

nebula template

Work with app template files.

nebula template COMMAND

Commands:

nebula template validate

Parse one or more template files and report every problem.

Parses each FILE as an app template and reports every problem in it. The file name, minus .yaml or .yml, must equal the template's slug.

A file with no problem prints FILE: ok and the template's name and service count. The command exits 1 if any file has a problem. It needs no database and no control plane.

nebula template validate FILE...
nebula template validate templates/redis-cache.yaml

nebula updater

Run the host service that performs console-requested control plane updates.

The updater runs on the control plane's host, not in its container. Every interval it polls the control plane over the host's loopback listener with the token in <dir>/.env (NEBULA_UPDATER_TOKEN). When an owner asked for an update it runs that version's install.sh from the get site, the command an operator would run by hand, verifies the new version, reinstalls the previous one if that fails, and reports the outcome. install.sh installs it as the nebula-updater systemd service.

nebula updater [flags]

Flags:

FlagTypeDefaultDescription
--control-plane-urlstringnonecontrol plane base URL; default http://<NEBULA_HOST_LISTEN from <dir>/.env>
--dirstringnoneinstall directory holding .env, bin and updater; required
--get-urlstringhttps://get.nebulactrl.devrelease site serving versions.json and each version's install.sh
--intervalduration15show often to poll the control plane, which is also its heartbeat

nebula version

Print the build version.

Prints the version, the Go version and the operating system and architecture the binary was built for.

nebula version

On this page