AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
docs: refresh Cloudflare manual deployment steps
tianma-ifd09540040ca7
diff --git a/docs/cloudflare-workers-builds.md b/docs/cloudflare-workers-builds.mdindex ef495864..f19b6edf 100644--- a/docs/cloudflare-workers-builds.md+++ b/docs/cloudflare-workers-builds.md@@ -8,11 +8,11 @@ Authorization:1. Approve the **Cloudflare Workers & Pages** GitHub App for the deployment repository.2. If the Agent integration needs a Cloudflare API token, use a User API Token limited to the target account.-3. Configure the deployment API token in Cloudflare under **Worker -> Settings -> Builds -> API token**.+3. Configure the deployment API token in Cloudflare under **Worker -> Settings -> Build -> API token**. The automatically generated token may lack D1 permissions; confirm it has D1 read and edit permissions for the target account before deploying.Configure `EDGE_EVER_AUTH_PASSWORD` under the Worker's **Settings -> Variables and Secrets** as a runtime Secret; do not copy the password into Builds variables. `deploy:cloudflare-builds` reuses that Secret and verifies its presence after deployment.-Keep the tracked `wrangler.toml` unchanged. Ordinary deployments use D1 `edgeever`, R2 `edgeever-resources`, and username `admin`. Optional non-secret instance settings such as `EDGE_EVER_AUTH_USERNAME`, `EDGE_EVER_WORKER_NAME`, `EDGE_EVER_D1_DATABASE_NAME`, `EDGE_EVER_R2_BUCKET_NAME`, and custom routing belong under **Settings -> Builds -> Variables and secrets**. Workers Builds variables are available to the build command, not to the running Worker; the deploy command uses them to generate a temporary Wrangler configuration. Passwords and credentials remain runtime Secrets.+Keep the tracked `wrangler.toml` unchanged. Ordinary deployments use D1 `edgeever`, R2 `edgeever-resources`, and username `admin`. Optional non-secret instance settings such as `EDGE_EVER_AUTH_USERNAME`, `EDGE_EVER_WORKER_NAME`, `EDGE_EVER_D1_DATABASE_NAME`, `EDGE_EVER_R2_BUCKET_NAME`, and custom routing belong under **Settings -> Build -> Build variables and secrets**. Workers Builds variables are available to the build command, not to the running Worker; the deploy command uses them to generate a temporary Wrangler configuration. Passwords and credentials remain runtime Secrets.Backward compatibility is automatic: without explicit R2 or username Builds variables, an upgrade inspects the active production Worker versions and preserves their existing `RESOURCES` bucket and administrator username. A brand-new Worker uses the standard defaults.diff --git a/docs/cloudflare-workers-builds.zh-CN.md b/docs/cloudflare-workers-builds.zh-CN.mdindex 5789632f..4229f615 100644--- a/docs/cloudflare-workers-builds.zh-CN.md+++ b/docs/cloudflare-workers-builds.zh-CN.md@@ -8,11 +8,11 @@1. 为部署仓库授权 **Cloudflare Workers & Pages** GitHub App。2. 如果 Agent 集成需要 Cloudflare API Token,使用限制到目标账号的 User API Token。-3. 部署 API Token 在 Cloudflare **Worker -> Settings -> Builds -> API token** 中配置。+3. 部署 API Token 在 Cloudflare **Worker -> Settings -> Build -> API token** 中配置。默认自动生成的 token 可能没有 D1 权限;部署前应确认其具备目标账户的 D1 读取与编辑权限。`EDGE_EVER_AUTH_PASSWORD` 应配置在 Worker 的 **Settings -> Variables and Secrets** 中,作为运行时 Secret;不要把密码复制到 Builds 的构建变量。`deploy:cloudflare-builds` 会复用该 Secret,并在部署后验证它是否存在。-受版本控制的 `wrangler.toml` 必须保持不变。普通部署使用 D1 `edgeever`、R2 `edgeever-resources` 和用户名 `admin`。`EDGE_EVER_AUTH_USERNAME`、`EDGE_EVER_WORKER_NAME`、`EDGE_EVER_D1_DATABASE_NAME`、`EDGE_EVER_R2_BUCKET_NAME` 与自定义路由等可选非敏感实例参数,应放在 **Settings -> Builds -> Variables and secrets**。Workers Builds 变量只对构建命令可见,不会直接成为 Worker 运行时变量;部署命令会用它们生成临时 Wrangler 配置。密码及其他凭据始终属于运行时 Secret。+受版本控制的 `wrangler.toml` 必须保持不变。普通部署使用 D1 `edgeever`、R2 `edgeever-resources` 和用户名 `admin`。`EDGE_EVER_AUTH_USERNAME`、`EDGE_EVER_WORKER_NAME`、`EDGE_EVER_D1_DATABASE_NAME`、`EDGE_EVER_R2_BUCKET_NAME` 与自定义路由等可选非敏感实例参数,应放在 **Settings -> Build -> Build variables and secrets**。Workers Builds 变量只对构建命令可见,不会直接成为 Worker 运行时变量;部署命令会用它们生成临时 Wrangler 配置。密码及其他凭据始终属于运行时 Secret。旧版兼容会自动完成:未显式设置 R2 或用户名 Builds 变量时,升级会检查正在承载生产流量的 Worker 版本,并保留其已有的 `RESOURCES` 存储桶和管理员用户名;全新 Worker 才使用标准默认值。diff --git a/docs/deploy-cloudflare-button.md b/docs/deploy-cloudflare-button.mdindex a0e2bd27..5a2910c5 100644--- a/docs/deploy-cloudflare-button.md+++ b/docs/deploy-cloudflare-button.md@@ -24,24 +24,26 @@ This document provides a detailed step-by-step guide for deploying EdgeEver onli### Step 2: Create Storage & Database Resources in Cloudflare-Log into your [Cloudflare Dashboard](https://dash.cloudflare.com/):+Log into your [Cloudflare Dashboard](https://dash.cloudflare.com/). Cloudflare may reorganize its sidebar; use the official [D1 getting started guide](https://developers.cloudflare.com/d1/get-started/) and [R2 getting started guide](https://developers.cloudflare.com/r2/get-started/) if an entry has moved:1. **Create a D1 Database**:- - Navigate to **Workers & Pages** -> **D1**, then click **Create database**.+ - Under **Storage & databases**, open **D1 SQL Database** and click **Create database**.- Database name: exactly `edgeever`, then click **Create**.2. **Create an R2 Bucket** (for note attachments & images):- - Navigate to **Workers & Pages** -> **R2**, then click **Create bucket**.+ - Under **Storage & databases**, open **R2** -> **Overview**. If R2 is not yet enabled, complete the subscription flow shown there; then click **Create bucket**.- Bucket name: exactly `edgeever-resources`, then click **Create bucket**.---### Step 3: Import the Project-1. In Cloudflare Dashboard, navigate to **Workers & Pages** -> **Overview**, click **Create application** -> **Pages** / **Workers** (Import Git Repository).-2. Click **Connect to Git**, authorize Cloudflare, and select your Forked `edgeever` repository.+1. In the Cloudflare Dashboard, open **Workers & Pages**, click **Create application**, then click **Get started** next to **Import a repository**. This creates a Worker connected to your Git repository; see [Cloudflare's Workers Builds instructions](https://developers.cloudflare.com/workers/ci-cd/builds/#connect-a-new-worker) if the entry moves.+2. Follow the prompts to connect your GitHub account, authorize access to your Fork, and select the Forked `edgeever` repository.3. Project settings:- - **Production branch**: `main`- - **Root directory**: Leave blank or default `/`+ - **Git branch** (or **Production branch**): `main`+ - **Root directory**: Leave blank to use the repository root+ - **Deploy command**: Keep the default `npx wrangler deploy`+ - **API token**: The automatically generated token may lack D1 permissions. Select or create a User API Token scoped to the target account with D1 read and edit permissions; if permissions are insufficient, correct them based on the build log and retry.The repository's deployment command creates the `DB` and `RESOURCES` bindings from the standard resource names. Do not edit `wrangler.toml` or add duplicate bindings in the Dashboard.@@ -49,9 +51,9 @@ Existing deployments created from older instructions do not need to rename or mi----### Step 4: Set the Administrator Password+### Step 4: Create the Project and Set the Administrator Password-Under the Worker's **Settings** -> **Variables and Secrets**, add this Secret:+Click **Save and Deploy** to create the Worker project. On a new deployment, the first build fails its post-deployment verification because the authentication Secret has not been configured yet. Do not use the generated site URL at this point. In the new Worker's **Settings** -> **Variables and Secrets**, click **Add**, add this runtime Secret, and click **Deploy** to save it:| Type | Name | Value | Purpose || :--- | :--- | :--- | :--- |@@ -59,9 +61,11 @@ Under the Worker's **Settings** -> **Variables and Secrets**, add this Secret:`EDGE_EVER_AUTH_PASSWORD` is the variable name; the Secret value is the administrator login password you choose. It is a Worker runtime Secret, not a Workers Builds variable, so do not duplicate the password in build variables.+Return to the Worker's build history and retry the failed build. Cloudflare applies the current build settings when retrying. Continue only after the build, deployment, and live health check succeed. If the first build succeeded, still confirm that this Secret is present.+----### Step 5: Start the Build+### Step 5: Check the Build ResultKeep the default deploy command filled in by Cloudflare:@@ -69,7 +73,7 @@ Keep the default deploy command filled in by Cloudflare:Deploy command: npx wrangler deploy```-Click **Save and Deploy** to trigger the initial build. The repository's Wrangler compatibility entrypoint detects Workers Builds and routes the default command through EdgeEver's complete build, database migration, deployment, and live verification pipeline. You do not need to copy a custom command, and the D1 placeholder in `wrangler.toml` cannot be submitted to Cloudflare.+The repository's Wrangler compatibility entrypoint detects Workers Builds and routes the default command through EdgeEver's complete build, database migration, deployment, and live verification pipeline. You do not need to copy a custom command, and the D1 placeholder in `wrangler.toml` cannot be submitted to Cloudflare.The deployment pipeline automatically looks up the D1 UUID by the `edgeever` database name. Keep the tracked `wrangler.toml` unchanged; deployment rejects instance-specific values committed there. The Workers Builds API token must have D1 read/edit permission.@@ -109,7 +113,7 @@ You can also pick `stable` / `edge` when manually running the workflow.## Advanced Configuration: Instance Settings-Ordinary deployments do not need these settings. To customize an instance, add non-secret values under **Settings -> Builds -> Variables and secrets** instead of changing repository files:+Ordinary deployments do not need these settings. To customize an instance, add non-secret values under the Worker's **Settings -> Build -> Build variables and secrets** instead of changing repository files:| Build variable | Purpose || :--- | :--- |diff --git a/docs/deploy-cloudflare-button.zh-CN.md b/docs/deploy-cloudflare-button.zh-CN.mdindex 0d3a86bb..54942f26 100644--- a/docs/deploy-cloudflare-button.zh-CN.md+++ b/docs/deploy-cloudflare-button.zh-CN.md@@ -24,24 +24,26 @@### 步骤 2:在 Cloudflare 创建存储与数据库资源-登录 [Cloudflare Dashboard](https://dash.cloudflare.com/) 控制台:+登录 [Cloudflare Dashboard](https://dash.cloudflare.com/) 控制台。Cloudflare 会调整侧栏分组;找不到入口时,可查看官方的 [D1 创建说明](https://developers.cloudflare.com/d1/get-started/)和 [R2 入门说明](https://developers.cloudflare.com/r2/get-started/):1. **创建 D1 数据库**:- - 导航至 **Workers & Pages** -> **D1**,点击 **Create database**。+ - 在 **Storage & databases** 中打开 **D1 SQL Database**,点击 **Create database**。- 数据库名称严格填入:`edgeever`,点击 **Create**。2. **创建 R2 存储桶**(用于存储笔记附件与图片):- - 导航至 **Workers & Pages** -> **R2**,点击 **Create bucket**。+ - 在 **Storage & databases** 中打开 **R2** -> **Overview**。如尚未开通 R2,先按页面提示完成订阅;然后点击 **Create bucket**。- 存储桶名称严格填入:`edgeever-resources`,点击 **Create bucket**。---### 步骤 3:导入项目-1. 在 Cloudflare 控制台中,进入 **Workers & Pages** -> **Overview**,点击 **Create application** -> **Pages** / **Workers** (选择导入 Git 仓库)。-2. 选择 **Connect to Git**,授权并选中您刚才 Fork 的 `edgeever` 仓库。+1. 在 Cloudflare 控制台中打开 **Workers & Pages**,点击 **Create application**,再在 **Import a repository** 旁点击 **Get started**。这里要创建连接 Git 仓库的 Worker 项目;入口变化时可对照 [Cloudflare Workers Builds 官方步骤](https://developers.cloudflare.com/workers/ci-cd/builds/#connect-a-new-worker)。+2. 按提示连接 GitHub 账户,授权 Cloudflare 访问该 Fork,并选中您刚才 Fork 的 `edgeever` 仓库。3. 在项目设置中:- - **Production branch**:选择 `main`- - **Root directory**:保持留空或默认 `/`+ - **Git branch**(或 **Production branch**):选择 `main`+ - **Root directory**:保持留空,使用仓库根目录+ - **Deploy command**:保留默认的 `npx wrangler deploy`+ - **API token**:自动生成的 token 可能没有 D1 权限。选择或创建限定到目标账户、具备 D1 读取与编辑权限的 User API Token;权限不足时按构建日志调整后重试。仓库中的部署命令会根据标准资源名称生成 `DB` 与 `RESOURCES` binding。不要修改 `wrangler.toml`,也不要在控制台中重复添加 binding。@@ -49,9 +51,9 @@----### 步骤 4:设置管理员密码+### 步骤 4:创建项目并设置管理员密码-在 Worker 的 **Settings** -> **Variables and Secrets** 中添加以下 Secret:+点击 **Save and Deploy** 创建 Worker 项目。全新部署的首次构建会因尚未配置认证 Secret 而在部署后校验失败;此时先不要使用生成的站点地址。在新建 Worker 的 **Settings** -> **Variables and Secrets** 中点击 **Add**,添加以下运行时 Secret,然后点击 **Deploy** 保存:| 类型 (Type) | 名称 (Name) | 值 (Value) | 说明 || :--- | :--- | :--- | :--- |@@ -59,9 +61,11 @@`EDGE_EVER_AUTH_PASSWORD` 是变量名,Secret 的值才是您自行设置的管理员登录密码。它属于 Worker 运行时 Secret,不是 Workers Builds 构建变量;无需、也不应把密码重复填写到构建变量中。+返回 Worker 的构建记录,重试失败的构建。Cloudflare 会在重试时使用当前的构建设置;确认构建、部署和线上健康检查都成功后再继续。若首次构建已成功,也应确认此 Secret 已存在。+----### 步骤 5:启动构建+### 步骤 5:检查构建结果保留 Cloudflare 自动填写的默认部署命令:@@ -69,7 +73,7 @@Deploy command: npx wrangler deploy```-点击 **Save and Deploy** 启动首次构建部署。仓库提供的 Wrangler 兼容入口会识别 Workers Builds,并自动将默认命令接入 EdgeEver 的完整构建、数据库迁移、部署及线上验证流水线。因此无需复制自定义命令,也不会把 `wrangler.toml` 中的 D1 占位符提交给 Cloudflare。+仓库提供的 Wrangler 兼容入口会识别 Workers Builds,并自动将默认命令接入 EdgeEver 的完整构建、数据库迁移、部署及线上验证流水线。因此无需复制自定义命令,也不会把 `wrangler.toml` 中的 D1 占位符提交给 Cloudflare。部署流水线会根据 `edgeever` 数据库名称自动查询 D1 UUID。受版本控制的 `wrangler.toml` 必须保持不变;若把实例专属配置提交到该文件,部署会直接拒绝。Workers Builds API Token 必须具有 D1 读取和编辑权限。@@ -109,7 +113,7 @@ EDGE_EVER_UPDATE_CHANNEL=edge## 高级配置:实例参数-普通部署不需要配置以下参数。如需自定义实例,请在 **Settings -> Builds -> Variables and secrets** 中添加非敏感构建变量,不要修改仓库文件:+普通部署不需要配置以下参数。如需自定义实例,请在 Worker 的 **Settings -> Build -> Build variables and secrets** 中添加非敏感构建变量,不要修改仓库文件:| 构建变量 | 用途 || :--- | :--- |