---
title: "Bắt đầu nhanh"
description: "Triển khai với Cloudflare Workers, Docker hoặc systemd, hoặc giao prompt cho một AI agent thực hiện."
lang: "vi"
version: "1.84.0"
url: "https://docs.calends.date/vi/start/quick-start/"
markdown_url: "https://docs.calends.date/vi/start/quick-start.md"
section: "Bắt đầu"
llms_index: "https://docs.calends.date/llms.txt"
llms_full: "https://docs.calends.date/llms-full.txt"
agents_guide: "https://calends.date/AGENTS.md"
---

# Bắt đầu nhanh

> Triển khai với Cloudflare Workers, Docker hoặc systemd, hoặc giao prompt cho một AI agent thực hiện.

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

Chọn một phương thức triển khai và làm theo hướng dẫn này để triển khai Calends và đăng nhập lần đầu.

Calends chạy với cùng bộ tính năng trên Cloudflare Workers, trong Docker hoặc trực tiếp bằng systemd trên Linux. Bạn cũng có thể dán prompt bên dưới vào một AI agent có quyền chạy terminal để nó tự thực hiện.

### Cloudflare

**Triển khai một chạm**: dùng nút Deploy to Cloudflare trong README trên GitHub, hoặc mở
[deploy.workers.cloudflare.com](https://deploy.workers.cloudflare.com/?url=https://github.com/imetn/calends).
Sau đó, thêm một secret tên `SETUP_TOKEN` trong phần cài đặt của Worker — nếu thiếu nó bạn sẽ không thể đặt mật khẩu.

**Từ dòng lệnh**:

1. Clone kho mã và cài đặt các gói phụ thuộc:

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

2. Đăng nhập Cloudflare:

   ```bash
   npx wrangler login
   ```

3. Đặt token thiết lập. Dùng bất kỳ chuỗi ngẫu nhiên dài nào; bạn sẽ nhập chuỗi này một lần khi tạo mật khẩu:

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

4. Triển khai. Lệnh này sẽ build giao diện, tự động tạo cơ sở dữ liệu D1, triển khai Worker và chạy các bản migration cơ sở dữ liệu:

   ```bash
   npm run deploy
   ```

5. Mở `https://<your-worker>.workers.dev`, nhập token thiết lập và chọn mật khẩu của bạn.

Về nhắc nhở qua email, cron trigger và tên miền riêng, xem [Cloudflare Workers + D1](https://docs.calends.date/vi/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   # in ra token thiết lập dùng một lần ở lần chạy đầu
```

Mở `http://localhost:8787`, nhập token thiết lập từ nhật ký và chọn mật khẩu. Dữ liệu nằm trong volume `calends-data` dưới dạng SQLite.

> **CAUTION**: Khi đưa ra internet công cộng, hãy đặt sau một reverse proxy như Caddy, Nginx hoặc Traefik để dùng HTTPS (passkey yêu cầu HTTPS). Trên máy chủ từ xa, hãy giữ cổng chỉ lắng nghe trên loopback và dùng `ssh -L 8787:localhost:8787 user@server` cho lần đăng nhập đầu, hoặc cấu hình HTTPS trước khi gửi token thiết lập. Thông thường hãy để trống `TRUST_PROXY` và làm theo [quy tắc proxy](https://docs.calends.date/vi/self-host/custom-domain.md).

Image hỗ trợ `linux/amd64` và `linux/arm64` và cho phép kéo ẩn danh. Lựa chọn thay thế trên GHCR: `ghcr.io/imetn/calends:latest`. Với môi trường vận hành thực tế, nên ghim một phiên bản cụ thể như `xizozhe/calends:1.84.0`. Về Compose, nâng cấp, thư mục dữ liệu và tác vụ định kỳ, xem [Docker](https://docs.calends.date/vi/self-host/docker.md).

### Để AI agent thực hiện

Dán đoạn sau vào Claude Code, Codex, Cursor hoặc bất kỳ coding agent nào có quyền terminal:

```text
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).
```

## Cài đặt một dòng (Debian/Ubuntu)

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

Trình cài tự tải phiên bản Node riêng và khởi chạy Calends tại `127.0.0.1:8787`. Chạy lại đúng lệnh này để nâng cấp kèm sao lưu dữ liệu và tự hoàn tác nếu gặp lỗi hoặc bị ngắt. Script không cấu hình tên miền hay máy chủ web: hãy tự thiết lập reverse proxy và `SITE_URL`. Xem [cài đặt systemd](https://docs.calends.date/vi/self-host/docker.md#không-dùng-docker-systemd).

## Sau khi triển khai

1. Tại `/login`, nhập token thiết lập và chọn mật khẩu dài ít nhất 8 ký tự. Xem [Thiết lập lần đầu](https://docs.calends.date/vi/start/first-setup.md).
2. Trong **Cài đặt → Chung**, chọn tiền tệ cơ sở, múi giờ và ngôn ngữ.
3. Trong **Cài đặt → Bảo mật**, thêm một passkey để bạn có thể đăng nhập bằng Face ID, Touch ID hoặc mã thiết bị.
4. Thêm gói đăng ký đầu tiên: nhấn `N`, hoặc dán biên lai vào **Trợ lý AI**.
5. Để nhận nhắc nhở, thêm ít nhất một [kênh thông báo](https://docs.calends.date/vi/calendar/channels.md) tại **Kênh thông báo** trong Cài đặt.

> **NOTE**: Trang Tổng quan của ứng dụng nằm tại `/overview`, còn trang đăng nhập tại `/login`. Khi đã đăng nhập, mở `/` sẽ chuyển đến trang bắt đầu đã chọn trong Cài đặt (mặc định là Tổng quan). Truy cập các trang ứng dụng khác khi chưa đăng nhập sẽ chuyển tới `/login?next=...` và đưa bạn về đúng trang ban đầu sau khi đăng nhập. Khách chưa đăng nhập mở `/` sẽ tới `/public` nếu trang công khai đang bật, hoặc tới `/login` nếu đang tắt. Trang công khai mặc định tắt; xem [Trang công khai](https://docs.calends.date/vi/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 (Bắt đầu)
- [Giới thiệu](https://docs.calends.date/vi/start/introduction.md)
- [Bắt đầu nhanh](https://docs.calends.date/vi/start/quick-start.md) *(current)*
- [Thiết lập lần đầu](https://docs.calends.date/vi/start/first-setup.md)
- [Khám phá ứng dụng](https://docs.calends.date/vi/start/tour.md)
- [Phím tắt](https://docs.calends.date/vi/start/shortcuts.md)

### Reading Order
- Previous: [Giới thiệu](https://docs.calends.date/vi/start/introduction.md)
- Next: [Thiết lập lần đầu](https://docs.calends.date/vi/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/vi/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
