Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

docs: clarify Cloudflare password setup

yoma8efc21405a09
diff --git a/AGENTS.md b/AGENTS.md
index 28d3a6b5..fed78eaa 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -32,22 +32,7 @@ Release 标签必须精确指向 `main` 上经过验证的发布提交。除非
## Cloudflare 自动部署约束
-当用户要求“根据 GitHub 项目链接把本项目安装部署到 Cloudflare”时,应优先按 `docs/agent-deploy-cloudflare.md` 执行。
-
-推荐流程:
-
-```sh
-bun install
-EDGE_EVER_PASSWORD='<首次登录密码>' bun run deploy:setup
-bun run deploy:doctor
-bun run deploy
-```
-
-首次部署与验证成功后,应优先执行 `bun run deploy:builds:setup`,按 `docs/cloudflare-workers-builds.md` 将该 Worker 连接到 Fork 的 `main` 分支,并将 `.env.local` 中的实例配置写入 Cloudflare Workers Builds 的 Build Variables/Secrets。只有 Cloudflare GitHub App 的浏览器授权和 Build Token 选择无法由 API 自动完成;应由 Agent 尽可能代办,并在需要用户确认时给出文档中的精确路径。之后 GitHub Sync fork 触发 Cloudflare 自动构建、执行 D1 migration 并发布;不要为此新增 GitHub Actions Worker 部署流程。
-
-如果用户没有提供首次登录密码,应只询问这一个必要信息,或在用户同意后生成随机密码。Cloudflare 授权、账号、D1/R2 资源、Worker 名称、自定义域名等私有配置必须来自用户环境、Cloudflare MCP/插件、Wrangler 登录态或 `.env.local`,严禁硬编码到仓库文件。
-
-部署脚本必须通过 `scripts/run-wrangler.mjs` 读取 `.env.local` 并生成临时 Wrangler 配置。不要直接修改 `wrangler.toml` 来写入个人 `database_id`、bucket 名称、Worker 名称或 route。
+当用户要求根据 GitHub 项目链接将本项目安装部署到 Cloudflare 时,必须先完整阅读并严格按照 `docs/agent-deploy-cloudflare.md` 执行。该文档是此部署流程的唯一操作规范;不要在本文件重复维护部署命令、密码配置或 Workers Builds 步骤。
## 本地启动约束
diff --git a/docs/agent-deploy-cloudflare.md b/docs/agent-deploy-cloudflare.md
index 4241ccac..da250953 100644
--- a/docs/agent-deploy-cloudflare.md
+++ b/docs/agent-deploy-cloudflare.md
@@ -57,9 +57,10 @@ Chinese version:
4. Prepare deployment resources and `.env.local`.
- If the user gave a first login password, run:
+ `EDGE_EVER_PASSWORD` must contain the **plaintext password that the user will type when first logging in to EdgeEver**. It is not an encrypted password or a password hash. If the user gave this first login password, run:
```sh
+ # Plaintext first-login password; do not put a hash here.
EDGE_EVER_PASSWORD='<first-login-password>' bun run deploy:setup
```
@@ -70,7 +71,13 @@ Chinese version:
- copy `.env.local.example` to `.env.local` when needed
- reuse or create the D1 database
- create the R2 buckets when needed
- - save `EDGE_EVER_PASSWORD` as `EDGE_EVER_AUTH_PASSWORD` in the private `.env.local`
+ - save the plaintext `EDGE_EVER_PASSWORD` as `EDGE_EVER_AUTH_PASSWORD` in the private, git-ignored `.env.local`; deployment uploads it as a Cloudflare Worker Secret, not a regular plaintext build variable
+
+ Password variable meanings:
+
+ - `EDGE_EVER_PASSWORD`: plaintext first-login password passed temporarily to `deploy:setup`
+ - `EDGE_EVER_AUTH_PASSWORD`: the same plaintext login password stored only in private `.env.local` and uploaded as a Cloudflare Worker Secret
+ - `EDGE_EVER_AUTH_PASSWORD_HASH`: a PBKDF2 password hash supported only for legacy or advanced configurations; never pass this hash through `EDGE_EVER_PASSWORD`
5. Check the deployment inputs.