Skip to content

Configuration

Recto is configured entirely through environment variables. Copy .env.example to .env and adjust as needed.

VariableDescriptionDefault
DATABASE_URLPostgreSQL connection stringpostgresql://recto:recto@localhost:5432/recto
DB_PASSWORDPostgreSQL passwordrecto
VariableDescriptionDefault
RECTO_API_KEYAPI key for authenticating requests (min 32 characters)(required)

Used for auto-tagging, summarization, mood detection, and reflections. Configure one provider.

VariableDescriptionDefault
LLM_PROVIDERLLM provider: anthropic or openai(none)
ANTHROPIC_API_KEYAnthropic API key (for Claude)(none)
OPENAI_API_KEYOpenAI API key (for GPT-4o)(none)

Used for semantic (vector) search. Configure one provider.

VariableDescriptionDefault
EMBEDDING_PROVIDERProvider: openai, voyageai, ollama(none)
VOYAGE_API_KEYVoyageAI API key(none)
OLLAMA_URLOllama server URLhttp://localhost:11434
OLLAMA_EMBEDDING_MODELOllama embedding modelnomic-embed-text
EMBEDDING_DIMENSIONSOverride auto-detected dimensions(auto)

Auto-detected dimensions per provider:

ProviderModelDimensions
OpenAItext-embedding-3-small1536
VoyageAIvoyage-3.51024
Ollamanomic-embed-text768
VariableDescriptionDefault
RECTO_DOMAINDomain for Caddy and OAuth issuer URLlocalhost
CADDY_GLOBAL_OPTIONSCaddy global options (set to auto_https off behind a TLS proxy)(none)
RECTO_ACCESS_TOKEN_TTLOAuth access token TTL in seconds3600
RECTO_REFRESH_TOKEN_TTLOAuth refresh token TTL in seconds7776000

RECTO_DOMAIN serves two purposes:

  • Caddy listens on this domain and provisions TLS certificates automatically
  • The OAuth issuer URL is derived as https://<RECTO_DOMAIN>

Set CADDY_GLOBAL_OPTIONS=auto_https off when running behind a TLS-terminating proxy (ngrok, Cloudflare, AWS ALB). See Deployment for details.

Protects the web dashboard with HTTP basic auth when accessed through Caddy.

VariableDescriptionDefault
RECTO_WEB_USERBasic auth usernameadmin
RECTO_WEB_PASSWORD_HASHBcrypt hash of the password(required)

Generate the hash:

Terminal window
docker run --rm caddy:2-alpine caddy hash-password --plaintext 'your-password'
VariableDescriptionDefault
API_PORTAPI server port3000
MCP_PORTMCP server port3001
DB_PORTPostgreSQL port5432
Terminal window
# Database
DATABASE_URL=postgresql://recto:recto@localhost:5432/recto
DB_PASSWORD=recto
# Required (min 32 characters)
RECTO_API_KEY=change-me-to-a-secret-key-at-least-32-chars
# AI enrichment (pick one)
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
# Semantic search (pick one)
EMBEDDING_PROVIDER=openai
OPENAI_API_KEY=sk-...
# Domain & proxy
# RECTO_DOMAIN=localhost
# CADDY_GLOBAL_OPTIONS=auto_https off
# Web UI auth
RECTO_WEB_USER=admin
RECTO_WEB_PASSWORD_HASH=$$2a$$14$$...your-hash-here...
# Ports
API_PORT=3000
MCP_PORT=3001
DB_PORT=5432