If you are running Masker in your own VPC or on-premises, a small set of environment variables controls how Masker handles encryption keys and authenticates CLI commands against your server. Hosted SaaS customers onDocumentation Index
Fetch the complete documentation index at: https://docs.masker.dev/llms.txt
Use this file to discover all available pages before exploring further.
masker-voice.fly.dev do not configure these directly — they are managed by Masker’s infrastructure. This page covers only the variables that you, as a self-hosted operator, are responsible for setting.
For deployment configuration (server address, database URL, upstream LLM endpoint, and so on), see the deployment guide, which includes annotated Docker and Kubernetes examples.
Encryption keys
Masker uses symmetric 256-bit keys for tokenization and AEAD operations. Each key is identified by a key ID (kid) that matches a corresponding entry in your mask policy. The environment variable name is always MASKER_KEY_<KID>, where <KID> is the key ID in uppercase.
| Variable | Example value | Description |
|---|---|---|
MASKER_KEY_K_HEALTHCARE | base64(32 bytes) | Active encryption key for the K_HEALTHCARE kid. Required if your policy uses kid: K_HEALTHCARE. |
MASKER_KEY_K_HEALTHCARE_OLD | base64(32 bytes) | Previous key, kept during rotation so that tokens minted under the old key can still be rehydrated. |
kid referenced in the policy has no matching key variable.
Key rotation
Masker supports zero-downtime key rotation. The process is:Set both the new and old keys
Add the new key as
MASKER_KEY_K_HEALTHCARE and move the current key to MASKER_KEY_K_HEALTHCARE_OLD. Both variables must be present during the grace period.Restart Masker
Masker picks up the new key at boot. New tokens are minted under the new key. Rehydration of existing tokens falls back to
_OLD automatically.Re-encrypt the vault (optional)
If you are using This is optional — the
vault-deterministic tokenization, you can re-encrypt all stored tokens under the new key:_OLD key handles rehydration of legacy tokens for as long as you keep it set.CLI authentication
Themasker CLI can talk to a remote Masker server for commands like masker sessions list, masker report, and masker policy reload. These commands require a session credential.
| Variable | Description |
|---|---|
MASKER_SESSION | Session cookie for authenticating CLI commands against a remote server. |
masker_session cookie.
A scoped, long-lived CLI token that does not require copying a browser cookie is on the May 30 roadmap. Until then,
MASKER_SESSION is the supported authentication mechanism for remote CLI commands.Config file path
| Variable | Default | Description |
|---|---|---|
MASKER_CONFIG | ./masker.toml | Path to the masker.toml CLI configuration file. Overrides the default search path. |
--config <path>flagMASKER_CONFIGenvironment variable./masker.tomlin the current directory~/.config/masker/config.toml
masker.toml format.
Setting variables in common environments
- Docker
- Kubernetes
- Fly.io
Pass secrets via an env file rather than inline flags to avoid values appearing in
ps output or shell history: