---
title: "快速開始"
description: "使用 Cloudflare Workers、Docker 或 systemd 部署，或交給 AI 代理協助完成。"
lang: "zh-TW"
version: "1.84.0"
url: "https://docs.calends.date/zh-tw/start/quick-start/"
markdown_url: "https://docs.calends.date/zh-tw/start/quick-start.md"
section: "開始使用"
llms_index: "https://docs.calends.date/llms.txt"
llms_full: "https://docs.calends.date/llms-full.txt"
agents_guide: "https://calends.date/AGENTS.md"
---

# 快速開始

> 使用 Cloudflare Workers、Docker 或 systemd 部署，或交給 AI 代理協助完成。

- Canonical page: https://docs.calends.date/zh-tw/start/quick-start/
- Markdown source: https://docs.calends.date/zh-tw/start/quick-start.md
- Calends version: v1.84.0

選擇適合自己的部署方式，依照本頁步驟完成部署與首次登入。

Calends 可以部署到 Cloudflare Workers、使用 Docker 執行，或在 Linux 上直接透過 systemd 運作，核心功能完全一致。你也可以把下方的提示詞交給可操作終端機的 AI 代理，讓它替你完成。

### Cloudflare

**一鍵部署**：點擊 GitHub 儲存庫 README 中的 Deploy to Cloudflare 按鈕，或直接開啟
[deploy.workers.cloudflare.com](https://deploy.workers.cloudflare.com/?url=https://github.com/imetn/calends)。
部署完成後，還需要在 Worker 的設定中新增一個名為 `SETUP_TOKEN` 的機密（Secret），否則將無法設定密碼。

**命令列部署**：

1. 複製儲存庫並安裝相依套件：

   ```bash
   git clone https://github.com/imetn/calends && cd calends
   npm ci
   ```

2. 登入 Cloudflare：

   ```bash
   npx wrangler login
   ```

3. 設定初始化權杖。請填入一串足夠長的隨機字串，首次設定密碼時會輸入一次：

   ```bash
   npx wrangler secret put SETUP_TOKEN
   ```

4. 部署。此步驟會建置前端、自動建立 D1 資料庫、部署 Worker 並執行資料庫遷移：

   ```bash
   npm run deploy
   ```

5. 開啟 `https://<你的 worker>.workers.dev`，輸入初始化權杖並設定密碼。

更多細節（電子郵件提醒、排程任務、自訂網域）請見 [Cloudflare Workers + D1](https://docs.calends.date/zh-tw/self-host/cloudflare.md)。

### Docker

```bash
docker run -d --name calends -p 127.0.0.1:8787:8787 -v calends-data:/data xizozhe/calends:latest
docker logs calends   # 首次啟動會印出一次性的初始化權杖
```

開啟 `http://localhost:8787`，輸入日誌中的初始化權杖並設定密碼。資料會以 SQLite 檔案儲存在 `calends-data` 資料卷中。

> **CAUTION**: 於公開網路使用時，請放置在 Caddy、Nginx、Traefik 等反向代理後方並啟用 HTTPS（Passkey 必須在 HTTPS 環境下運作）。在遠端伺服器上首次登入時，建議先維持埠號僅限本機存取，透過 `ssh -L 8787:localhost:8787 使用者@伺服器` 轉發連線，或先設定好 HTTPS 再傳送初始化權杖。`TRUST_PROXY` 通常留空即可，並請依照[代理要求](https://docs.calends.date/zh-tw/self-host/custom-domain.md)設定。

映像檔支援 `linux/amd64` 與 `linux/arm64`，可匿名拉取；GHCR 備援位址為 `ghcr.io/imetn/calends:latest`。正式環境建議固定版本號，例如 `xizozhe/calends:1.84.0`。Compose 設定、升級、資料目錄與排程任務請見 [Docker](https://docs.calends.date/zh-tw/self-host/docker.md)。

### 交給 AI 代理

將下面這段文字貼給 Claude Code、Codex、Cursor 等可操作終端機的 AI 代理：

```text
幫我部署 Calends（https://github.com/imetn/calends），一個可自託管的訂閱帳本。
1. 先問我要部署到 Cloudflare Workers（依帳號方案與配額）還是這台機器/伺服器上的 Docker。
2. Cloudflare：複製儲存庫，執行 npm ci，確認 `npx wrangler whoami` 正常（若未登入就執行 `npx wrangler login`），
   產生一組隨機的 SETUP_TOKEN 並用 `npx wrangler secret put SETUP_TOKEN` 設定，然後執行 `npm run deploy`。
   如果我要使用自訂網域，部署前先在 wrangler.jsonc 的 routes 中以 custom_domain 加入。
3. Docker：執行官方映像檔 xizozhe/calends，將一個命名資料卷掛載至 /data 並開放 8787 埠，
   再從容器日誌讀出初始化權杖；順便問我要不要用 Caddy 設定 HTTPS。
4. 最後把應用網址與初始化權杖告訴我，並提醒我綁定 Passkey，以及在「連接」頁（/connect）接入我的 AI 助手。
```

## 一行安裝（Debian/Ubuntu）

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

內建獨立的 Node 執行環境，啟動後預設監聽 `127.0.0.1:8787`。重複執行同一指令即可升級，會先自動備份，若過程失敗或中斷會自動復原舊版程式與資料。此腳本不負責設定網域與網頁伺服器，請自行配置反向代理與 `SITE_URL`。詳見 [systemd 安裝](https://docs.calends.date/zh-tw/self-host/docker.md#不用-dockersystemd)。

## 部署之後

1. 在 `/login` 輸入初始化權杖，設定至少 8 個字元的密碼。詳見[首次設定](https://docs.calends.date/zh-tw/start/first-setup.md)。
2. 在「設定 → 一般」中選好基準貨幣、時區與語言。
3. 在「設定 → 安全」中新增 Passkey，之後就能使用臉部辨識、指紋或裝置密碼登入。
4. 新增第一筆訂閱：按 `N`，或在「助手」中貼上一封收據讓它自動整理。
5. 如果想接收提醒，請在「設定」的「通知管道」中新增至少一個[管道](https://docs.calends.date/zh-tw/calendar/channels.md)。

> **NOTE**: 應用的概覽頁位於 `/overview`，登入頁位於 `/login`。登入後開啟 `/` 會自動跳轉至設定中的啟動頁（預設為概覽）。未登入時造訪其他應用頁面會跳轉至 `/login?next=...`，登入後再返回原頁面。未登入訪客開啟 `/` 時，若已啟用公開頁則跳轉至 `/public`，否則跳轉至 `/login`。公開頁預設為關閉，詳見[公開頁](https://docs.calends.date/zh-tw/sharing/public-page.md)。

---

## 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 (開始使用)
- [介紹](https://docs.calends.date/zh-tw/start/introduction.md)
- [快速開始](https://docs.calends.date/zh-tw/start/quick-start.md) *(current)*
- [首次設定](https://docs.calends.date/zh-tw/start/first-setup.md)
- [介面導覽](https://docs.calends.date/zh-tw/start/tour.md)
- [快捷鍵](https://docs.calends.date/zh-tw/start/shortcuts.md)

### Reading Order
- Previous: [介紹](https://docs.calends.date/zh-tw/start/introduction.md)
- Next: [首次設定](https://docs.calends.date/zh-tw/start/first-setup.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/zh-tw/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
