Environment Variables
Complete reference for configuring IrisOS through environment variables.
Overview
IrisOS uses environment variables for configuration. Store these in a .env file in your project root.
Required Variables
IrisOS API
# IrisOS API Key (required for API access)
IRIS_API_KEY=your_irisos_api_key_hereGet your API key from irisos.xyz/settings/api-keys
AI Model Providers
OpenAI
# OpenAI API Key
OPENAI_API_KEY=sk-...
# Optional: Custom endpoint
OPENAI_API_ENDPOINT=https://api.openai.com/v1
# Optional: Organization ID
OPENAI_ORG_ID=org-...Anthropic (Claude)
Google (Gemini)
OpenRouter
Local Models (Ollama)
Platform Integrations
Discord
Get credentials from Discord Developer Portal
Twitter/X
Get credentials from Twitter Developer Portal
Telegram
Get token from @BotFather
Farcaster
Database Configuration
PostgreSQL
MySQL
MongoDB
SQLite (Default)
Blockchain & Web3
Ethereum & EVM Chains
Solana
Plugin Configuration
Weather Plugin
Image Generation
Web Scraping
Server Configuration
HTTP Server
CORS
Rate Limiting
Authentication & Security
API Keys
Encryption
Logging & Monitoring
Logging
Sentry (Error Tracking)
DataDog
Caching
Redis
Memory Cache
Feature Flags
Development
Debug
Testing
Production Settings
Optimization
Timeouts
Example .env File
Complete example for a production setup:
Loading Environment Variables
Node.js (dotenv)
Docker
Kubernetes
Security Best Practices
Never commit .env files - Add to
.gitignoreUse different keys per environment - Dev, staging, production
Rotate keys regularly - Every 90 days minimum
Limit key permissions - Use least privilege principle
Monitor key usage - Track and alert on unusual activity
Use secret management - AWS Secrets Manager, HashiCorp Vault
Encrypt sensitive values - In production environments
Validation
Validate environment variables on startup:
Troubleshooting
Variable Not Found
Wrong Value
Next Steps
Projects Overview - Learn about project structure
Deployment Guide - Deploy your project
Security Best Practices - Secure your application
Need Help?
Last updated