Tokens¶
Tokens are named text values that can be referenced from environment variables and other generated configuration.
A token can either:
- have a fixed plain value
- use a regular expression to generate a random secret value when the app environment or app service is created or updated
In an app service, token definitions are composed across several levels. Later levels override earlier ones when they use the same token name and the same environment type:
- service-defined tokens
- stack-wide tokens
- stack-service tokens
Tokens with different environment types are separate definitions. When a token is resolved at runtime, an environment-specific token takes precedence over a token without an environment type.
After tokens are materialized on an app service, the app-service token records are the effective runtime values. During
a stack upgrade, enabling Override tokens recreates those app-service tokens from the latest service and stack
definitions; leaving it disabled keeps the existing app-service token values. Existing generated values are preserved
when the latest definition still generates the same token name for the same environment type. This prevents a stack
upgrade from rotating database passwords and other generated credentials. Rotate such a credential explicitly when a
new value is required.
This page is the public reference for built-in runtime tokens resolved in app-service context.
Some internal or infrastructure-only secret-bearing tokens are intentionally omitted from this public list.
Where tokens are supported¶
Tokens are commonly supported in:
- environment variable values defined by services, stacks, apps, links, imports, and workloads
- Helm values such as
helm.values[].valueand other service manifest fields that feed values into a Helm chart - config contents when
configs[].processTokens: trueis enabled - action arguments, database actions, backup actions, and similar generated runtime configuration
Secret tokens in environment variables¶
Generated tokens are always secret. A fixed-value token is secret when its effective service, stack, stack-service, or app-service definition marks it as secret.
When an environment variable directly references a named token, Wodby automatically carries that classification into the resolved environment variable. The destination becomes secret even when the token is embedded in a larger value, and the complete resolved value is stored in a Kubernetes Secret. The environment-variable definition does not need a duplicate secret flag.
This propagation is intentionally limited to direct named tokens. References under structured namespaces such as
links, integrations, database, certs, and keys still require the destination environment variable to be
marked secret explicitly. See Environment variables.
app¶
app.id: application ID, not app environment IDapp.name: application machine nameapp.title: application title
instance¶
instance is the legacy token namespace for an app environment. It remains available for template compatibility.
instance.id: app environment IDinstance.name: app environment machine nameinstance.namespace: Kubernetes namespace for the app environmentinstance.title: app environment title
kubernetes¶
kubernetes.id: Kubernetes cluster IDkubernetes.externalID: cluster external IDkubernetes.name: cluster machine namekubernetes.fullName: cluster full name
Infrastructure-oriented FRPC tokens are also supported under kubernetes.frpc.*, but the secret-bearing/internal
subset is intentionally not documented here.
env¶
env is the legacy token namespace backed by the internal environment-policy record. Prefer instance for app
environment identity and env.type for behavior that depends on an environment type.
env.id: environment IDenv.name: environment machine nameenv.title: environment titleenv.type: environment type
org¶
org.id: organization ID
service¶
service.id: app-service IDservice.name: app-service machine nameservice.title: app-service titleservice.host: app-service hostnameservice.fqdnPrefix: generated host prefix used for domainsservice.primaryURL: primary URL for the service, including scheme when a primary domain existsservice.primaryHost: primary domain name for the serviceservice.mainPort.number: port number of the primary port on the primary endpointservice.mainPort.protocol: protocol of the primary port on the primary endpointservice.replicas: app-service replica countservice.secrets.env: generated Kubernetes Secret name used for secret environment variables
Legacy service.helm.release is still supported for backward compatibility.
helm¶
helm.release: resolved Helm release name for the current app service
Use this token when a chart exposes labels, selectors, or values keyed by the Helm release name.
stack¶
stack.id: stack IDstack.name: stack machine namestack.title: stack titlestack.version: stack versionstack.rev.id: stack revision IDstack.rev.number: stack revision number
database¶
Available when the current app-service context exposes a database.
database.host: database hostname. This is private when accessed through an app service with a private database user, otherwise publicdatabase.port: database connection port. This is private when available, otherwise publicdatabase.driver: database driver, based on the database kinddatabase.root.name: database superuser usernamedatabase.root.password: database superuser passworddatabase.user.name: database username for the current app-service contextdatabase.user.password: database user password for the current app-service contextdatabase.db.name: database name for the current app-service contextdatabase.db.charset: database charset for the current app-service contextdatabase.db.collation: database collation for the current app-service context
links¶
Accessed as links.[name].[token].
links.[name].host: linked app-service hostnamelinks.[name].port: primary port of the linked app service's primary endpointlinks.[name].service.*: service token from the linked app service. Seeservicelinks.[name].instance.*: app environment token from the linked app service. Seeinstancelinks.[name].env.[env-var-name]: environment-variable value from the linked app servicelinks.[name].tokens.[token-name]: token value from the linked app servicelinks.[name].database.*: database token from the linked app service. Seedatabase
configs¶
Accessed as configs.[name].[token].
configs.[name].configMap: generated Kubernetes ConfigMap name for the named config
keys¶
Available to a service that declares a generated key in its
service.yml. Accessed as keys.[name].[field]:
keys.[name].privateKey: PKCS#8 private-key PEMkeys.[name].privateKeyBase64: base64-encoded PKCS#8 private-key PEMkeys.[name].publicKey: PKIX public-key PEMkeys.[name].publicKeyBase64: base64-encoded PKIX public-key PEMkeys.[name].fingerprint: unpadded base64url-encoded SHA-256 fingerprint of the PKIX public key
The keys namespace is available only in the owning app-service context and is not exposed under links. Environment
variables that use a private-key field must be marked secret: true.
volumes¶
Accessed as volumes.[name].[token].
volumes.[name].size: effective volume size in GBvolumes.[name].claim: generated PVC name for the named volumevolumes.[name].storageClassName: configured Kubernetes storage class. An unset class resolves as an omitted Helm value so the cluster can apply default storage-class admission.
integrations¶
Accessed as integrations.[name].[token].
integrations.[name].key: integration key or secret valueintegrations.[name].variables.[variable-name]: exported integration variable by name