Required environment variables
Toots requires several environment variables to function properly. Create a.env file in the apps/web directory with the following configuration.
Database connection
postgresql://[user]:[password]@[host]:[port]/[database]
Make sure the database specified in
DATABASE_URL exists before running migrations.Authentication secrets
- BETTER_AUTH_SECRET - A random secret string used for session signing and encryption. Generate a secure random string for production.
- BETTER_AUTH_URL - The base URL where your application is hosted. Use
http://localhost:3000for local development.
AI integration
Without a valid Gemini API key, the AI features (ticket generation and project chat) will not work. See AI integration for setup instructions.
Docker Compose environment
If you’re using the includedcompose.yaml for PostgreSQL, you can also set these variables in a root .env file:
DATABASE_URL.
Example configuration
Here’s a complete.env file for local development:
apps/web/.env
Generating secrets
ForBETTER_AUTH_SECRET, generate a secure random string: