default. Background: Environments and secrets.
Wherever a command takes --env ENV, ENV is an environment name or env_ id, and leaving it out means default. --environment is the same flag. Making and deleting environments, and setting variables and secrets, needs an owner or admin.
zode env
zode envs, zode environment and zode environments work too.
--environment to zode new; a fork reads its parent’s.
Private network and mesh
--env. Read How private networking works first, then the page for your mesh: Tailscale, Headscale or NetBird.
zode env network <env>shows the environment’s private range, the DNS domains that resolve through the mesh, the mesh connection, and one row per host router (ROUTER,ONLINE,ROUTES,SANDBOXES,ERROR).--cidrsets the private/16the environment’s sandboxes get.--domainssets the DNS names that resolve through the mesh, comma separated;--domains ""clears them.zode env meshreads every credential from stdin, or asks for it without echo: a reusable tagged auth key for Tailscale or Headscale, or the OAuth client secret when you pass--oauth-client-id; a reusable setup key for NetBird, and a NetBird API token too with--api-token, so Zode can add the routes itself.--control-urlis your Headscale server, or a self-hosted NetBird management URL.- On success it prints
staging is on your tailscale mesh as 10.77.0.0/16; routers come up on its nodes now (zode env network staging), then the lines to add to your tailnet policy, or the routes to add in NetBird.
zode secret
zode secrets works too, and add for set, delete for rm.
A sandbox never sees a secret’s value. It gets a placeholder, and the host’s egress proxy swaps in the real value only on requests to the secret’s hosts. Hosts are names such as api.stripe.com, or *.example.com for any subdomain.
Set a secret
The value never goes on the command line, where shell history andps would keep it. Pipe it in, or type it at the prompt, which does not echo:
--host is required at least once; repeat it for more hosts. Setting an existing name replaces its value and hosts.
Host check before upload
Before it uploads a value,zode secret set checks the signed release of every host in the regions your workspace runs in, on your machine, the same way as zode verify. It does not take the API’s word for it.
If any host does not verify, nothing is uploaded:
--unverified uploads anyway and says so on stderr. When every host verifies but some are signed_image rather than tpm_quoted, the CLI uploads and prints a note: the release is in the public log, but those hosts’ measurements are their own word, not a TPM quote. See Attestation.
Some credentials cannot be swapped by a proxy and are refused with secret_unsupported, for example AWS secret keys and database connection strings. See Limits.
List, allow, delete
LAST USED is when a host last swapped the value into a request.
allow keeps the stored value and changes only the hosts, so it does not ask for the value or run the host check.