Configuration

NornWeave is configured through environment variables. This page documents all available options.

Database Configuration

VariableDescriptionDefault
DB_DRIVERDatabase driver (postgres or sqlite)postgres
POSTGRES_HOSTPostgreSQL hostlocalhost
POSTGRES_PORTPostgreSQL port5432
POSTGRES_DBDatabase namenornweave
POSTGRES_USERDatabase usernornweave
POSTGRES_PASSWORDDatabase passwordRequired

Example

DB_DRIVER=postgres
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=nornweave
POSTGRES_USER=nornweave
POSTGRES_PASSWORD=your-secure-password

Email Provider Configuration

VariableDescriptionDefault
EMAIL_PROVIDERProvider to use (mailgun, sendgrid, ses, resend)Required

Mailgun

EMAIL_PROVIDER=mailgun
MAILGUN_API_KEY=your-api-key
MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_REGION=us  # or: eu

SendGrid

EMAIL_PROVIDER=sendgrid
SENDGRID_API_KEY=your-api-key

AWS SES

EMAIL_PROVIDER=ses
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_REGION=us-east-1

Resend

EMAIL_PROVIDER=resend
RESEND_API_KEY=your-api-key

API Configuration

VariableDescriptionDefault
API_KEYAPI key for authenticationRequired
API_HOSTHost to bind to0.0.0.0
API_PORTPort to listen on8000
LOG_LEVELLogging levelINFO

Example

API_KEY=your-secure-api-key
API_HOST=0.0.0.0
API_PORT=8000
LOG_LEVEL=INFO

MCP Server Configuration

VariableDescriptionDefault
MCP_ENABLEDEnable MCP servertrue
MCP_API_URLURL for the REST APIhttp://localhost:8000

Complete Example

Here’s a complete .env file:

# Database
DB_DRIVER=postgres
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=nornweave
POSTGRES_USER=nornweave
POSTGRES_PASSWORD=super-secret-password

# Email Provider (Mailgun)
EMAIL_PROVIDER=mailgun
MAILGUN_API_KEY=key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MAILGUN_DOMAIN=mail.example.com
MAILGUN_REGION=us

# API
API_KEY=nw-xxxxxxxxxxxxxxxxxxxxxxxxxxxx
API_HOST=0.0.0.0
API_PORT=8000
LOG_LEVEL=INFO

# MCP
MCP_ENABLED=true
MCP_API_URL=http://localhost:8000

Next Steps