Environment Variables
The TriFrost App automatically picks up configuration from the following env vars:
๐ฆ Core Configuration
app name
Sets the app name, used for example in otel telemetry.
- Variable priority:
TRIFROST_NAMEโSERVICE_NAME - Example:
'my-service' - Default:
'trifrost'
app version
Sets the app version, used for example in otel telemetry.
- Variable priority:
TRIFROST_VERSIONโSERVICE_VERSIONโVERSION - Example:
'0.9.1' - Default:
'1.0.0'
๐ Networking
host
Sets the known host internally (important to note that if trust proxy is not enabled, this is the only way to determine host). Used in otel telemetry and behaviors such as redirect.
- Variable priority:
TRIFROST_HOSTโSERVICE_HOSTโHOST - Example:
'trifrost.dev' - Default:
'0.0.0.0'
port
Used in non-edge runtimes (Node/Bun) to determine what port to bind to.
- Variable priority:
TRIFROST_PORTโSERVICE_PORTโPORT - Example:
8080 - Default:
3000
๐ก Proxy Trust
Sets whether to trust proxy headers. Each runtime has their own default (workerd=true, node/bun=false).
Proxy trust allows internal logic to look at headers to determine host, IP address, etc.
Only enable this if you're behind a trusted proxy or gateway.
- Variable priority:
TRIFROST_TRUSTPROXYโSERVICE_TRUSTPROXYโTRUSTPROXY - Example:
true - Default: runtime-specific (
workerd=true,node/bun=false)
๐งช Dev Mode
Enables dev mode.
Only set this for local development โ it enables relaxed behaviors and more verbose output.
- Variable priority:
TRIFROST_DEV - Example:
true - Default:
false
๐ Debug
Enables debug logs and verbose runtime output.
- Variable priority:
TRIFROST_DEBUGโDEBUG - Example:
true - Default:
false
๐ Also see: Dev Mode
๐ Full Example
This is an example .env file you could use locally or in CI:
# .env
# App identity
TRIFROST_NAME="my-service"
TRIFROST_VERSION="0.9.1"
# Runtime binding (only used for Node/Bun)
TRIFROST_PORT="8080"
TRIFROST_HOST="trifrost.dev"
# Proxy trust (only enable if you're behind something like Cloudflare or a trusted load balancer)
TRIFROST_TRUSTPROXY="true"
# Dev/debug mode (should only be set in local/dev environments)
TRIFROST_DEV="true"
TRIFROST_DEBUG="true"