Skip to main content
Configure tinykit using environment variables. All settings can be configured via a .env file or passed directly to your deployment platform.

Quick Reference

*Can also be configured via /tinykit/settings UI after deployment.

AI Provider Settings

LLM_PROVIDER

The AI provider to use for the agent. Options:

LLM_API_KEY

Your API key from the provider. Get yours from:
Never commit API keys to version control. Use environment variables or secrets management.

LLM_MODEL

The specific model to use. Defaults vary by provider:

LLM_BASE_URL

Custom API endpoint for OpenAI-compatible providers. Only needed for:
  • Self-hosted models
  • Other OpenAI-compatible APIs

Database Settings

POCKETBASE_ADMIN_EMAIL

Email address for the Pocketbase admin account. Used to initialize the database on first run.

POCKETBASE_ADMIN_PASSWORD

Password for the Pocketbase admin account. Must be at least 8 characters.
Use a strong, unique password. This account has full access to your database.

POCKETBASE_URL

Optional. URL of an external Pocketbase instance. By default, tinykit runs its own embedded Pocketbase.

Server Settings

PORT

The port the server listens on.
  • Default: 3000 (production), 5173 (development)
  • Railway and similar platforms set this automatically

HOST

The host address to bind to.
  • Default: 0.0.0.0 (all interfaces)
  • Use 127.0.0.1 to restrict to localhost only

Provider Examples

Anthropic (Claude)

OpenAI (GPT-4)

Google (Gemini)


Complete Example

Here’s a complete .env file for production:

Platform-Specific Notes

Railway

Railway automatically sets PORT. Configure other variables in the Railway dashboard under Variables.

Docker

Pass variables with -e flags or use --env-file:

VPS / PM2

Use a .env file in the project root, or configure in ecosystem.config.js:

Troubleshooting

Check these in order:
  1. LLM_API_KEY is set and valid
  2. LLM_PROVIDER matches your key (e.g., Anthropic key with anthropic provider)
  3. Your account has credits/quota remaining
  4. Check logs for specific error messages
Verify:
  1. POCKETBASE_ADMIN_EMAIL is a valid email format
  2. POCKETBASE_ADMIN_PASSWORD is at least 8 characters
  3. The pocketbase/pb_data directory is writable
Check:
  1. PORT isn’t already in use (lsof -i :3000)
  2. HOST is set correctly for your environment
  3. Firewall allows traffic on the port
Environment variables are read at startup. After changing .env:
  • Development: Restart npm run dev
  • PM2: Run pm2 restart tinykit
  • Docker: Recreate the container
  • systemd: Run sudo systemctl restart tinykit