Skip to main content

These are the docs for 0.27.0-beta, an older release.

See the current docs (0.28.0-beta) for what Norish does today.

Server & runtime

Core

VariableDescriptionDefault
MASTER_KEYEncryption key, at least 32 characters(required)
AUTH_URLPublic URL used for auth callbacks and linkshttp://localhost:3000
NODE_ENVRuntime environmentproduction (set by the Docker image)
HOSTServer bind address0.0.0.0
PORTServer port3000
VALKEY_URLValkey connection URL (valkey:// or valkeys://) for events and jobs(required)

Generate a MASTER_KEY

Generate a key with openssl rand -base64 32. Keep it when you move or update Norish so it can still read your saved secrets.

Database

Set DATABASE_URL to point Norish at PostgreSQL.

docker-compose.yml (environment)
DATABASE_URL: postgres://postgres:norish@db:5432/norish

Leave DATABASE_URL unset to use these variables.

VariableDefault
DATABASE_HOSTlocalhost
DATABASE_PORT5432
DATABASEnorish
DATABASE_USERpostgres
DATABASE_PASSWORDnorish

Health checks

  • Use /api/v1/health/live to decide when to restart Norish.
  • Use /api/v1/health/ready to decide when to send it traffic.

Networking & origins

VariableDescriptionDefault
TRUSTED_ORIGINSComma-separated additional trusted origins(empty)
TRUSTED_PROXIESComma-separated IPs or CIDR ranges of your reverse proxies(empty)

Set TRUSTED_ORIGINS if people use more than one address for Norish. See Origin check.

Behind multiple reverse proxies, list each proxy's IP address or range in TRUSTED_PROXIES so visitors get separate rate limits. For Cloudflare, use its published ranges. Restrict access to the app port to your proxy to prevent forged X-Forwarded-For headers.

WebSocket & realtime

If changes appear only after a refresh, check that your proxy forwards WebSocket upgrades to Norish at /trpc.

nginx

location / {
proxy_pass http://norish:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 60s;
}

Keep proxy_read_timeout above 25 seconds.

Caddy

norish.example.com {
reverse_proxy norish:3000
}

Traefik

Traefik forwards upgrades by default. If you set respondingTimeouts.readTimeout, keep it above 25 seconds.

Origin check

For a WebSocket 403 Forbidden, check that the origin matches AUTH_URL, an entry in TRUSTED_ORIGINS, or the request host. If your proxy rewrites the host and users connect at a different address, add that origin to TRUSTED_ORIGINS.

Private certificates

If CalDAV reports an untrusted certificate, verify its fingerprint before choosing Trust for that connection.

To trust a private certificate authority across Norish, mount its certificate and set NODE_EXTRA_CA_CERTS.

services:
norish:
environment:
NODE_EXTRA_CA_CERTS: /certs/my-ca.pem
volumes:
- ./my-ca.pem:/certs/my-ca.pem:ro

Base path

Build a custom image to serve Norish under a path such as /norish.

docker build -f docker/Dockerfile \
--build-arg NEXT_PUBLIC_BASE_PATH=/norish \
--build-arg NORISH_VERSION_REPORT_JSON="$(node tooling/monorepo/scripts/print-package-versions.mjs)" \
-t norish:base-path .

Set AUTH_URL to the same public address and path. A mismatch prevents startup.

AUTH_URL=https://example.com/norish

Forward the path unchanged through your proxy and allow WebSocket upgrades.

location /norish {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

Auth rate limiting

VariableDescriptionDefault
AUTH_RATE_LIMIT_ENABLEDEnable auth endpoint rate limitingtrue
AUTH_RATE_LIMIT_WINDOWWindow length in seconds60
AUTH_RATE_LIMIT_MAXRequests allowed per window20
API_KEY_RATE_LIMIT_WINDOWAPI key window length in seconds3600
API_KEY_RATE_LIMIT_MAXRequests allowed per API key per window500

Warning

Turning this off removes brute-force protection from sign-in.

Registration

Registration closes after the first sign-in. To reopen it, turn on Allow new user registration under General in admin settings.

Logging

Set NEXT_PUBLIC_LOG_LEVEL to debug, info, warn or error. The default is info.

Uploads

VariableDescriptionDefault
UPLOADS_DIRUpload storage directory./.runtime/uploads (dev), /app/uploads (prod)
MAX_AVATAR_FILE_SIZEMax avatar upload size (bytes)5242880
MAX_IMAGE_FILE_SIZEMax image upload size (bytes)10485760
MAX_VIDEO_FILE_SIZEMax video upload size (bytes)104857600

Scheduler

Set SCHEDULER_CLEANUP_MONTHS to change the cleanup period. The default is three months.

Ingredient catalogue

VariableDescriptionDefault
INGREDIENT_CATALOGUE_URLCatalogue seed URL, fetched at startup and nightly. Empty disables fetchingThe Open Food Facts ingredients taxonomy
INGREDIENT_REVIEW_CONCURRENCYConcurrent AI ingredient reviews (1–50). Lower this for self-hosted models that struggle with parallel requests10

For a server without internet access, mirror ingredients.txt and point INGREDIENT_CATALOGUE_URL at that copy.

Languages

Choose languages under General in admin settings or set them in Compose.

VariableDescriptionDefault
DEFAULT_LOCALEInstance default localeen
ENABLED_LOCALESComma-separated list of enabled locales(all enabled)
docker-compose.yml (environment)
DEFAULT_LOCALE: en
ENABLED_LOCALES: en,nl,no

See the supported language codes.