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.
| Name | Required | Default | Description |
|---|---|---|---|
APP_URL | No | http://localhost:5173 | Public URL of the client app (used for redirects / CORS). |
BETTER_AUTH_SECRET | Yes | — | Signing secret for Better-Auth sessions (min 32 chars). |
BETTER_AUTH_URL | No | http://localhost:3001 | Public URL the server is reachable at for Better-Auth. |
CORS_ORIGINS | No | http://localhost:5173 | Comma-separated list of allowed CORS origins. |
GITHUB_CLIENT_ID | No | — | GitHub OAuth client ID (public identifier). |
GITHUB_CLIENT_SECRET | No | — | GitHub OAuth client secret. |
GOOGLE_CLIENT_ID | No | — | Google OAuth client ID (public identifier). |
GOOGLE_CLIENT_SECRET | No | — | Google OAuth client secret. |
HOST | No | 0.0.0.0 | Interface the HTTP server binds to. |
LOG_LEVEL | No | info | Pino log level for the server. One of fatal, error, warn, info, debug, trace, silent. |
NODE_ENV | No | development | Runtime environment. One of development, test, production. |
NOTES_DIR | No | ../../notes | Filesystem path for note storage. |
OPENAPI_ENABLED | No | true | Enable the /docs OpenAPI UI ("true"/"false"). |
PORT | No | 3001 | TCP port the HTTP server listens on. |
POSTGRES_URL | No (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_MAX | No | 1000 | Max requests per rate-limit window per client. |
RATE_LIMIT_WINDOW | No | 1 minute | Rate-limit window (e.g. "1 minute"). |
SEMANTIC_CHUNK_OVERLAP | No | 32 | Token overlap between adjacent chunks. |
SEMANTIC_CHUNK_TOKENS | No | 256 | Tokens per semantic-search chunk. |
SEMANTIC_DIMENSIONS | No | 384 | Embedding vector dimensions (must match the model). |
SEMANTIC_MODEL | No | Xenova/all-MiniLM-L6-v2 | HuggingFace model id for the local embedder. |
SEMANTIC_PROVIDER | No | pgvector-local | Semantic-search embedder backend. One of pgvector-local, novamem, off. |
SMTP_FROM | No | — | Default From: address for outbound mail. |
SMTP_HOST | No | — | SMTP server hostname for outbound mail. |
SMTP_PASS | No | — | SMTP auth password. |
SMTP_PORT | No | — | SMTP server port. |
SMTP_SECURE | No | — | Whether to use TLS for SMTP ("true"/"false"). |
SMTP_USER | No | — | SMTP auth username. |
WEBAUTHN_RP_ID | No | localhost | WebAuthn Relying Party ID (typically the public hostname). |