---
title: "Upgrading"
description: "Back up, update Cloudflare, Docker or systemd, check the result, and prepare a compatible rollback."
lang: "en"
version: "1.84.0"
url: "https://docs.calends.date/en/self-host/upgrade/"
markdown_url: "https://docs.calends.date/en/self-host/upgrade.md"
section: "Self-hosting"
llms_index: "https://docs.calends.date/llms.txt"
llms_full: "https://docs.calends.date/llms-full.txt"
agents_guide: "https://calends.date/AGENTS.md"
---

# Upgrading

> Back up, update Cloudflare, Docker or systemd, check the result, and prepare a compatible rollback.

- Canonical page: https://docs.calends.date/en/self-host/upgrade/
- Markdown source: https://docs.calends.date/en/self-host/upgrade.md
- Calends version: v1.84.0

Keep your existing database, volumes, domain and environment settings. Current deployment examples use **1.84.0**; check the target release notes before upgrading across versions.

1. Export a full JSON backup and record the current version, data volume and environment settings. Keep a database/volume copy for rollback too.
2. Update using the same deployment method below. Source builds require Node.js 24.
3. Refresh existing tabs and check subscriptions, Wallet, Calendar and Reports. Test an enabled notification channel; verify MCP and ICS if you use them.
4. Keep the old backup until those checks pass. A successful image pull or build alone does not establish a working upgrade.

Settings → General shows the running version and latest stable release. Automatic checks run at most hourly, including when the page returns to the foreground; opening Settings refreshes results older than five minutes. Tabs in the same browser share the cache. A dot marks a newer release, manual checks bypass the interval, and nothing upgrades automatically. Click the available-version badge to open upgrade instructions for your installation, a copyable command for the one-line installer, and a release-note excerpt with links to the full notes. Older cached checks show links until the next successful check.

## Compatibility to check

- Separate settlement is optional; existing subscriptions retain their original mode. After enabling it, check the tracking start, arrears and bill/payment date differences.
- Public layouts and metric cards are optional. Check both editor preview and the signed-out public page after changes.
- Pause history, receipt periods and historical plan fields must remain intact. Old receipt formats can be converted on read; downgrading code does not undo that conversion.
- Since the Node-based self-hosting runtime, `INTERNAL_PORT` is removed. Keep `PORT` and the data volume. Numeric `TRUST_PROXY` values use automatic detection; review [proxy settings](https://docs.calends.date/en/self-host/custom-domain.md).
- Database migrations run during deployment/startup. Version 1.63.0 adds `0009_files.sql`, creating the files table. Cloudflare uploads also need the optional `FILES` R2 binding; Docker stores files under `/data/files`. Never assume rollback compatibility from the version number alone.

## One-line install and upgrade (Debian/Ubuntu)

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

The same command installs or upgrades with a private Node runtime, backs up existing data and preserves settings. Failed or interrupted upgrades restore the previous program and data. It starts the service on `127.0.0.1:8787` and does not configure a domain or web server; manage your reverse proxy and `SITE_URL` yourself. See [Docker and systemd](https://docs.calends.date/en/self-host/docker.md).

## Cloudflare

If you deployed from the command line:

```bash
cd calends
git pull
npm ci
npm run deploy
```

`npm run deploy` applies new migrations to the remote database after deploying. Even if that step were skipped, the Worker fills in missing migrations on its first request.

If you used one-click deploy, the repository lives in your own GitHub account. Sync it with upstream `imetn/calends` (Sync fork on GitHub, or merge manually) and Cloudflare rebuilds and deploys from your repository.

If you've edited `wrangler.jsonc` (custom domain, email binding), keep those changes when you pull.

## Docker

```bash
docker pull xizozhe/calends:latest
docker stop calends
docker rm calends
docker run -d --name calends --restart unless-stopped \
  -p 127.0.0.1:8787:8787 -v calends-data:/data \
  xizozhe/calends:latest
```

With the prebuilt-image `compose.yaml` from the [Docker guide](https://docs.calends.date/en/self-host/docker.md), run these commands in its deployment directory:

```bash
docker compose pull
docker compose up -d
```

The `docker run` above is a minimal example. Reapply your original `SITE_URL`, `TRUST_PROXY`, `SETUP_TOKEN`, ports and other environment variables, and use the same data volume name.

Data lives in the volume, so removing the container loses nothing. The new container applies migrations before starting.

To pin a version and upgrade on your own schedule, use a version tag instead of `latest`, such as `xizozhe/calends:1.84.0`.

GHCR is an anonymous-pull alternative: replace `xizozhe/calends` with `ghcr.io/imetn/calends`, keeping the same tag in both the pull and run commands. Both registries provide `latest`, `1.84.0` and `1.84`; pin an exact release such as `1.84.0` for controlled upgrades.

### Source builds with Compose

For the repository’s `docker/docker-compose.yml`, rebuild from the updated source instead of pulling a prebuilt image. From the repository root:

```bash
git pull
cd docker && docker compose up -d --build
docker compose logs calends
```

Keep the Compose project name `calends` and its existing `calends_calends-data` volume. This is separate from `calends-data` in the prebuilt-image examples; use the volume belonging to your deployment and do not run `docker compose down -v`.

## Rolling back

Switching back to old code does not undo database migrations. Check that the old version can read the current schema before rolling back; a successful start alone does not prove compatibility.

If you need to restore data, keep a copy of the current database and [restore the pre-upgrade backup](https://docs.calends.date/en/data/backup.md#restore) on a compatible version. Do not give your only migrated database to an older version whose compatibility is unknown.

---

## Related Pages & Global AI Discovery

To explore broader context beyond this page, fetch any of the Markdown or plain-text resources below directly:

### Same Section (Self-hosting)
- [Cloudflare Workers + D1](https://docs.calends.date/en/self-host/cloudflare.md)
- [Docker](https://docs.calends.date/en/self-host/docker.md)
- [Configuration](https://docs.calends.date/en/self-host/config.md)
- [Custom domain and HTTPS](https://docs.calends.date/en/self-host/custom-domain.md)
- [Upgrading](https://docs.calends.date/en/self-host/upgrade.md) *(current)*
- [Local development](https://docs.calends.date/en/self-host/development.md)
- [Translating](https://docs.calends.date/en/self-host/translate.md)

### Reading Order
- Previous: [Custom domain and HTTPS](https://docs.calends.date/en/self-host/custom-domain.md)
- Next: [Local development](https://docs.calends.date/en/self-host/development.md)

### Global Calends Resources
- Read-only Docs MCP Server (zero auth Streamable HTTP): https://docs.calends.date/mcp
- Complete Docs Index (all 37 topics with `.md` links): https://docs.calends.date/llms.txt
- Complete English Docs Bundle (single file): https://docs.calends.date/llms-full.txt
- Complete Simplified Chinese Docs Bundle: https://docs.calends.date/llms-zh.txt
- Docs AI Agent Guide: https://docs.calends.date/AGENTS.md
- Product Website Overview (Markdown): https://calends.date/en/index.md
- Product LLMs Index & Full Reference: https://calends.date/llms.txt | https://calends.date/llms-full.txt
- Deployment & MCP Agent Guide (AGENTS.md): https://calends.date/AGENTS.md
- FAQ & Calends vs Wallos Comparison (Markdown): https://calends.date/en/faq.md | https://calends.date/en/compare.md
- Complete Changelog (Markdown): https://calends.date/en/releases.md
