Limerence

Configuration

Environment variables and configuration options

Required

VariableDescription
CONNECTION_STRINGPostgreSQL connection URL
BETTER_AUTH_SECRETAuth encryption key (min 32 characters)
BETTER_AUTH_URLPublic URL for auth callbacks

URLs

VariableDescriptionDefault
BACKEND_BASE_URLBackend API URLhttps://try.limerence.sh
FRONTEND_BASE_URLFrontend URLhttps://try.limerence.sh
BASE_PATHSubdirectory path (e.g. /myapp/)/
PORTServer port3000

Security

VariableDescriptionDefault
ALLOWED_ORIGINSComma-separated CORS originsNone

AI Providers

All provider configuration happens in Settings → AI Providers after first login. Supported providers: OpenAI, Anthropic, Google, Groq, Ollama, LM Studio, OpenRouter, xAI, MiniMax, and any OpenAI-compatible endpoint.

Example .env

# Database
CONNECTION_STRING=postgresql://limerence:limerence@localhost:5432/limerence

# Auth
BETTER_AUTH_SECRET=your-very-long-secret-at-least-32-characters
BETTER_AUTH_URL=https://yourdomain.com

# URLs (set both to your public URL in production)
BACKEND_BASE_URL=https://limerence.yourdomain.com
FRONTEND_BASE_URL=https://limerence.yourdomain.com

NODE_ENV=production
PORT=3000

Generating Secrets

openssl rand -hex 32

On this page