Skip to content

Environment variables

This is the definitive list. It is generated by hand from the Zod schema in packages/server/src/config/env.ts; if a row here disagrees with that file, the file wins.

Required means the schema rejects the value when it is absent or empty. Default is the schema-level default; an empty Default cell means there is no default and the variable is optional.

NameRequiredDefaultDescription
APP_URLNohttp://localhost:5173Public URL of the client app (used for redirects / CORS).
BETTER_AUTH_SECRETYesSigning secret for Better-Auth sessions (min 32 chars).
BETTER_AUTH_URLNohttp://localhost:3001Public URL the server is reachable at for Better-Auth.
CORS_ORIGINSNohttp://localhost:5173Comma-separated list of allowed CORS origins.
GITHUB_CLIENT_IDNoGitHub OAuth client ID (public identifier).
GITHUB_CLIENT_SECRETNoGitHub OAuth client secret.
GOOGLE_CLIENT_IDNoGoogle OAuth client ID (public identifier).
GOOGLE_CLIENT_SECRETNoGoogle OAuth client secret.
HOSTNo0.0.0.0Interface the HTTP server binds to.
LOG_LEVELNoinfoPino log level for the server. One of fatal, error, warn, info, debug, trace, silent.
NODE_ENVNodevelopmentRuntime environment. One of development, test, production.
NOTES_DIRNo../../notesFilesystem path for note storage.
OPENAPI_ENABLEDNotrueEnable the /docs OpenAPI UI ("true"/"false").
PORTNo3001TCP port the HTTP server listens on.
POSTGRES_URLNo (but required at boot)Postgres connection string for the Drizzle data layer. Schema-optional so test harnesses can short-circuit; dbPlugin rejects startup without it.
RATE_LIMIT_MAXNo1000Max requests per rate-limit window per client.
RATE_LIMIT_WINDOWNo1 minuteRate-limit window (e.g. "1 minute").
SEMANTIC_CHUNK_OVERLAPNo32Token overlap between adjacent chunks.
SEMANTIC_CHUNK_TOKENSNo256Tokens per semantic-search chunk.
SEMANTIC_DIMENSIONSNo384Embedding vector dimensions (must match the model).
SEMANTIC_MODELNoXenova/all-MiniLM-L6-v2HuggingFace model id for the local embedder.
SEMANTIC_PROVIDERNopgvector-localSemantic-search embedder backend. One of pgvector-local, novamem, off.
SMTP_FROMNoDefault From: address for outbound mail.
SMTP_HOSTNoSMTP server hostname for outbound mail.
SMTP_PASSNoSMTP auth password.
SMTP_PORTNoSMTP server port.
SMTP_SECURENoWhether to use TLS for SMTP ("true"/"false").
SMTP_USERNoSMTP auth username.
WEBAUTHN_RP_IDNolocalhostWebAuthn Relying Party ID (typically the public hostname).