Complete Reference
.env Reference
Every environment variable used by KaiVox AI, grouped by category. Keys marked Required must be set for the feature to work. Optional keys have sensible defaults.
Never commit .env to git. It is in .gitignore. Use .env.example as a template and copy it to .env on each server.
App
| Key | Example Value | Required? | Description |
APP_NAME | KaiVox AI | ✅ Yes | Application name shown in emails and UI |
APP_ENV | local / staging / production | ✅ Yes | Controls error reporting, caching behaviour |
APP_KEY | base64:... | ✅ Yes | Generated by php artisan key:generate — never share |
APP_DEBUG | true (local) / false (prod) | ✅ Yes | Show detailed errors. Must be false in production |
APP_URL | http://kaivox-ai.test | ✅ Yes | Full base URL — used for webhook URLs shown to tenants |
APP_TIMEZONE | UTC | ❌ Optional | Default timezone for the app (tenants set their own timezone) |
APP_LOCALE | en | ❌ Optional | Default locale |
Database
| Key | Example Value | Required? | Description |
DB_CONNECTION | mysql | ✅ Yes | Database driver |
DB_HOST | 127.0.0.1 | ✅ Yes | Database host |
DB_PORT | 3306 | ✅ Yes | Database port |
DB_DATABASE | kaivox_ai | ✅ Yes | Database name |
DB_USERNAME | root | ✅ Yes | Database username |
DB_PASSWORD | root | ✅ Yes | Database password |
Mail / Email
| Key | Example Value | Required? | Description |
MAIL_MAILER | log (local) / smtp (prod) | ✅ Yes | Use log locally (emails in storage/logs), smtp on server |
MAIL_HOST | mail.hostinger.com | If smtp | SMTP server hostname |
MAIL_PORT | 465 | If smtp | 587 (TLS) or 465 (SSL). Note: both blocked on local ISP — use server |
MAIL_USERNAME | kaivox@omajestic.com | If smtp | SMTP login email |
MAIL_PASSWORD | your-email-password | If smtp | SMTP login password |
MAIL_ENCRYPTION | ssl | If smtp | Use ssl for port 465, tls for port 587 |
MAIL_FROM_ADDRESS | kaivox@omajestic.com | ✅ Yes | Default from address for system emails |
MAIL_FROM_NAME | KaiVox AI | ✅ Yes | Default from name |
Local email workaround: Set
MAIL_MAILER=log to write emails to
storage/logs/laravel.log instead of sending. Install
Mailpit (free, single .exe) to catch emails in a local inbox at
localhost:8025.
Queue
| Key | Example Value | Required? | Description |
QUEUE_CONNECTION | database | ✅ Yes | Queue driver — database stores jobs in MySQL. Run php artisan queue:work to process. |
OpenAI
| Key | Example Value | Required? | Description |
OPENAI_API_KEY | sk-proj-xxxx... | ✅ Yes | Platform-level OpenAI key. All tenants share this. Get from platform.openai.com → API Keys |
OPENAI_MODEL | gpt-4o | ❌ Optional | AI model to use. Default: gpt-4o. Change to gpt-4o-mini to reduce costs |
Twilio
| Key | Example Value | Required? | Description |
TWILIO_ACCOUNT_SID | ACxxxxxxxxxx | ✅ Yes (for Twilio) | From Twilio Console → Account Info |
TWILIO_AUTH_TOKEN | xxxxxxxxxxxxxxxx | ✅ Yes (for Twilio) | From Twilio Console → Account Info |
TWILIO_FROM_NUMBER | +12025551234 | ✅ Yes (for SMS/WhatsApp) | Twilio number in E.164 format — used as the sender for outbound SMS and WhatsApp |
Vobiz
⚠️ Vobiz credentials are no longer stored in .env — they are managed in
Super Admin → Platform Settings (stored in the platform_settings DB table).
This supports multi-tenant SaaS properly — no per-tenant credentials in server config files.
| Where | Field | Used For |
| Super Admin → Platform Settings | Vobiz App ID | DID marketplace (browse/purchase/release numbers) |
| Super Admin → Platform Settings | Vobiz API Key | DID marketplace (browse/purchase/release numbers) |
phone_numbers.provider_api_key (DB) | Per-tenant Auth Token | Recording download during live calls (X-Auth-Token header) |
Stripe
| Key | Example Value | Required? | Description |
STRIPE_KEY | pk_test_... | ✅ Yes (for Stripe) | Publishable key — used in frontend JS. Use pk_test_ for dev, pk_live_ for production |
STRIPE_SECRET | sk_test_... | ✅ Yes (for Stripe) | Secret key — server-side only. Never expose to frontend |
STRIPE_WEBHOOK_SECRET | whsec_... | ❌ Optional | For verifying Stripe webhook signatures (future use) |
Razorpay
| Key | Example Value | Required? | Description |
RAZORPAY_KEY | rzp_test_... | ✅ Yes (for Razorpay) | Key ID from Razorpay Dashboard → Settings → API Keys |
RAZORPAY_SECRET | xxxxxxxxxxxxxxxxxx | ✅ Yes (for Razorpay) | Key Secret — used to verify payment signatures server-side |
Google
| Key | Example Value | Required? | Description |
GOOGLE_CLIENT_ID | 12345.apps.googleusercontent.com | ❌ Optional | For Google Calendar OAuth. Leave blank until staging deploy |
GOOGLE_CLIENT_SECRET | GOCSPX-... | ❌ Optional | Google OAuth client secret |
GOOGLE_REDIRECT_URI | https://kaivox-test.omajestic.com/settings/google-calendar/callback | ❌ Optional | Must match exactly what is registered in Google Cloud Console |
Session & Cache
| Key | Example Value | Required? | Description |
SESSION_DRIVER | database | ✅ Yes | Session storage driver. database is recommended for multi-server setups |
SESSION_LIFETIME | 120 | ❌ Optional | Session lifetime in minutes |
CACHE_DRIVER | file | ❌ Optional | Cache driver. file is fine for single-server. Use redis for high traffic |
Complete .env Template
.env (copy this as a starting point)
APP_NAME="KaiVox AI"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://kaivox-ai.test
APP_TIMEZONE=UTC
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=kaivox_ai
DB_USERNAME=root
DB_PASSWORD=root
QUEUE_CONNECTION=database
SESSION_DRIVER=database
SESSION_LIFETIME=120
CACHE_DRIVER=file
MAIL_MAILER=log
MAIL_HOST=mail.hostinger.com
MAIL_PORT=465
MAIL_USERNAME=kaivox@omajestic.com
MAIL_PASSWORD=
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=kaivox@omajestic.com
MAIL_FROM_NAME="KaiVox AI"
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_FROM_NUMBER=
# Vobiz credentials are in Super Admin → Platform Settings (DB), NOT in .env
STRIPE_KEY=
STRIPE_SECRET=
RAZORPAY_KEY=
RAZORPAY_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=