Quick start

Deploy with Cloudflare Workers, Docker or systemd, or hand a prompt to an AI agent.

On this page

Choose a deployment method and follow this guide to deploy Calends and sign in for the first time.

Calends runs with the same features on Cloudflare Workers, in Docker or directly with systemd on Linux. You can also paste the prompt below into an AI agent with terminal access and let it do the work.

One-click deploy: use the Deploy to Cloudflare button in the GitHub README, or open deploy.workers.cloudflare.com. Afterwards, add a secret named SETUP_TOKEN in the Worker’s settings — without it you can’t set a password.

From the command line:

  1. Clone the repository and install dependencies:

    Terminal window
    git clone https://github.com/imetn/calends && cd calends
    npm ci
  2. Sign in to Cloudflare:

    Terminal window
    npx wrangler login
  3. Set the setup token. Use any long random string; you’ll type it once when setting your password:

    Terminal window
    npx wrangler secret put SETUP_TOKEN
  4. Deploy. This builds the front end, creates the D1 database automatically, deploys the Worker and runs the database migrations:

    Terminal window
    npm run deploy
  5. Open https://<your-worker>.workers.dev, enter the setup token and choose your password.

For email reminders, the cron trigger and custom domains, see Cloudflare Workers + D1.

Terminal window
docker run -d --name calends -p 127.0.0.1:8787:8787 -v calends-data:/data xizozhe/calends:latest
docker logs calends # prints the one-time setup token on first run

Open http://localhost:8787, enter the setup token from the logs and choose your password. Data lives in the calends-data volume as SQLite.

The image supports linux/amd64 and linux/arm64 and allows anonymous pulls. GHCR alternative: ghcr.io/imetn/calends:latest. For production, pin a version such as xizozhe/calends:1.84.0. For Compose, upgrades, the data directory and scheduled jobs, see Docker.

Paste this into Claude Code, Codex, Cursor or any coding agent with terminal access:

Deploy Calends (https://github.com/imetn/calends), a self-hosted subscription ledger, for me.
1. Ask me whether to deploy to Cloudflare Workers (subject to account quotas) or Docker on this machine/server.
2. Cloudflare: clone the repo, run `npm ci`, make sure `npx wrangler whoami` works (run `npx wrangler login` if not),
generate a random SETUP_TOKEN and set it with `npx wrangler secret put SETUP_TOKEN`, then `npm run deploy`.
If I want a custom domain, add it under "routes" in wrangler.jsonc as a custom_domain before deploying.
3. Docker: run the official image xizozhe/calends with a named volume for /data and port 8787,
then read the setup token from the container logs. Offer to put it behind HTTPS with Caddy.
4. Finally give me the app URL and the setup token, and remind me to add a passkey and connect my AI assistant
on the AI access page (/connect).

One-line install (Debian/Ubuntu)

Terminal window
curl -fsSL https://calends.date/install.sh | sudo bash

Installs its own Node and starts Calends on 127.0.0.1:8787. Run the same command to upgrade with a data backup and rollback on failure or interruption. It does not configure domains or web servers: set up your reverse proxy and SITE_URL yourself. See systemd installation.

After deploying

  1. At /login, enter the setup token and choose a password of at least 8 characters. See First-time setup.
  2. Under Settings → General, pick your base currency, time zone and language.
  3. Under Settings → Security, add a passkey so you can sign in with Face ID, Touch ID or your device passcode.
  4. Add your first subscription: press N, or paste a receipt into the Assistant.
  5. To get reminders, add at least one channel under Notification channels in Settings.