What are environment variables?
Environment variables are secure values your app uses behind the scenes to:- Authenticate with third-party services
- Access APIs and integrations
- Enable billing or usage tracking
- Control app behavior across environments
When you’ll need environment variables
You’ll usually add environment variables when you connect your app to another service, such as:- AI tools (OpenAI, Anthropic, ElevenLabs, etc.)
- Voice or speech services
- Image generation tools
- Payment providers
- Analytics or data platforms
- Create an account with ElevenLabs
- Generate an API key
- Add that key to your app’s environment variables in Woz
- Your app can now securely access the service in production
Where to find environment variables in Woz
In Woz, environment variables live in the: Admin Area → Environment Variables tab This is where you can:- Add new variables
- Edit existing ones
- Manage which values are used in production
Frontend vs backend environment variables
Woz separates environment variables into two types based on security and access level.Frontend environment variables
Used by the app in the client- Less secure by nature
- Should only contain values that are safe to expose
- Best for:
- Public configuration
- Non-sensitive IDs
- Feature flags
Backend environment variables
Used by the API and server logic- Treated as secrets
- Never exposed to end users
- Best for:
- API keys
- Tokens
- Credentials
- Anything security-critical
Adding an environment variable
- Go to the Admin Area
- Open the Environment Variables tab
- Click Add variable
- Enter:
- The variable name
- The value
- Whether it should be frontend or backend
- Save your changes
Woz-managed environment variables
Woz apps come with many environment variables pre-configured to work out of the box. These include values that Woz:- Provides
- Manages
- Secures behind the scenes
Best practices
- Store secrets only in backend environment variables
- Never place API keys in frontend variables
- Use clear, descriptive variable names
- Avoid hard-coding credentials into your app
- Only override Woz-managed variables if absolutely necessary
- Rotate keys if you believe one has been exposed