Look up environment variables, secrets, bindings and app defaults when deploying or troubleshooting configuration.
Most of Calends is configured in the app and stored in the database. These are the only deployment-level settings.
Environment variables and bindings
| Name | Kind | Applies to | Details |
|---|---|---|---|
SETUP_TOKEN |
secret / env | all | Required to set the first password on a fresh deployment. On Cloudflare, set it with wrangler secret put SETUP_TOKEN; on Docker it’s generated if unset. Not needed once the password is set. |
SITE_URL |
var / env | all | Your site address, e.g. https://calends.example.com, used in reminder messages and calendar feed links. If unset: requests use the address being visited; scheduled jobs use the address recorded the last time you opened the app. Passkey RP ID and origin also use this URL; set the public HTTPS URL behind a reverse proxy. |
OLD_HOSTS |
Variable | Cloudflare | Comma-separated old hostnames. With SITE_URL, redirects old page URLs with HTTP 301, leaving API, MCP and ICS endpoints available. Not forwarded by the Docker entrypoint. |
EMAIL |
binding | Cloudflare | The Cloudflare Email Sending send_email binding, needed for email reminders. |
MAIL_FROM |
var | Cloudflare | Sender address; must be allowed by the EMAIL binding. Email works once both are set. |
MAIL_FROM_NAME |
var | Cloudflare | Sender name, optional. |
TRUST_PROXY |
env | self-hosted | Usually leave unset. off ignores X-Forwarded-For; a comma-separated IP/CIDR list adds trusted proxies. Custom domain and HTTPS. Not used on Cloudflare. |
DATA_DIR |
env | self-hosted | Data directory: /data in Docker, /var/lib/calends in the systemd unit. |
HOST |
env | self-hosted | Listening address; default 0.0.0.0. For systemd behind a proxy use 127.0.0.1; for Docker keep the default and restrict the published port. |
PORT |
env | self-hosted | Listening port, 8787 by default. |
OWNER_PASSCODE |
secret | legacy | Early versions kept the passcode directly in a secret. After the first successful sign-in it’s converted to a hash and can be deleted. Not needed for new deployments. |
CALENDS_TELEMETRY, DO_NOT_TRACK |
var / env | all | CALENDS_TELEMETRY=0 or DO_NOT_TRACK=1 turns off anonymous usage statistics and locks the setting off. The statistics contain only a random install ID, version, runtime, interface language and daily usage counts — never subscriptions, amounts or ledger data. |
CALENDS_RUNTIME |
env | self-hosted | Runtime label (node or installer, default node), used by the upgrade panel and telemetry. |
CALENDS_LOCAL |
env | source deploy | External personal config directory (replaces local/ for personal wrangler.jsonc and public/ overrides). |
DEV_BYPASS_AUTH |
.dev.vars |
local dev | 1 skips sign-in and telemetry. Local use only — never set it in production. |
On Cloudflare, variables go in vars in wrangler.jsonc or in the Worker’s settings in the dashboard, and secrets via wrangler secret put. On Docker, everything is an environment variable.
Settings in the app
These aren’t environment variables; change them in the app:
| Setting | Where | Default |
|---|---|---|
| Base currency | Settings → General | USD |
| Time zone | Settings → General | UTC |
| Language | Settings → General | System default |
| Remind me | Settings → Reminders | 3 days |
| Send at | Settings → Reminders | 09:00 |
| Monthly preview on the 1st | Settings → Reminders | On |
| Public page | Settings → Sharing & access | Off |
| AI access (MCP) | Settings → Sharing & access | On |
| Max signed-in devices | Settings → Security | 10 |
| Anonymous usage stats | Settings → Anonymous usage stats | On |
Self-hosted build and memory
NODE_OPTIONS defaults to --max-old-space-size=192 --disable-warning=ExperimentalWarning in the image. Keep the warning option when changing the heap limit. BASE_PATH must match the Docker build argument and runtime value (for example /calends); prebuilt images and release tarballs use the root path.
Routes
| Path | What |
|---|---|
/ |
Redirects to the configured start page when signed in |
/overview |
Overview |
/list |
Subscriptions |
/calendar |
Calendar |
/report |
Reports |
/wallet |
Wallet |
/family |
Shared plans and people |
/behalf |
Paid for others |
/assistant |
Built-in AI assistant |
/connect |
AI access and MCP connection page |
/settings |
Settings |
/settings/public |
Public page layout editor |
/login |
Sign-in and first-time password setup |
/public |
Read-only public page, accessible only when enabled in Settings |
/api/* |
API for the app and public page |
/mcp |
MCP service endpoint; browser visits redirect to /connect |
/cal/<token>.ics |
Calendar feed |
/healthz |
Self-hosted health check (checks SQLite directly without entering the Worker) |
Signed-out visits to app pages redirect to /login?next=.... Signing in returns you to the requested page. For example, opening /wallet redirects to /login?next=%2Fwallet, then returns to /wallet after sign-in.
Signed-out visitors opening / are redirected to /public if the public page is enabled, or to /login otherwise.