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.
Generate a key with:
kid referenced in the policy has no matching key variable.
Key rotation
Masker supports zero-downtime key rotation. The process is:1
Generate a new key
2
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.3
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.4
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.5
Remove the old key after the grace period
Once you are confident no sessions are holding unrehydrated tokens from the old key, remove
MASKER_KEY_K_HEALTHCARE_OLD. After this point, tokens minted under the old key can no longer be rehydrated.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.
To obtain the value, sign in to your Masker portal, open your browser’s developer tools, and copy the value of the
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
The CLI resolves its config file in this order:
--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: