Skip to main content
Environment variables go in the Russelfile under [service.env]. Secrets are stored on the server and referenced from the Russelfile as secret://NAME, so the repo never contains them.

Env vars

Russel checks these when it loads the Russelfile, before any build, and again after filling in secrets.

Env rules

  • Names start with a letter or _, followed by letters, digits, or _.
  • At most 64 variables. Each value is at most 4096 bytes, on one line.
  • These names are reserved and rejected: PORT, VM_IP, HOST_IP, APP, IFS, PATH, LD_PRELOAD, LD_AUDIT, LD_LIBRARY_PATH, BASH_ENV, ENV, SHELL.
Russel sets PORT to service.port for you. VM_IP, HOST_IP, and APP are set inside microVMs.

Secrets

Store a secret by piping its value in. It never appears in your shell history or on a command line:
Use it in any env value:
Russel fills in the value at deploy time. If the secret doesn’t exist, the deploy fails. Secret names use letters, digits, _, and -, up to 64 characters. They’re stored in /var/lib/russel/secrets/, one file per secret with mode 0600.

Changing a secret

Set the new value, then rebuild the running version so it picks it up:

Who can see what

Either way, put anything sensitive behind secret://.

Example

examples/env-config reads two plain variables and one secret: