<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Rubo Wang’s Website</title>
        <link>https://www.rubo.wang//</link>
        <description>A website for sharing my study and think.</description>
        <lastBuildDate>Thu, 07 May 2026 12:02:30 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en-US</language>
        <copyright>All rights reserved 2026, Rubo Wang</copyright>
        <item>
            <title><![CDATA[Openclaw 在 Mac mini 上的安装、启动、使用、完全卸载与清理]]></title>
            <link>https://www.rubo.wang//blog/openclaw</link>
            <guid>https://www.rubo.wang//blog/openclaw</guid>
            <pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[在自己的Mac mini搭建专属的Openclaw]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-329207bfcaee80ecb370dd361fe93354"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee802ebef4ed47004a72c6" data-id="329207bfcaee802ebef4ed47004a72c6"><span><div id="329207bfcaee802ebef4ed47004a72c6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee802ebef4ed47004a72c6" title="环境说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">环境说明</span></span></h3><ul class="notion-list notion-list-disc notion-block-329207bfcaee8083a203ebc4f64d7474"><li><b>设备</b>：搭载 Apple Silicon M4 芯片的 Mac，32GB 统一内存</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee8017a45ce0b3b9474cce"><li><b>本地大模型</b>：Qwen 3.5 27B（通过 Ollama 运行，零 API 费用）</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee80b09a61fca746811082"><li><b>云端备用模型</b>：DeepSeek（或其他兼容 OpenAI 格式的 API）</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee80b7a2f4c9fae5fd786f"><li><b>模型路由中间件</b>：LiteLLM（统一管理本地和云端模型）</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee804095dcfdb0e2cf9ca3"><li><b>控制入口</b>：飞书（长连接 WebSocket 模式）</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee804d819de795ea18a64c"><li><b>进程守护</b>：PM2（替代 macOS 原生 LaunchAgent，防止两者冲突）</li></ul><hr class="notion-hr notion-block-329207bfcaee80f09043d36b8ee52d47"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee80ecad2af539b97f01c4" data-id="329207bfcaee80ecad2af539b97f01c4"><span><div id="329207bfcaee80ecad2af539b97f01c4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80ecad2af539b97f01c4" title="第一阶段：准备基础环境"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第一阶段：准备基础环境</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80fa86e2c172dbd03c8b" data-id="329207bfcaee80fa86e2c172dbd03c8b"><span><div id="329207bfcaee80fa86e2c172dbd03c8b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80fa86e2c172dbd03c8b" title="1.1 安装 Homebrew"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.1 安装 Homebrew</span></span></h4><div class="notion-text notion-block-329207bfcaee80058085da2e77032389">打开 Mac 的<b>终端（Terminal.app）</b>，运行：</div><blockquote class="notion-quote notion-block-329207bfcaee80fe9531e78cc2d03f7a"><div><b>注意（M4 芯片必做）</b>：安装结束后，终端底部会打印两行以 <code class="notion-inline-code">eval</code> 开头的命令。请将这两行复制出来，粘贴到终端里运行，否则后续所有 <code class="notion-inline-code">brew</code> 命令会报找不到命令的错误。</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80708695d615f4fcea93" data-id="329207bfcaee80708695d615f4fcea93"><span><div id="329207bfcaee80708695d615f4fcea93" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80708695d615f4fcea93" title="1.2 安装 Node.js 和 Python"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.2 安装 Node.js 和 Python</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee8016b30fc16559d16860" data-id="329207bfcaee8016b30fc16559d16860"><span><div id="329207bfcaee8016b30fc16559d16860" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8016b30fc16559d16860" title="1.3 解决 nvm 与 Homebrew 的 Node.js 版本冲突"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.3 解决 nvm 与 Homebrew 的 Node.js 版本冲突</span></span></h4><div class="notion-text notion-block-329207bfcaee80ac8ba8c153dbf67098">如果 Mac 上已安装 <code class="notion-inline-code">nvm</code>（Node 版本管理器），Homebrew 安装的 Node 和 nvm 管理的旧版 Node 会产生冲突，导致 OpenClaw 安装时报 <code class="notion-inline-code">requires Node.js 20+</code> 错误。</div><div class="notion-text notion-block-329207bfcaee8089be80c533fdbdaf0d">使用 nvm 安装并固定 Node 20 LTS 版本：</div><div class="notion-text notion-block-329207bfcaee80648f4ce4e7d8e4acbf">运行以下命令确认版本输出为 <code class="notion-inline-code">v20.x.x</code> 后再继续：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee801a99bccdd7f1af8911" data-id="329207bfcaee801a99bccdd7f1af8911"><span><div id="329207bfcaee801a99bccdd7f1af8911" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee801a99bccdd7f1af8911" title="1.4 安装 PM2"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.4 安装 PM2</span></span></h4><hr class="notion-hr notion-block-329207bfcaee8015958ffd16fab14f4a"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee80f58748d647cd4a816c" data-id="329207bfcaee80f58748d647cd4a816c"><span><div id="329207bfcaee80f58748d647cd4a816c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80f58748d647cd4a816c" title="第二阶段：安装本地大模型（Qwen 3.5 27B）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第二阶段：安装本地大模型（Qwen 3.5 27B）</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee807f8b82f48d002c9d1f" data-id="329207bfcaee807f8b82f48d002c9d1f"><span><div id="329207bfcaee807f8b82f48d002c9d1f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee807f8b82f48d002c9d1f" title="2.1 安装 Ollama"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.1 安装 Ollama</span></span></h4><div class="notion-text notion-block-329207bfcaee805292b5c990a9de5c29">前往 <a class="notion-link" href="https://ollama.com/" target="_blank" rel="noopener noreferrer">ollama.com</a> 下载并安装 Mac 客户端。安装完毕后，打开 <b>Ollama.app</b>，确认屏幕右上角菜单栏出现羊驼图标。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80a8bad8ce327971c300" data-id="329207bfcaee80a8bad8ce327971c300"><span><div id="329207bfcaee80a8bad8ce327971c300" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80a8bad8ce327971c300" title="2.2 拉取 Qwen 3.5 27B 修正版"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.2 拉取 Qwen 3.5 27B 修正版</span></span></h4><blockquote class="notion-quote notion-block-329207bfcaee8099b1a5f5345fbec5cb"><div><b>注意</b>：请勿直接运行官方 <code class="notion-inline-code">ollama pull qwen3.5</code>。官方版本存在工具调用（Tool Calling）缺陷，会导致 OpenClaw 无法正确识别 AI 的指令。请使用以下社区修正版本：</div></blockquote><div class="notion-text notion-block-329207bfcaee80f298fbe77f4a8b0656">拉取完毕后，测试是否可以正常对话：</div><div class="notion-text notion-block-329207bfcaee80c69f97c6913b8c419e">收到正常回复后按 <code class="notion-inline-code">Ctrl+D</code> 退出。Ollama 会继续在后台运行，监听本地 <code class="notion-inline-code">http://localhost:11434</code>。</div><hr class="notion-hr notion-block-329207bfcaee807484ccff7af6e7b7e5"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee8029a8cae130fc3ff449" data-id="329207bfcaee8029a8cae130fc3ff449"><span><div id="329207bfcaee8029a8cae130fc3ff449" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8029a8cae130fc3ff449" title="第三阶段：安装并配置 LiteLLM"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第三阶段：安装并配置 LiteLLM</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80479c15dfb89745b65c" data-id="329207bfcaee80479c15dfb89745b65c"><span><div id="329207bfcaee80479c15dfb89745b65c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80479c15dfb89745b65c" title="3.1 安装 LiteLLM"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.1 安装 LiteLLM</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee8078b6d5ef41caa82a35" data-id="329207bfcaee8078b6d5ef41caa82a35"><span><div id="329207bfcaee8078b6d5ef41caa82a35" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8078b6d5ef41caa82a35" title="3.2 创建 LiteLLM 配置文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.2 创建 LiteLLM 配置文件</span></span></h4><div class="notion-text notion-block-329207bfcaee80958689dbd0eb03efc9">按 <code class="notion-inline-code">i</code> 进入插入模式，粘贴以下内容（将 DeepSeek 的 API Key 替换为真实密钥；如暂无云端 Key，可删除 <code class="notion-inline-code">cloud-fallback</code> 节点）：</div><div class="notion-text notion-block-329207bfcaee8023b8a8df8765a6a388">按 <code class="notion-inline-code">Esc</code> 退出插入模式，输入 <code class="notion-inline-code">:wq</code> 保存并退出。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee8074970ed580bd21330d" data-id="329207bfcaee8074970ed580bd21330d"><span><div id="329207bfcaee8074970ed580bd21330d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8074970ed580bd21330d" title="3.3 找出 LiteLLM 的绝对路径"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.3 找出 LiteLLM 的绝对路径</span></span></h4><div class="notion-text notion-block-329207bfcaee8087ad59cfe9a170e90b">PM2 作为后台服务不会继承终端的环境变量，必须使用绝对路径：</div><div class="notion-text notion-block-329207bfcaee807ba324fbe75984d26c">记下输出的路径（例如 <code class="notion-inline-code">/opt/homebrew/bin/litellm</code>）。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80bf8188e64e81bc5e16" data-id="329207bfcaee80bf8188e64e81bc5e16"><span><div id="329207bfcaee80bf8188e64e81bc5e16" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80bf8188e64e81bc5e16" title="3.4 创建 LiteLLM 启动脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.4 创建 LiteLLM 启动脚本</span></span></h4><div class="notion-text notion-block-329207bfcaee800ca9aac143996a999b">按 <code class="notion-inline-code">i</code> 进入插入模式，粘贴以下内容（<b>将路径替换为上一步找到的真实路径</b>）：</div><div class="notion-text notion-block-329207bfcaee80e1b331efea0fd0eb4a">按 <code class="notion-inline-code">Esc</code>，输入 <code class="notion-inline-code">:wq</code> 保存退出，然后赋予执行权限：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80f980b2e275794c5b79" data-id="329207bfcaee80f980b2e275794c5b79"><span><div id="329207bfcaee80f980b2e275794c5b79" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80f980b2e275794c5b79" title="3.5 测试 LiteLLM 是否正常启动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.5 测试 LiteLLM 是否正常启动</span></span></h4><div class="notion-text notion-block-329207bfcaee808d9e42e8487abcb90e">确认输出中包含 <code class="notion-inline-code">LiteLLM: Proxy initialized</code> 和 <code class="notion-inline-code">Uvicorn running on http://0.0.0.0:4000</code>，按 <code class="notion-inline-code">Ctrl+C</code> 退出。</div><hr class="notion-hr notion-block-329207bfcaee8034a22fe7fc6f30ac7b"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee800e81dfec17a4e056c0" data-id="329207bfcaee800e81dfec17a4e056c0"><span><div id="329207bfcaee800e81dfec17a4e056c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee800e81dfec17a4e056c0" title="第四阶段：安装并配置 OpenClaw"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第四阶段：安装并配置 OpenClaw</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80d3b638d535a1fc74a1" data-id="329207bfcaee80d3b638d535a1fc74a1"><span><div id="329207bfcaee80d3b638d535a1fc74a1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80d3b638d535a1fc74a1" title="4.1 全局安装 OpenClaw"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.1 全局安装 OpenClaw</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee806c918deabecd9c4d3c" data-id="329207bfcaee806c918deabecd9c4d3c"><span><div id="329207bfcaee806c918deabecd9c4d3c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee806c918deabecd9c4d3c" title="4.2 授予 Mac 系统权限"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.2 授予 Mac 系统权限</span></span></h4><div class="notion-text notion-block-329207bfcaee80608137c31cb2e6ae15">点击屏幕左上角苹果图标 -&gt; <b>系统设置</b> -&gt; <b>隐私与安全性</b>，依次找到以下三项，为&quot;<b>终端（Terminal）</b>&quot;打上勾：</div><ul class="notion-list notion-list-disc notion-block-329207bfcaee806e9cfcf6c6b3e5030b"><li><b>辅助功能（Accessibility）</b></li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee8049857dc61cc2db957a"><li><b>屏幕录制（Screen Recording）</b></li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee80d4bc02e64b56e46bf8"><li><b>完全磁盘访问权限（Full Disk Access）</b></li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80d3858fede9020490fe" data-id="329207bfcaee80d3858fede9020490fe"><span><div id="329207bfcaee80d3858fede9020490fe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80d3858fede9020490fe" title="4.3 创建 OpenClaw 配置文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.3 创建 OpenClaw 配置文件</span></span></h4><div class="notion-text notion-block-329207bfcaee8057a6c5eaafc5b5509c">按 <code class="notion-inline-code">i</code> 进入插入模式，粘贴以下内容（将飞书的 <code class="notion-inline-code">appId</code> 和 <code class="notion-inline-code">appSecret</code> 替换为真实值，获取方式见第五阶段）：</div><div class="notion-text notion-block-329207bfcaee80b3b5c6f856cf211ee9">按 <code class="notion-inline-code">Esc</code>，输入 <code class="notion-inline-code">:wq</code> 保存退出。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80948e86e98ae1450f26" data-id="329207bfcaee80948e86e98ae1450f26"><span><div id="329207bfcaee80948e86e98ae1450f26" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80948e86e98ae1450f26" title="4.4 验证配置文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.4 验证配置文件</span></span></h4><div class="notion-text notion-block-329207bfcaee80229c86d3fb85b8800a">确认输出中没有红色 ERROR 报错后继续。</div><hr class="notion-hr notion-block-329207bfcaee805e9593ec20761decfd"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee8035b2f5e56048a1a4b8" data-id="329207bfcaee8035b2f5e56048a1a4b8"><span><div id="329207bfcaee8035b2f5e56048a1a4b8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8035b2f5e56048a1a4b8" title="第五阶段：对接飞书（Feishu）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第五阶段：对接飞书（Feishu）</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80f198c5f9cfd319d942" data-id="329207bfcaee80f198c5f9cfd319d942"><span><div id="329207bfcaee80f198c5f9cfd319d942" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80f198c5f9cfd319d942" title="5.1 创建飞书自建应用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.1 创建飞书自建应用</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-329207bfcaee8092a721ef597a72adf5" style="list-style-type:decimal"><li>浏览器打开 <a class="notion-link" href="https://open.feishu.cn/" target="_blank" rel="noopener noreferrer">飞书开放平台</a>，使用飞书账号登录。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-329207bfcaee80b49acfe91f72878f4a" style="list-style-type:decimal"><li>点击<b>创建企业自建应用</b>，填写应用名称（例如&quot;Mac 管家&quot;）和图标。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80b6b96fc161af5c75e2" data-id="329207bfcaee80b6b96fc161af5c75e2"><span><div id="329207bfcaee80b6b96fc161af5c75e2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80b6b96fc161af5c75e2" title="5.2 获取 App ID 和 App Secret"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.2 获取 App ID 和 App Secret</span></span></h4><div class="notion-text notion-block-329207bfcaee8094ab23f06877cf6770">在左侧菜单点击<b>凭证与基础信息</b>，复制 <code class="notion-inline-code">App ID</code> 和 <code class="notion-inline-code">App Secret</code>，填入 <code class="notion-inline-code">openclaw.json</code> 的对应字段。</div><div class="notion-text notion-block-329207bfcaee8075888bc3996f9bba5e">填完后，重新打开配置文件更新：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee805cae51f870f4f96358" data-id="329207bfcaee805cae51f870f4f96358"><span><div id="329207bfcaee805cae51f870f4f96358" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee805cae51f870f4f96358" title="5.3 添加机器人能力"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.3 添加机器人能力</span></span></h4><div class="notion-text notion-block-329207bfcaee80c6a2aedc7a78734587">在左侧菜单点击<b>添加应用能力</b>，选择并添加<b>机器人（Bot）</b>。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80f69e3ccbf7173079cc" data-id="329207bfcaee80f69e3ccbf7173079cc"><span><div id="329207bfcaee80f69e3ccbf7173079cc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80f69e3ccbf7173079cc" title="5.4 配置事件订阅"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.4 配置事件订阅</span></span></h4><div class="notion-text notion-block-329207bfcaee80f7800de0bd7bd070f4">在左侧菜单点击<b>事件与回调</b>：</div><ol start="1" class="notion-list notion-list-numbered notion-block-329207bfcaee808499b1cce9665e8958" style="list-style-type:decimal"><li><b>订阅方式</b>选择：<b>通过长连接接收事件（WebSocket）</b></li><ol class="notion-list notion-list-numbered notion-block-329207bfcaee808499b1cce9665e8958" style="list-style-type:lower-alpha"><blockquote class="notion-quote notion-block-329207bfcaee80809b54d47399facb06"><div>此步骤为机器人能否收到消息的关键，选错会导致 400 连接错误，机器人完全无响应。</div></blockquote></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-329207bfcaee8035a881d89ff7f7c583" style="list-style-type:decimal"><li>点击<b>添加事件</b>，搜索并添加 <code class="notion-inline-code">im.message.receive_v1</code>（接收消息）。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee8054b134d9d4863866f5" data-id="329207bfcaee8054b134d9d4863866f5"><span><div id="329207bfcaee8054b134d9d4863866f5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8054b134d9d4863866f5" title="5.5 配置权限"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.5 配置权限</span></span></h4><div class="notion-text notion-block-329207bfcaee80a18b0fff3e86f5787f">在左侧菜单点击<b>权限管理</b>，搜索并开通以下权限：</div><ol start="1" class="notion-list notion-list-numbered notion-block-329207bfcaee80d3901ee654295bf8f4" style="list-style-type:decimal"><li>在左侧菜单点击<b>权限管理</b>。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-329207bfcaee80d0a70ef83cbdf13813" style="list-style-type:decimal"><li>点击页面右上角的<b>批量导入</b>（Batch Import）按钮。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-329207bfcaee802c8a97e0dfb6b0e2de" style="list-style-type:decimal"><li>将以下 JSON 完整粘贴进去，点击<b>批量申请开通</b>：</li></ol><table class="notion-simple-table notion-block-329207bfcaee8058b6dbd0232e3e4093"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-329207bfcaee8062ab13df77ca10ba88"><td class="" style="width:120px"><div class="notion-simple-table-cell">权限名称</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">用途</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80268130d34f82abb4be"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">im:message</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取与发送消息（核心权限）</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8054a9f7f52f22aa37d9"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">im:message:send_as_bot</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">以机器人身份发送消息</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee805a8c23c28231a95d33"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">im:message:readonly</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取消息历史</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80f39947ff752c012a03"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">im:message.p2p_msg:readonly</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取私聊消息</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80c9b82fdc38dd2ad47c"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">im:message.group_at_msg:readonly</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取群聊中被 @ 的消息</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80c8a8f7f684dde7a4a9"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">im:chat.members:bot_access</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">机器人加入群聊</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee801b8729c152ec44579f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">im:resource</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取消息中的图片/文件资源</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80ef976af4b73893c08c"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">contact:user.employee_id:readonly</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取用户工号（用于身份识别）</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80b6ab79d8456f037755"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">contact:user.email:readonly</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取用户邮箱</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee803bad3af4664b875212"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">cardkit:card:read</code> / <code class="notion-inline-code">write</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">读取和发送飞书消息卡片</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80a9b3ddc9bde144443c"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">application:bot.menu:write</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">配置机器人菜单</div></td></tr></tbody></table><blockquote class="notion-quote notion-block-329207bfcaee804ab861fe8588e1fac3"><div>如果还希望 OpenClaw 能操作飞书文档、多维表格、云盘，还需要额外开通以下权限（可选）：</div><ul class="notion-list notion-list-disc notion-block-329207bfcaee80d1a11fdcbc50a53f83"><li><code class="notion-inline-code">docs:doc</code> — 读写飞书文档</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee80d3a20ed23eb874d193"><li><code class="notion-inline-code">sheets:spreadsheet</code> — 读写飞书电子表格</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee80c4b27aeb3b1c87004a"><li><code class="notion-inline-code">bitable:app</code> — 读写多维表格</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee80e4990ace2e907f15a4"><li><code class="notion-inline-code">drive:drive</code> — 读取云盘文件</li></ul><ul class="notion-list notion-list-disc notion-block-329207bfcaee80ba8ae0e46cdde79609"><li><code class="notion-inline-code">calendar:calendar</code> — 读写日历</li></ul></blockquote><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80b5bad6eead1bd0cc11" data-id="329207bfcaee80b5bad6eead1bd0cc11"><span><div id="329207bfcaee80b5bad6eead1bd0cc11" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80b5bad6eead1bd0cc11" title="5.6 发布版本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.6 发布版本</span></span></h4><div class="notion-text notion-block-329207bfcaee802985cad01d6482839e">在左侧菜单点击<b>版本管理与发布</b> -&gt; <b>创建版本</b>，填写版本号（如 <code class="notion-inline-code">1.0.0</code>），点击<b>发布</b>。</div><div class="notion-text notion-block-329207bfcaee80d09ec4e1bae6628c2f">如需管理员审核，前往飞书客户端<b>工作台 -&gt; 应用管理</b>通过审核后方可生效。</div><blockquote class="notion-quote notion-block-329207bfcaee8077bf92dc1eb12d8909"><div><b>注意</b>：每次修改权限、事件订阅或应用能力后，均需重新发布一个新版本才能生效。</div></blockquote><hr class="notion-hr notion-block-329207bfcaee8017af0fe880977b602e"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee80dd9f82ee8db8592087" data-id="329207bfcaee80dd9f82ee8db8592087"><span><div id="329207bfcaee80dd9f82ee8db8592087" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80dd9f82ee8db8592087" title="第六阶段：用 PM2 托管所有服务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第六阶段：用 PM2 托管所有服务</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80de88f6fc55914a5802" data-id="329207bfcaee80de88f6fc55914a5802"><span><div id="329207bfcaee80de88f6fc55914a5802" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80de88f6fc55914a5802" title="6.1 创建 OpenClaw 启动脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6.1 创建 OpenClaw 启动脚本</span></span></h4><div class="notion-text notion-block-329207bfcaee80e8a1a1c60c796e2bbd">找出 OpenClaw 的绝对路径：</div><div class="notion-text notion-block-329207bfcaee80b6bd06cf9a2647fcf0">创建启动脚本：</div><div class="notion-text notion-block-329207bfcaee8027982fe741000536c0">按 <code class="notion-inline-code">i</code> 进入插入模式，粘贴以下内容（<b>将路径替换为实际路径</b>）：</div><div class="notion-text notion-block-329207bfcaee8069864fdb7bb7f061c2">按 <code class="notion-inline-code">Esc</code>，输入 <code class="notion-inline-code">:wq</code> 保存退出，赋予权限：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee8035a527ec6d9a33e3d5" data-id="329207bfcaee8035a527ec6d9a33e3d5"><span><div id="329207bfcaee8035a527ec6d9a33e3d5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8035a527ec6d9a33e3d5" title="6.2 使用 PM2 启动所有服务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6.2 使用 PM2 启动所有服务</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80d5b852dd7f84a22db7" data-id="329207bfcaee80d5b852dd7f84a22db7"><span><div id="329207bfcaee80d5b852dd7f84a22db7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80d5b852dd7f84a22db7" title="6.3 配置开机自启动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6.3 配置开机自启动</span></span></h4><blockquote class="notion-quote notion-block-329207bfcaee80b7abf1da4493c44194"><div><b>注意</b>：该命令会在终端中打印一行以 <code class="notion-inline-code">sudo env PATH=...</code> 开头的新命令。请将该命令完整复制后，粘贴回终端运行，输入 Mac 开机密码确认授权。</div></blockquote><div class="notion-text notion-block-329207bfcaee80fb8aecccc62bbcb5a6">然后保存当前进程列表：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee8022a2b3f9643bcf7e19" data-id="329207bfcaee8022a2b3f9643bcf7e19"><span><div id="329207bfcaee8022a2b3f9643bcf7e19" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8022a2b3f9643bcf7e19" title="6.4 验证运行状态"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6.4 验证运行状态</span></span></h4><div class="notion-text notion-block-329207bfcaee802d8e44f58de12d35b1">确认 <code class="notion-inline-code">litellm</code> 和 <code class="notion-inline-code">openclaw</code> 均显示为绿色的 <code class="notion-inline-code">online</code>。</div><hr class="notion-hr notion-block-329207bfcaee8020b300ff00328c2d33"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee803aaba7e227c613b245" data-id="329207bfcaee803aaba7e227c613b245"><span><div id="329207bfcaee803aaba7e227c613b245" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee803aaba7e227c613b245" title="第七阶段：飞书使用与模型切换"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第七阶段：飞书使用与模型切换</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee8079bcd2ec04a826b374" data-id="329207bfcaee8079bcd2ec04a826b374"><span><div id="329207bfcaee8079bcd2ec04a826b374" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee8079bcd2ec04a826b374" title="日常使用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">日常使用</span></span></h4><div class="notion-text notion-block-329207bfcaee807bbe9cc8a8322b9d0d">打开飞书，搜索并打开创建的机器人，发送任意消息。机器人会使用本地 M4 Mac 上的 Qwen 27B 进行回复，数据不经过任何外部服务器。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee800a9eb8e86153ac5634" data-id="329207bfcaee800a9eb8e86153ac5634"><span><div id="329207bfcaee800a9eb8e86153ac5634" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee800a9eb8e86153ac5634" title="飞书内快速切换模型"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">飞书内快速切换模型</span></span></h4><table class="notion-simple-table notion-block-329207bfcaee8008a07bc148a2a8267e"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-329207bfcaee80d693b8c3fb8ec7c2d8"><td class="" style="width:120px"><div class="notion-simple-table-cell">飞书指令</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">效果</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80efa6dcde1a333164c4"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">/model</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">查看当前使用的模型</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8052bb59d7efda020090"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">/model local-qwen27b</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">切换到本地 Qwen 模型</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80e38ba8cea440a4c530"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">/model deepseek-chat</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">切换到云端 DeepSeek 模型</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee803ab949fb7bd049700a"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">/status</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">查看网关运行状态</div></td></tr></tbody></table><hr class="notion-hr notion-block-329207bfcaee8067b3bbd31d29b853eb"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee80bf8f0eead518522569" data-id="329207bfcaee80bf8f0eead518522569"><span><div id="329207bfcaee80bf8f0eead518522569" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80bf8f0eead518522569" title="附录一：日常维护命令速查"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">附录一：日常维护命令速查</span></span></h3><table class="notion-simple-table notion-block-329207bfcaee80c490b4f24fc7499817"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-329207bfcaee8077b0ffe463a9581a82"><td class="" style="width:120px"><div class="notion-simple-table-cell">操作</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">命令</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8061af8ccbf3c6ec37f1"><td class="" style="width:120px"><div class="notion-simple-table-cell">查看所有服务状态</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 status</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80a4a54bd88e78514b11"><td class="" style="width:120px"><div class="notion-simple-table-cell">查看 OpenClaw 实时日志</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 logs openclaw</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80d6b5ded1b142c508ee"><td class="" style="width:120px"><div class="notion-simple-table-cell">查看 LiteLLM 实时日志</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 logs litellm</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee800d8070f410372fe598"><td class="" style="width:120px"><div class="notion-simple-table-cell">重启 OpenClaw</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 restart openclaw</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80e4a7f9ccadda10a562"><td class="" style="width:120px"><div class="notion-simple-table-cell">重启 LiteLLM</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 restart litellm</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80328941cbe404ed627e"><td class="" style="width:120px"><div class="notion-simple-table-cell">临时停止所有服务</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 stop all</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8068a1f1c8283575fd2e"><td class="" style="width:120px"><div class="notion-simple-table-cell">取消开机自启</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 unstartup</code></div></td></tr></tbody></table><hr class="notion-hr notion-block-329207bfcaee80219469dc13f9a5d149"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee80b69488e559ada4bfbe" data-id="329207bfcaee80b69488e559ada4bfbe"><span><div id="329207bfcaee80b69488e559ada4bfbe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80b69488e559ada4bfbe" title="附录二：关闭与卸载步骤"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">附录二：关闭与卸载步骤</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee807390f0cc49d735dbd6" data-id="329207bfcaee807390f0cc49d735dbd6"><span><div id="329207bfcaee807390f0cc49d735dbd6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee807390f0cc49d735dbd6" title="临时停止服务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">临时停止服务</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee805a9b9ed58979add259" data-id="329207bfcaee805a9b9ed58979add259"><span><div id="329207bfcaee805a9b9ed58979add259" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee805a9b9ed58979add259" title="取消开机自启"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">取消开机自启</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-329207bfcaee80178edcf1927bf72fad" data-id="329207bfcaee80178edcf1927bf72fad"><span><div id="329207bfcaee80178edcf1927bf72fad" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80178edcf1927bf72fad" title="完全卸载"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">完全卸载</span></span></h4><div class="notion-text notion-block-329207bfcaee8079a530f989d598179e">按照以下顺序执行，确保彻底清理：</div><div class="notion-text notion-block-329207bfcaee8018b719d4bc4a1a6910">清除系统权限：进入<b>系统设置 -&gt; 隐私与安全性</b>，在&quot;辅助功能&quot;、&quot;屏幕录制&quot;、&quot;完全磁盘访问权限&quot;列表中，选中并删除&quot;终端&quot;的授权。</div><hr class="notion-hr notion-block-329207bfcaee80b68631c1d4f1581b36"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-329207bfcaee80008f94ec10dcc9a142" data-id="329207bfcaee80008f94ec10dcc9a142"><span><div id="329207bfcaee80008f94ec10dcc9a142" class="notion-header-anchor"></div><a class="notion-hash-link" href="#329207bfcaee80008f94ec10dcc9a142" title="附录三：常见报错速查表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">附录三：常见报错速查表</span></span></h3><table class="notion-simple-table notion-block-329207bfcaee8022ac2fc12dc4d1c818"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-329207bfcaee8001a48dfe180fe94e5c"><td class="" style="width:120px"><div class="notion-simple-table-cell">报错信息</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">原因</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">解决方案</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee802caebef1c94e6117d1"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">requires Node.js 20+</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">nvm 锁定了旧版本</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">运行 <code class="notion-inline-code">nvm install 20 &amp;&amp; nvm alias default 20</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee800896a9d9b9cf26cbe8"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Unrecognized key: &quot;provider&quot;</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">配置文件格式为旧版</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将根节点改为 <code class="notion-inline-code">models.providers</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee804792f5e1b26b6d1afa"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">models.providers.litellm.models: expected array</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">缺少 <code class="notion-inline-code">models</code> 数组</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">在 <code class="notion-inline-code">litellm</code> 配置块中添加 <code class="notion-inline-code">models: [...]</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80c38e9cc3a0e79a4f48"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Gateway start blocked: set gateway.mode=local</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">未指定网关模式</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">运行 <code class="notion-inline-code">openclaw config set gateway.mode local</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee809cad5ff06530194c12"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Cannot destructure property &#x27;tenant_access_token&#x27;</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">App ID/Secret 错误或应用未发布</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">核对密钥，并在飞书后台重新发布版本</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8079ac9af536b2191982"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Request failed with status code 400 (ws)</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">飞书未开启长连接订阅</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">在飞书开发者后台将订阅方式改为&quot;长连接&quot;并重新发布</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee803d8af1e9adaeac3ef4"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Restarted LaunchAgent</code> 无限循环</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">PM2 与 macOS LaunchAgent 冲突</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">运行 <code class="notion-inline-code">launchctl unload ~/Library/LaunchAgents/ai.openclaw.gateway.plist</code></div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8039a117e25c8b334de6"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">PM2 [ERROR] File not found</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">PM2 将命令字符串当文件名</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">用绝对路径启动脚本代替内联命令</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee807d898bdd6e5ea6f096"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">pm2 status: errored</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Python 环境路径不匹配</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">用 <code class="notion-inline-code">which litellm</code> 找绝对路径，并写入启动脚本</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee80d8a378d7182e57da6d"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">/bin/bash: gateway: No such file or directory</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">PM2 无法识别子命令参数</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将 <code class="notion-inline-code">openclaw gateway run</code> 写入 Shell 脚本，由 PM2 执行脚本</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8093b03adc5ab661ec7b"><td class="" style="width:120px"><div class="notion-simple-table-cell">飞书点开机器人没有输入框</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">事件未订阅或版本未发布</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">添加 <code class="notion-inline-code">im.message.receive_v1</code> 事件后重新发布版本</div></td></tr><tr class="notion-simple-table-row notion-block-329207bfcaee8025a178f8537120ceba"><td class="" style="width:120px"><div class="notion-simple-table-cell">发消息机器人不回复</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">dmPolicy</code> 限制或权限未开通</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">配置文件中设置 <code class="notion-inline-code">&quot;dmPolicy&quot;: &quot;open&quot;</code> 和 <code class="notion-inline-code">&quot;allowFrom&quot;: [&quot;*&quot;]</code></div></td></tr></tbody></table></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[在 Mac mini 上搭建私有云 Nextcloud（Docker + OrbStack 完整指南）]]></title>
            <link>https://www.rubo.wang//blog/nextcloud</link>
            <guid>https://www.rubo.wang//blog/nextcloud</guid>
            <pubDate>Mon, 02 Mar 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[把闲置 Mac mini 变成自托管私有云]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-317207bfcaee80faaebced4da81e92ed"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-blank notion-block-317207bfcaee80ad98c6cbe69eaedf05"> </div><blockquote class="notion-quote notion-block-317207bfcaee80f2a1e1fdf6f6a6b7cc"><div>本文面向想把闲置 Mac mini 变成自托管私有云的用户。</div><div class="notion-text notion-block-317207bfcaee800d9c2ad398e3963efb">方案特点：容器化部署稳定不崩溃、支持本地大硬盘目录挂载、可接入
Cloudflare Tunnel 实现外网访问、支持 iPhone 照片自动备份。</div></blockquote><hr class="notion-hr notion-block-317207bfcaee8043bfccc439fc09f503"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80f8a8a0febdac1b633a" data-id="317207bfcaee80f8a8a0febdac1b633a"><span><div id="317207bfcaee80f8a8a0febdac1b633a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80f8a8a0febdac1b633a" title="目录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">目录</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-317207bfcaee80b083a8c4d479b9748c" style="list-style-type:decimal"><li>方案说明</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-317207bfcaee80a5aec4d2013cddc86e" style="list-style-type:decimal"><li>安装 Docker 运行环境（OrbStack）</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-317207bfcaee80a18d95c38cc368f75b" style="list-style-type:decimal"><li>准备目录与端口规划</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-317207bfcaee80408378c861440ed76b" style="list-style-type:decimal"><li>启动 Nextcloud 容器</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-317207bfcaee80dba253c83bcf72441c" style="list-style-type:decimal"><li>首次安装与初始化</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-317207bfcaee80029a02d9e938d81dae" style="list-style-type:decimal"><li>配置受信任域名</li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-317207bfcaee803e959cd2654aa4b8ee" style="list-style-type:decimal"><li>挂载本地目录（External Storage）</li></ol><ol start="8" class="notion-list notion-list-numbered notion-block-317207bfcaee80dd84f6d4c854a31e81" style="list-style-type:decimal"><li>配置 Cloudflare Tunnel 外网访问</li></ol><ol start="9" class="notion-list notion-list-numbered notion-block-317207bfcaee8092978bde1ccdd1f43e" style="list-style-type:decimal"><li>修复 iOS 客户端授权无反应</li></ol><ol start="10" class="notion-list notion-list-numbered notion-block-317207bfcaee80a8be14ce33a8a22ce3" style="list-style-type:decimal"><li>iPhone 照片自动备份设置</li></ol><ol start="11" class="notion-list notion-list-numbered notion-block-317207bfcaee801e8158cdf6e696866d" style="list-style-type:decimal"><li>开机自启与无人值守</li></ol><ol start="12" class="notion-list notion-list-numbered notion-block-317207bfcaee8078a84fcd40171c3e5e" style="list-style-type:decimal"><li>常见错误排查</li></ol><hr class="notion-hr notion-block-317207bfcaee808b862fe3a750223232"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80938a65e58f82b3f879" data-id="317207bfcaee80938a65e58f82b3f879"><span><div id="317207bfcaee80938a65e58f82b3f879" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80938a65e58f82b3f879" title="1. 方案说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 方案说明</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-317207bfcaee80229412fc285f647a2b" data-id="317207bfcaee80229412fc285f647a2b"><span><div id="317207bfcaee80229412fc285f647a2b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80229412fc285f647a2b" title="为什么用 Docker 而不是原生安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">为什么用 Docker 而不是原生安装</span></span></h4><div class="notion-text notion-block-317207bfcaee804796c4d0cc1983a75b">Nextcloud 依赖 PHP、Web 服务器和大量扩展，在 macOS 上原生安装依赖极其复杂，
且版本升级容易出问题。使用 Docker 容器化部署，环境隔离、开箱即用、易于维护。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-317207bfcaee8086a1ecdb013d48fa55" data-id="317207bfcaee8086a1ecdb013d48fa55"><span><div id="317207bfcaee8086a1ecdb013d48fa55" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8086a1ecdb013d48fa55" title="Apple Silicon 注意事项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Apple Silicon 注意事项</span></span></h4><div class="notion-text notion-block-317207bfcaee80a1a509d3a880bba699">在 M1/M2/M3 等 Apple Silicon 芯片的 Mac mini 上，
如果 Docker 拉取了 <code class="notion-inline-code">amd64</code> 架构的镜像，系统会通过 Rosetta 或 QEMU 模拟运行，
这种跨架构模拟极易导致 Apache/PHP 崩溃，日志里出现：</div><div class="notion-text notion-block-317207bfcaee809698d7eff4908a5fbe">解决方法很简单：启动容器时加 <code class="notion-inline-code">--platform linux/arm64</code>，强制使用原生镜像。</div><hr class="notion-hr notion-block-317207bfcaee80189516e1e23eeeab8a"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80dab6a1d0fec91f8b0a" data-id="317207bfcaee80dab6a1d0fec91f8b0a"><span><div id="317207bfcaee80dab6a1d0fec91f8b0a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80dab6a1d0fec91f8b0a" title="2. 安装 Docker 运行环境（OrbStack）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 安装 Docker 运行环境（OrbStack）</span></span></h3><div class="notion-text notion-block-317207bfcaee8079a203ceeff8bee84c">OrbStack 是专为 macOS 优化的 Docker 运行环境，比 Docker Desktop 更轻量、省电且
启动更快，尤其在 Apple Silicon 上表现优秀。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-317207bfcaee802ebdf8d6472a9eb0cf" data-id="317207bfcaee802ebdf8d6472a9eb0cf"><span><div id="317207bfcaee802ebdf8d6472a9eb0cf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee802ebdf8d6472a9eb0cf" title="2.1 安装 OrbStack"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.1 安装 OrbStack</span></span></h4><div class="notion-text notion-block-317207bfcaee8019afddcc646d959f96">前提：已安装 <a class="notion-link" href="https://brew.sh/" target="_blank" rel="noopener noreferrer">Homebrew</a>。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee808a85defd5dc335c75a" data-id="317207bfcaee808a85defd5dc335c75a"><span><div id="317207bfcaee808a85defd5dc335c75a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee808a85defd5dc335c75a" title="2.2 开机自启设置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.2 开机自启设置</span></span></h3><div class="notion-text notion-block-317207bfcaee80c8861ed8afd34bca4d">打开 OrbStack 应用 → 左上角菜单 → <b>Settings → General</b>，</div><div class="notion-text notion-block-317207bfcaee803c919be787e57802a9">勾选 <b>Start at Login（登录时启动）</b>。这是后续无人值守的基础。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80dfb7d6f7f4da09796d" data-id="317207bfcaee80dfb7d6f7f4da09796d"><span><div id="317207bfcaee80dfb7d6f7f4da09796d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80dfb7d6f7f4da09796d" title="2.3 验证 Docker 可用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.3 验证 Docker 可用</span></span></h3><div class="notion-text notion-block-317207bfcaee80aaafd5eb0c36711c68">有正常输出即可。</div><hr class="notion-hr notion-block-317207bfcaee80d0aa40d784c66da335"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80f3b413c1ff0ccbd47d" data-id="317207bfcaee80f3b413c1ff0ccbd47d"><span><div id="317207bfcaee80f3b413c1ff0ccbd47d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80f3b413c1ff0ccbd47d" title="3. 准备目录与端口规划"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 准备目录与端口规划</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80a09007d46042f81223" data-id="317207bfcaee80a09007d46042f81223"><span><div id="317207bfcaee80a09007d46042f81223" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80a09007d46042f81223" title="3.1 端口说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.1 端口说明</span></span></h3><table class="notion-simple-table notion-block-317207bfcaee8027ab1dfc9ab1a9ba19"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-317207bfcaee802a9dd0c2d329c71b7b"><td class="" style="width:120px"><div class="notion-simple-table-cell">服务</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">宿主机端口</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee807ab157d7d2f8928675"><td class="" style="width:120px"><div class="notion-simple-table-cell">Nextcloud 网页</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">8081</code></div></td></tr></tbody></table><div class="notion-text notion-block-317207bfcaee80ca96ebcf24901b5164">建议使用 <code class="notion-inline-code">8081</code> 避免与 macOS 上其他服务（如 Nginx、Apache）的 <code class="notion-inline-code">80/443</code> 冲突。</div><div class="notion-text notion-block-317207bfcaee80d7a578efcf32642146">如果你有其他服务占用了 <code class="notion-inline-code">8081</code>，可改为 <code class="notion-inline-code">8082</code>、<code class="notion-inline-code">8088</code> 等。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80279558c055fbf1c09f" data-id="317207bfcaee80279558c055fbf1c09f"><span><div id="317207bfcaee80279558c055fbf1c09f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80279558c055fbf1c09f" title="3.2 准备你想挂载进 Nextcloud 的本地目录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.2 准备你想挂载进 Nextcloud 的本地目录</span></span></h3><div class="notion-text notion-block-317207bfcaee80fb9bb6c6feb43ecdf3">也可以使用外接硬盘的路径，例如 <code class="notion-inline-code">/Volumes/MyHardDrive/Files</code>，</div><div class="notion-text notion-block-317207bfcaee800b9f45fb4c9c07f593">只要这个目录在 Docker 启动时确保已挂载上即可。</div><hr class="notion-hr notion-block-317207bfcaee809188bbcff6fcc556df"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee804c8c9ffd5afed77160" data-id="317207bfcaee804c8c9ffd5afed77160"><span><div id="317207bfcaee804c8c9ffd5afed77160" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee804c8c9ffd5afed77160" title="4. 启动 Nextcloud 容器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4. 启动 Nextcloud 容器</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80269c1ac6d9aed7b5ad" data-id="317207bfcaee80269c1ac6d9aed7b5ad"><span><div id="317207bfcaee80269c1ac6d9aed7b5ad" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80269c1ac6d9aed7b5ad" title="4.1 清理旧残留（如果之前装过）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.1 清理旧残留（如果之前装过）</span></span></h3><div class="notion-text notion-block-317207bfcaee8028b70aeb926c09400a">如果以前装过 Nextcloud 且状态混乱，先清理干净：</div><blockquote class="notion-quote notion-block-317207bfcaee803eaed4d4a27d66f370"><div>⚠️ 以上命令会删除容器和 Nextcloud 的数据库，全新开始时使用。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee8086904dec8d29e43dba" data-id="317207bfcaee8086904dec8d29e43dba"><span><div id="317207bfcaee8086904dec8d29e43dba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8086904dec8d29e43dba" title="4.2 启动容器（核心命令）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.2 启动容器（核心命令）</span></span></h3><div class="notion-text notion-block-317207bfcaee80248747c6715f9b2e92"><b>参数详解：</b></div><table class="notion-simple-table notion-block-317207bfcaee808195fef27abbfe24f5"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-317207bfcaee809a81a6f1b4507ebada"><td class="" style="width:120px"><div class="notion-simple-table-cell">参数</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">作用</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee803ab0e5ec3234a2ec19"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">--restart always</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Docker 引擎启动后自动拉起容器</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80b6b8d3d491505998a1"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">--platform linux/arm64</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">强制使用 arm64 原生镜像，防止 M 芯片上的段错误崩溃</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80149811ce55363ebc3b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">-p 8081:80</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将容器的 80 端口映射到宿主机 8081</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80b98a41f30c0de99c73"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">PHP_MEMORY_LIMIT=1024M</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">给 PHP 足够内存处理大图片/视频缩略图</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80219d41c65dbe5e894f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">PHP_UPLOAD_LIMIT=16G</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">允许上传大文件（实际还受分块策略影响）</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee804bbbdadea2d484b68e"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">-v nextcloud_data:/var/www/html</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">使用 Docker 托管卷存放 Nextcloud 核心系统，最稳定</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee8049b4a7e10ce9063950"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">-v ~/Nextcloud_Files:/mnt/storage</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">把 Mac 本地目录穿透进容器，用作外部存储</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee8074a304ee4c5652c513"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">nextcloud:stable</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">使用稳定版镜像（而非 <code class="notion-inline-code">latest</code>，稳定性更好）</div></td></tr></tbody></table><hr class="notion-hr notion-block-317207bfcaee809fa620d05684dd6c49"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee8021b3edd51cef651f3c" data-id="317207bfcaee8021b3edd51cef651f3c"><span><div id="317207bfcaee8021b3edd51cef651f3c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8021b3edd51cef651f3c" title="5. 首次安装与初始化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5. 首次安装与初始化</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee802aae27dc5d09fee90e" data-id="317207bfcaee802aae27dc5d09fee90e"><span><div id="317207bfcaee802aae27dc5d09fee90e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee802aae27dc5d09fee90e" title="5.1 访问安装页"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.1 访问安装页</span></span></h3><div class="notion-text notion-block-317207bfcaee80c69cfae24faef38a13">启动容器后等待约 30 秒（容器内部在解压核心文件），然后打开浏览器访问：</div><div class="notion-text notion-block-317207bfcaee80639b87fa8a355fb6d6"><code class="notion-inline-code">http://localhost:8081</code></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80fdb1bffba3831bdf59" data-id="317207bfcaee80fdb1bffba3831bdf59"><span><div id="317207bfcaee80fdb1bffba3831bdf59" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80fdb1bffba3831bdf59" title="5.2 安装向导"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.2 安装向导</span></span></h3><div class="notion-text notion-block-317207bfcaee809a8620e5b475d548c7">你将看到 Nextcloud 的安装向导：</div><ol start="1" class="notion-list notion-list-numbered notion-block-317207bfcaee808fa817f80304ccb73e" style="list-style-type:decimal"><li>设置管理员<b>用户名</b>和<b>密码</b>（请妥善保存，无找回功能）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-317207bfcaee80caac87e112211b04ad" style="list-style-type:decimal"><li><b>数据库</b>部分：保持默认选中 <b>SQLite</b>（适合个人/家庭使用，无需额外配置）。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-317207bfcaee8020949ae4923b62fbef" style="list-style-type:decimal"><li>点击 <b>&quot;安装 (Install)&quot;</b> 并等待。</li></ol><blockquote class="notion-quote notion-block-317207bfcaee8077876dcb4cf789a7d9"><div>安装完成后会自动跳转到 Nextcloud 首页，这代表一切正常。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee8049ad82e16ed5b26639" data-id="317207bfcaee8049ad82e16ed5b26639"><span><div id="317207bfcaee8049ad82e16ed5b26639" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8049ad82e16ed5b26639" title="5.3 确认容器状态正常的常用命令"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.3 确认容器状态正常的常用命令</span></span></h3><hr class="notion-hr notion-block-317207bfcaee8029983ee3e262bfb32d"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee805c8ca5ef4ec6aa2bab" data-id="317207bfcaee805c8ca5ef4ec6aa2bab"><span><div id="317207bfcaee805c8ca5ef4ec6aa2bab" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee805c8ca5ef4ec6aa2bab" title="6. 配置受信任域名（trusted_domains）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6. 配置受信任域名（trusted_domains）</span></span></h3><div class="notion-text notion-block-317207bfcaee80e78365e224862bb99a">Nextcloud 默认只信任安装时的域名（通常是 <code class="notion-inline-code">localhost</code>）。</div><div class="notion-text notion-block-317207bfcaee8083a916df37f35b2549">如果你想通过局域网 IP 或公网域名访问，会看到：</div><blockquote class="notion-quote notion-block-317207bfcaee8041b77dc6b8b6838701"><div>通过不被信任的域名访问 (Access through untrusted domain)</div></blockquote><div class="notion-text notion-block-317207bfcaee80e0875dc03ac2d904bd"><b>解决方法：</b> 使用 Nextcloud 官方的 <code class="notion-inline-code">occ</code> 命令行工具将新地址加入白名单，</div><div class="notion-text notion-block-317207bfcaee800f87b1cd59405e157b">无需手动修改 <code class="notion-inline-code">config.php</code>，执行后立即生效。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee806ca322fd773364a752" data-id="317207bfcaee806ca322fd773364a752"><span><div id="317207bfcaee806ca322fd773364a752" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee806ca322fd773364a752" title="6.1 信任局域网 IP"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6.1 信任局域网 IP</span></span></h3><blockquote class="notion-quote notion-block-317207bfcaee8047a13bc90628318ad4"><div>如何查看 Mac mini 的局域网 IP：系统设置 → 网络 → 点击当前 Wi-Fi/有线连接 → 查看 IP 地址。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80008504ffb6f519d0eb" data-id="317207bfcaee80008504ffb6f519d0eb"><span><div id="317207bfcaee80008504ffb6f519d0eb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80008504ffb6f519d0eb" title="6.2 信任公网域名"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6.2 信任公网域名</span></span></h3><hr class="notion-hr notion-block-317207bfcaee80bfa157ee9b37cb7577"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80c9a3f8d7a5e1948b4f" data-id="317207bfcaee80c9a3f8d7a5e1948b4f"><span><div id="317207bfcaee80c9a3f8d7a5e1948b4f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80c9a3f8d7a5e1948b4f" title="7. 挂载本地目录（External Storage）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">7. 挂载本地目录（External Storage）</span></span></h3><div class="notion-text notion-block-317207bfcaee80f0b22df626ed30399c">通过&quot;外部存储&quot;功能，可以把你 Mac mini 上的任意本地目录、外接硬盘，</div><div class="notion-text notion-block-317207bfcaee805c9370e408c403f156">作为 Nextcloud 里的一个文件夹来管理，非常灵活。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee802b8ba7edcd3d62e00f" data-id="317207bfcaee802b8ba7edcd3d62e00f"><span><div id="317207bfcaee802b8ba7edcd3d62e00f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee802b8ba7edcd3d62e00f" title="7.1 启用 External Storage 应用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">7.1 启用 External Storage 应用</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-317207bfcaee80d7b425fa8fc109b819" style="list-style-type:decimal"><li>右上角头像 → <b>&quot;应用 (Apps)&quot;</b></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-317207bfcaee801588dfe80a52c8caa9" style="list-style-type:decimal"><li>左侧菜单找到 <b>&quot;未启用的应用&quot;</b> 或通过搜索找到 <b>External storage support</b></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-317207bfcaee803d9e5bf0c712a683f2" style="list-style-type:decimal"><li>点击 <b>&quot;启用 (Enable)&quot;</b></li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80a3ba87fa78a9a72142" data-id="317207bfcaee80a3ba87fa78a9a72142"><span><div id="317207bfcaee80a3ba87fa78a9a72142" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80a3ba87fa78a9a72142" title="7.2 添加本地目录挂载"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">7.2 添加本地目录挂载</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-317207bfcaee807fbbdbe774dba98c42" style="list-style-type:decimal"><li>右上角头像 → <b>&quot;管理设置 (Administrative settings)&quot;</b></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-317207bfcaee802c80e9f57828ad0107" style="list-style-type:decimal"><li>左侧菜单 → <b>&quot;外部存储 (External storages)&quot;</b></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-317207bfcaee8072a155cde0bcd1ad44" style="list-style-type:decimal"><li>点击 <b>&quot;添加存储 (Add storage)&quot;</b>，填写如下：</li></ol><table class="notion-simple-table notion-block-317207bfcaee807b91d4d5be453295fe"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-317207bfcaee804b9588de3b1c901e58"><td class="" style="width:120px"><div class="notion-simple-table-cell">字段</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">填写内容</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee8067a6fec3d717cf00c0"><td class="" style="width:120px"><div class="notion-simple-table-cell">文件夹名称</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">随意，如 <code class="notion-inline-code">本地文件</code></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80d58681c73f7f8f05fe"><td class="" style="width:120px"><div class="notion-simple-table-cell">外部存储类型</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>本地 (Local)</b></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80c3be7af2e1f795a823"><td class="" style="width:120px"><div class="notion-simple-table-cell">身份验证</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>无 (None)</b></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80ce9d0bc77a2dcf49e5"><td class="" style="width:120px"><div class="notion-simple-table-cell">配置 / 路径</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">/mnt/storage</code></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80ce871fe499fb13c579"><td class="" style="width:120px"><div class="notion-simple-table-cell">可用对象</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">留空（仅管理员）或选择指定用户</div></td></tr></tbody></table><ol start="1" class="notion-list notion-list-numbered notion-block-317207bfcaee8095b804e4718ea6a1a6" style="list-style-type:decimal"><li>点击右侧的 <b>&quot;✓ 对钩&quot;</b> 保存。左侧出现<b>绿色圆点</b>代表挂载成功。</li></ol><blockquote class="notion-quote notion-block-317207bfcaee80789416e44af68966f0"><div>此处填写的是<b>容器内部</b>的路径 <code class="notion-inline-code">/mnt/storage</code>，而不是 Mac 上的路径，</div><div class="notion-text notion-block-317207bfcaee80b49c69d97f9d6978f0">这正是我们在 docker run 命令里通过 <code class="notion-inline-code">-v ~/Nextcloud_Files:/mnt/storage</code> 映射进去的。</div></blockquote><div class="notion-text notion-block-317207bfcaee80fda345ea1674dc893a">现在你可以：</div><ul class="notion-list notion-list-disc notion-block-317207bfcaee80c8b332e6afce7585c0"><li>在 Nextcloud 网页上传文件 → 自动落到 Mac 的 <code class="notion-inline-code">~/Nextcloud_Files</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80b08209dfb0d6dadc58"><li>在 Mac Finder 里直接往 <code class="notion-inline-code">~/Nextcloud_Files</code> 拖文件 → Nextcloud 里自动可见</li></ul><hr class="notion-hr notion-block-317207bfcaee80a48ceaeec4529d8caf"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80a8a106e883b020bac9" data-id="317207bfcaee80a8a106e883b020bac9"><span><div id="317207bfcaee80a8a106e883b020bac9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80a8a106e883b020bac9" title="8. 配置 Cloudflare Tunnel 外网访问（可选）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">8. 配置 Cloudflare Tunnel 外网访问（可选）</span></span></h3><div class="notion-text notion-block-317207bfcaee80128b01d961fe41374f">如果你使用 Cloudflare Tunnel 将内网服务暴露到公网，</div><div class="notion-text notion-block-317207bfcaee80aea4faf08e2b2a0768">只需在 Tunnel 的 Public Hostnames 中添加一条记录：</div><table class="notion-simple-table notion-block-317207bfcaee8069b829fb9e4283f207"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-317207bfcaee80aca42ce30bf810636f"><td class="" style="width:120px"><div class="notion-simple-table-cell">字段</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">值</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee807db987f675e6a77529"><td class="" style="width:120px"><div class="notion-simple-table-cell">Subdomain</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">cloud</code></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80d58416d4769974b77d"><td class="" style="width:120px"><div class="notion-simple-table-cell">Domain</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">yourdomain.com</code></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80e6a82dca802c6e9391"><td class="" style="width:120px"><div class="notion-simple-table-cell">Type</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">HTTP</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee8088822bd248b97ab629"><td class="" style="width:120px"><div class="notion-simple-table-cell">URL</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">localhost:8081</code></div></td></tr></tbody></table><div class="notion-text notion-block-317207bfcaee801b876dfebda82be99b">配置好后，<code class="notion-inline-code">https://cloud.yourdomain.com</code> 即可从任何地方访问你的 Nextcloud。</div><hr class="notion-hr notion-block-317207bfcaee801090e6c058d200dcc1"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80699ce6c39244036866" data-id="317207bfcaee80699ce6c39244036866"><span><div id="317207bfcaee80699ce6c39244036866" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80699ce6c39244036866" title="9. 修复 iOS 客户端授权无反应"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">9. 修复 iOS 客户端授权无反应</span></span></h3><div class="notion-text notion-block-317207bfcaee8098a82eecb6f4b9a21e">当 Nextcloud 经过 Cloudflare 等反向代理后，iOS 客户端在点击</div><div class="notion-text notion-block-317207bfcaee80429341dfdfed365270"><b>&quot;Grant Access（授权访问）&quot;</b> 时，可能会卡住没有任何反应。</div><div class="notion-text notion-block-317207bfcaee80c38e16f1d1798f149c"><b>原因：</b> Nextcloud 不知道自己被套了 HTTPS 反代，</div><div class="notion-text notion-block-317207bfcaee8026bce7d0dce93b6582">生成了 <code class="notion-inline-code">http://</code> 开头的授权回调链接；iOS 的安全策略拒绝接受非 HTTPS 的跳转。</div><div class="notion-text notion-block-317207bfcaee80569a20c210f7b42ad6"><b>修复方法（执行后立即生效，无需重启容器）：</b></div><div class="notion-text notion-block-317207bfcaee804398f8ffdced0a7633">配置完成后，彻底关闭手机上的 Nextcloud App 再重新打开，</div><div class="notion-text notion-block-317207bfcaee8082a2e6c7d3a78e81df">重新登录时&quot;Grant Access&quot;按钮将正常响应并跳转。</div><blockquote class="notion-quote notion-block-317207bfcaee8034a02fd10a9ad4acbc"><div><b>提示：</b> 设置 <code class="notion-inline-code">overwriteprotocol=https</code> 后，</div><div class="notion-text notion-block-317207bfcaee800e945ddcb6bf0009e4">如果你用 <code class="notion-inline-code">http://192.168.x.x:8081</code> 访问会出现 400 Bad Request，</div><div class="notion-text notion-block-317207bfcaee80b68ab1ed45260a2796">这时要么通过域名访问内网（配合路由器 DNS 劫持），</div><div class="notion-text notion-block-317207bfcaee80f388d4ea5971c0c274">要么临时删除该配置项：</div></blockquote><hr class="notion-hr notion-block-317207bfcaee80f48a53fd3e69331dc6"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80729271c02d4a302d27" data-id="317207bfcaee80729271c02d4a302d27"><span><div id="317207bfcaee80729271c02d4a302d27" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80729271c02d4a302d27" title="10. iPhone 照片自动备份"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">10. iPhone 照片自动备份</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee8021820cc538fde446e9" data-id="317207bfcaee8021820cc538fde446e9"><span><div id="317207bfcaee8021820cc538fde446e9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8021820cc538fde446e9" title="10.1 App 内配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">10.1 App 内配置</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-317207bfcaee80519e39dab6744f9ab3" style="list-style-type:decimal"><li>App Store 安装官方 <b>Nextcloud</b> 客户端</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-317207bfcaee807d9382fc721a580d5a" style="list-style-type:decimal"><li>输入服务器地址（如 <code class="notion-inline-code">https://cloud.yourdomain.com</code>）并登录</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-317207bfcaee8038a977e87e3e1dc211" style="list-style-type:decimal"><li>右下角 <b>&quot;更多 (More)&quot;</b> → <b>&quot;设置 (Settings)&quot;</b> → <b>&quot;自动上传 (Auto upload)&quot;</b></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-317207bfcaee80bc8292fb9f26d4d9aa" style="list-style-type:decimal"><li>开启 <b>自动上传照片</b> 和 <b>自动上传视频</b></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-317207bfcaee8094a422f9556b4a89a3" style="list-style-type:decimal"><li>建议开启 <b>&quot;使用子文件夹（按年/月整理）&quot;</b>（自动分类便于管理）</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-317207bfcaee800fb370c6577da3bb83" style="list-style-type:decimal"><li>如需省流量，开启 <b>&quot;仅在 Wi-Fi 时上传&quot;</b></li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80458732e47a02de1fcd" data-id="317207bfcaee80458732e47a02de1fcd"><span><div id="317207bfcaee80458732e47a02de1fcd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80458732e47a02de1fcd" title="10.2 iOS 系统权限（必须设置，否则后台不上传）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">10.2 iOS 系统权限（必须设置，否则后台不上传）</span></span></h3><div class="notion-text notion-block-317207bfcaee806aad7bf877f3957ac5">打开 iPhone <b>&quot;设置&quot;</b> → 找到 <b>Nextcloud</b> → 修改以下权限：</div><table class="notion-simple-table notion-block-317207bfcaee80f982fbd3b105e8c232"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-317207bfcaee80a7a724eb9800be72d1"><td class="" style="width:120px"><div class="notion-simple-table-cell">权限</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">设置为</div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80ba8d10cc40791f3bf7"><td class="" style="width:120px"><div class="notion-simple-table-cell">位置 (Location)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>始终 (Always)</b></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee809a9efcea68609abc4d"><td class="" style="width:120px"><div class="notion-simple-table-cell">后台 App 刷新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>开启</b></div></td></tr><tr class="notion-simple-table-row notion-block-317207bfcaee80a7917be2d82c27b6e8"><td class="" style="width:120px"><div class="notion-simple-table-cell">照片 (Photos)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>完全访问</b></div></td></tr></tbody></table><blockquote class="notion-quote notion-block-317207bfcaee803586cbec70b85570e9"><div><b>原理：</b> Nextcloud iOS 利用系统的位置变化事件在后台唤醒上传进程，</div><div class="notion-text notion-block-317207bfcaee80f6b7bdc4f2f6140bc8">因此&quot;位置：始终&quot;是后台能自动上传的关键，</div><div class="notion-text notion-block-317207bfcaee806bb14ef99c1038694c">这不会增加明显的电量消耗。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee802ea00fc61a259fd2c2" data-id="317207bfcaee802ea00fc61a259fd2c2"><span><div id="317207bfcaee802ea00fc61a259fd2c2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee802ea00fc61a259fd2c2" title="10.3 最佳实践"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">10.3 最佳实践</span></span></h3><ul class="notion-list notion-list-disc notion-block-317207bfcaee80bda6e6ef8949dcf148"><li>插电 + 连 Wi-Fi 时，系统会给 Nextcloud 更多后台时间，上传速度和成功率最高。</li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee806baf53f9365912332b"><li><b>不要在多任务界面强行上滑关掉 Nextcloud</b>，这会彻底阻止后台运行。</li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80b0abc6d718619c415e"><li>对于十几 GB 的 4K 大视频，建议在家里连局域网，打开 App 前台上传，避免 Cloudflare 的超时限制。</li></ul><hr class="notion-hr notion-block-317207bfcaee805da1fcf11f0f96d91b"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80eb8cedebc864c749b1" data-id="317207bfcaee80eb8cedebc864c749b1"><span><div id="317207bfcaee80eb8cedebc864c749b1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80eb8cedebc864c749b1" title="11. 开机自启与无人值守"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">11. 开机自启与无人值守</span></span></h3><div class="notion-text notion-block-317207bfcaee809b8446d33bf45918d2">实现&quot;断电重启后所有服务自动恢复&quot;，需要同时满足三个条件：</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80b5b5d1c6ffb3682d16" data-id="317207bfcaee80b5b5d1c6ffb3682d16"><span><div id="317207bfcaee80b5b5d1c6ffb3682d16" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80b5b5d1c6ffb3682d16" title="11.1 Mac 硬件：来电自动开机 + 永不休眠"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">11.1 Mac 硬件：来电自动开机 + 永不休眠</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee8031b786f6f4386c0662" data-id="317207bfcaee8031b786f6f4386c0662"><span><div id="317207bfcaee8031b786f6f4386c0662" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8031b786f6f4386c0662" title="11.2 Mac 账户：自动登录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">11.2 Mac 账户：自动登录</span></span></h3><div class="notion-text notion-block-317207bfcaee80498c6bd466d92e7a42">系统设置 → <b>用户与群组</b> → <b>登录选项</b> → 开启 <b>自动登录</b> 并选择你的账户。</div><blockquote class="notion-quote notion-block-317207bfcaee8036b4deebe3f7466460"><div>因为 OrbStack（Docker 引擎）需要用户登录桌面后才能完整启动，</div><div class="notion-text notion-block-317207bfcaee809c8ac1fada598b2f35">自动登录是无人值守的前提。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee8067bec8f0db3ba33cc0" data-id="317207bfcaee8067bec8f0db3ba33cc0"><span><div id="317207bfcaee8067bec8f0db3ba33cc0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8067bec8f0db3ba33cc0" title="11.3 OrbStack：登录时自动启动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">11.3 OrbStack：登录时自动启动</span></span></h3><div class="notion-text notion-block-317207bfcaee80bfa7f7f5c0a4d55d76">OrbStack 主界面 → <b>Settings → General</b> → 勾选 <b>Start at Login</b>。</div><div class="notion-text notion-block-317207bfcaee802f8444e8592307d246">OrbStack 启动后，由于容器设置了 <code class="notion-inline-code">--restart always</code>，</div><div class="notion-text notion-block-317207bfcaee80e78f59e55ce72dcf74">Nextcloud 容器会在几秒内自动恢复运行。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee808c8fc8df4a086ea43d" data-id="317207bfcaee808c8fc8df4a086ea43d"><span><div id="317207bfcaee808c8fc8df4a086ea43d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee808c8fc8df4a086ea43d" title="11.4 验证自启配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">11.4 验证自启配置</span></span></h3><div class="notion-text notion-block-317207bfcaee80c1a5fbe0152977fd21">至此，你的 Mac mini 实现了真正的无人值守：</div><div class="notion-text notion-block-317207bfcaee80a39fcefa8dce5dceeb">断电 → 来电 → 自动开机 → 自动登录 → OrbStack 自启 → Nextcloud 容器自启 → 全部恢复正常。</div><hr class="notion-hr notion-block-317207bfcaee805f976dd1c92dba754f"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80e9a410f14589255dfa" data-id="317207bfcaee80e9a410f14589255dfa"><span><div id="317207bfcaee80e9a410f14589255dfa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80e9a410f14589255dfa" title="12. 常见错误排查"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">12. 常见错误排查</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80b596e6c790df580c36" data-id="317207bfcaee80b596e6c790df580c36"><span><div id="317207bfcaee80b596e6c790df580c36" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80b596e6c790df580c36" title="12.1 「通过不被信任的域名访问」"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">12.1 「通过不被信任的域名访问」</span></span></h3><div class="notion-text notion-block-317207bfcaee8051bbf6f2d88e2f6d95">加入 <code class="notion-inline-code">trusted_domains</code> 白名单（见第 6 节）。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee80bd83d9c262527cd09e" data-id="317207bfcaee80bd83d9c262527cd09e"><span><div id="317207bfcaee80bd83d9c262527cd09e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80bd83d9c262527cd09e" title="12.2 「iOS Grant Access 无反应」"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">12.2 「iOS Grant Access 无反应」</span></span></h3><div class="notion-text notion-block-317207bfcaee80818fa9fd5972f4489e">设置 <code class="notion-inline-code">overwriteprotocol</code> 和 <code class="notion-inline-code">overwrite.cli.url</code>（见第 9 节）。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee804c9af7ec485617f233" data-id="317207bfcaee804c9af7ec485617f233"><span><div id="317207bfcaee804c9af7ec485617f233" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee804c9af7ec485617f233" title="12.3 「502 Bad Gateway / localhost 打不开」"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">12.3 「502 Bad Gateway / localhost 打不开」</span></span></h3><div class="notion-text notion-block-317207bfcaee807aa732e14614ddb901">容器崩溃或正在重启循环。查看日志定位原因：</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee8028bbc9d96d9923498e" data-id="317207bfcaee8028bbc9d96d9923498e"><span><div id="317207bfcaee8028bbc9d96d9923498e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8028bbc9d96d9923498e" title="12.4 「Segmentation fault (11)」崩溃"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">12.4 「Segmentation fault (11)」崩溃</span></span></h3><div class="notion-text notion-block-317207bfcaee808299a7d94809340a1c">镜像架构不匹配。先完全清理，再带 <code class="notion-inline-code">--platform linux/arm64</code> 重新启动：</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee809799bffe064eabce37" data-id="317207bfcaee809799bffe064eabce37"><span><div id="317207bfcaee809799bffe064eabce37" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee809799bffe064eabce37" title="12.5 「Cloudflare Error 524」上传大文件超时"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">12.5 「Cloudflare Error 524」上传大文件超时</span></span></h3><div class="notion-text notion-block-317207bfcaee804baf00dc98810dbebc">524 是 Cloudflare 等了超过 100 秒后端没响应所致。</div><div class="notion-text notion-block-317207bfcaee8040a0d4c9d4b98f752a">解决方法：</div><ul class="notion-list notion-list-disc notion-block-317207bfcaee80f3b520edcf4191fe23"><li>大批量备份时，在家连局域网，App 里用 <code class="notion-inline-code">http://192.168.x.x:8081</code> 直连内网上传（不经 Cloudflare）。</li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80fcb5f6ea0497290aaf"><li>将 Nextcloud iOS App 里的分块大小设置为 10~20 MB（Settings → Advanced → Chunk size）。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee804e9117f08a4d13bac7" data-id="317207bfcaee804e9117f08a4d13bac7"><span><div id="317207bfcaee804e9117f08a4d13bac7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee804e9117f08a4d13bac7" title="12.6 「Internal Storage not working」外部存储红灯"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">12.6 「Internal Storage not working」外部存储红灯</span></span></h3><div class="notion-text notion-block-317207bfcaee80a3840becbdeefa6635">检查容器启动命令里是否有对应的 <code class="notion-inline-code">-v</code> 挂载；并确认容器内路径填写正确（不是 Mac 本地路径）：</div><hr class="notion-hr notion-block-317207bfcaee80d9ab92c631f270844c"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-317207bfcaee802f9919d4f3d3f4bee3" data-id="317207bfcaee802f9919d4f3d3f4bee3"><span><div id="317207bfcaee802f9919d4f3d3f4bee3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee802f9919d4f3d3f4bee3" title="附录：快速命令速查"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">附录：快速命令速查</span></span></h3><hr class="notion-hr notion-block-317207bfcaee8093be0fcd27902b7ccf"/></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mac Mini打造外网可访问的S3&WebDAV存储]]></title>
            <link>https://www.rubo.wang//blog/s3</link>
            <guid>https://www.rubo.wang//blog/s3</guid>
            <pubDate>Mon, 02 Mar 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[利用域名和闲置的Mac Mini实现云存储]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-317207bfcaee80b8b30dda4418bcf8f2"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-317207bfcaee806f80fafe77652720f8">对于研究者而言，拥有一个大容量、高可用且外网可随时访问的数据中转站至关重要。本文将详细介绍如何利用闲置的 Mac mini，通过纯原生方式部署 MinIO（S3 兼容存储）和 Rclone（转换为 WebDAV），并结合 Cloudflare Tunnel 实现免公网 IP 的安全域名访问。整个方案资源占用极低，且能完美绕过 Cloudflare 免费版的单次 100MB 上传限制。</div><hr class="notion-hr notion-block-317207bfcaee80b68119f3223f9245a2"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-317207bfcaee80cdb197f5d34e3d211a" data-id="317207bfcaee80cdb197f5d34e3d211a"><span><div id="317207bfcaee80cdb197f5d34e3d211a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80cdb197f5d34e3d211a" title="零、 基础环境与网络准备"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">零、 基础环境与网络准备</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee80deb07ee64c619ec336" data-id="317207bfcaee80deb07ee64c619ec336"><span><div id="317207bfcaee80deb07ee64c619ec336" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80deb07ee64c619ec336" title="1. 禁用 Mac mini 休眠"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 禁用 Mac mini 休眠</span></span></h4><div class="notion-text notion-block-317207bfcaee80b9b5b0c047a3b6cd6e">为保证服务器 24 小时在线，需彻底关闭休眠机制：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee80108430e74b12073f9b" data-id="317207bfcaee80108430e74b12073f9b"><span><div id="317207bfcaee80108430e74b12073f9b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80108430e74b12073f9b" title="2. 开启 SSH 访问"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 开启 SSH 访问</span></span></h4><div class="notion-text notion-block-317207bfcaee80bf9529e1cdb2c13d74">进入 <code class="notion-inline-code">系统设置 &gt; 通用 &gt; 共享</code>，打开 <b>远程登录</b> 开关，以便后续无头（Headless）管理。</div><hr class="notion-hr notion-block-317207bfcaee8007a16fd34a548bebd7"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-317207bfcaee80629e27ded4f819c4dc" data-id="317207bfcaee80629e27ded4f819c4dc"><span><div id="317207bfcaee80629e27ded4f819c4dc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80629e27ded4f819c4dc" title="一、 原生部署 MinIO (S3 兼容存储)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、 原生部署 MinIO (S3 兼容存储)</span></span></h3><div class="notion-text notion-block-317207bfcaee80fd99ffc22bb435c930">相比 Docker 虚拟机，原生安装能最大化压榨 Mac 的读写性能。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee80d78569d6f46437c5de" data-id="317207bfcaee80d78569d6f46437c5de"><span><div id="317207bfcaee80d78569d6f46437c5de" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80d78569d6f46437c5de" title="1. 安装与目录准备"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 安装与目录准备</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee80a39381d5a48563e1aa" data-id="317207bfcaee80a39381d5a48563e1aa"><span><div id="317207bfcaee80a39381d5a48563e1aa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80a39381d5a48563e1aa" title="2. 配置环境变量"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 配置环境变量</span></span></h4><div class="notion-text notion-block-317207bfcaee800f92a0dbfc9eb49544">创建一个环境变量文件来存储账号密码和公网域名（假设您之后打算绑定的域名为 <code class="notion-inline-code">s3.yourdomain.com</code> 和 <code class="notion-inline-code">console.yourdomain.com</code>）：</div><div class="notion-text notion-block-317207bfcaee80d78902d4fe7f83d155"><em>⚠️ 注意：</em><em><code class="notion-inline-code">MINIO_ROOT_PASSWORD</code></em><em> 必须至少 8 位，否则服务无法启动。</em></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee80f6aa96d4a0a07911d8" data-id="317207bfcaee80f6aa96d4a0a07911d8"><span><div id="317207bfcaee80f6aa96d4a0a07911d8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80f6aa96d4a0a07911d8" title="3. 配置开机自启 (Launchd)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 配置开机自启 (Launchd)</span></span></h4><div class="notion-text notion-block-317207bfcaee80d7a44cf948f6d71617">创建 macOS 原生的 LaunchAgent 服务文件。首先使用 <code class="notion-inline-code">whoami</code> 查看您的系统用户名（例如 <code class="notion-inline-code">rubo</code>）。</div><div class="notion-text notion-block-317207bfcaee804ea425c3a3b22cb70d">新建并编辑配置文件：</div><div class="notion-text notion-block-317207bfcaee80f6a387e70ac9e2ef83">粘贴以下内容（<b>务必将所有的 </b><code class="notion-inline-code"><b>rubo</b></code><b> 替换为您真实的用户名</b>）：</div><div class="notion-text notion-block-317207bfcaee80bf9bffd1798837cb89">保存后，加载并启动服务：</div><div class="notion-text notion-block-317207bfcaee80558a9dd0ae34bc7cf3">此时 MinIO 已经在本地的 9000 (API) 和 9001 (Web 控制台) 端口运行了。</div><hr class="notion-hr notion-block-317207bfcaee805cafd3d067823e647c"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-317207bfcaee8089b6c7f29eb77fe516" data-id="317207bfcaee8089b6c7f29eb77fe516"><span><div id="317207bfcaee8089b6c7f29eb77fe516" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8089b6c7f29eb77fe516" title="二、 部署 Rclone (将 S3 桥接为 WebDAV)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、 部署 Rclone (将 S3 桥接为 WebDAV)</span></span></h3><div class="notion-text notion-block-317207bfcaee804a8387fd403f6266df">许多文献管理软件（如 Zotero）只支持 WebDAV，我们可以用 Rclone 在本地将 S3 实时映射为 WebDAV 服务。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee801195ebd3b58f77bc57" data-id="317207bfcaee801195ebd3b58f77bc57"><span><div id="317207bfcaee801195ebd3b58f77bc57" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee801195ebd3b58f77bc57" title="1. 安装与配置 Rclone"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 安装与配置 Rclone</span></span></h4><div class="notion-text notion-block-317207bfcaee800f9f88c4943876da4e">运行 <code class="notion-inline-code">rclone config</code>，按以下交互指引配置本地 MinIO 节点：</div><ul class="notion-list notion-list-disc notion-block-317207bfcaee80a38736d0e6055af176"><li>按 <code class="notion-inline-code">n</code> 新建 remote，命名为 <code class="notion-inline-code">myminio</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80869695f456362eb99b"><li>Storage 选 <code class="notion-inline-code">s3</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee808a8bbfeb277d76e0b7"><li>Provider 选 <code class="notion-inline-code">Minio</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80ce8de2eb11a8862f19"><li><code class="notion-inline-code">env_auth</code> 选 <code class="notion-inline-code">false</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80629b66edd7061a19a4"><li><code class="notion-inline-code">access_key_id</code> 填您上面设置的 <code class="notion-inline-code">admin_ai_research</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee8055aa99e639545b5105"><li><code class="notion-inline-code">secret_access_key</code> 填 <code class="notion-inline-code">YourStrongPassword123</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80ed9016d476257cac7a"><li><code class="notion-inline-code">region</code> 填 <code class="notion-inline-code">us-east-1</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80ab849be4ed9051d4a5"><li><code class="notion-inline-code">endpoint</code> 填 <code class="notion-inline-code">http://127.0.0.1:9000</code> (内网通信，填本地地址)</li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80bb8265d0fda58aa347"><li>其余选项一路回车默认，最后按 <code class="notion-inline-code">y</code> 保存并 <code class="notion-inline-code">q</code> 退出。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee80b89b31dbdbbe2a97cf" data-id="317207bfcaee80b89b31dbdbbe2a97cf"><span><div id="317207bfcaee80b89b31dbdbbe2a97cf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80b89b31dbdbbe2a97cf" title="2. 配置 WebDAV 开机自启"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 配置 WebDAV 开机自启</span></span></h4><div class="notion-text notion-block-317207bfcaee80d8a4b2fb7690a83776">创建日志目录：</div><div class="notion-text notion-block-317207bfcaee801d9519e7afa53b999a">新建 plist 服务文件：</div><div class="notion-text notion-block-317207bfcaee80ad96f1c624812d2561">粘贴以下内容（注意替换 <code class="notion-inline-code">rubo</code> 为您的用户名，并自定义 WebDAV 的独立账号 <code class="notion-inline-code">davuser</code> 和密码 <code class="notion-inline-code">davpass123</code>）：</div><div class="notion-text notion-block-317207bfcaee80a29b81dfdb748b6753">加载并启动服务：</div><div class="notion-text notion-block-317207bfcaee8062b85de0125afde2e9">现在 WebDAV 运行在本地的 8080 端口。</div><hr class="notion-hr notion-block-317207bfcaee80649ef9e27efdaf3e5f"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-317207bfcaee8046a7b0f5015cb704be" data-id="317207bfcaee8046a7b0f5015cb704be"><span><div id="317207bfcaee8046a7b0f5015cb704be" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee8046a7b0f5015cb704be" title="三、 配置 Cloudflare Tunnel (公网域名访问)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、 配置 Cloudflare Tunnel (公网域名访问)</span></span></h3><div class="notion-text notion-block-317207bfcaee80728a5ae9426230bc95">通过零信任隧道，无需公网 IP 即可安全暴露服务。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee807388a6e97b413bfcae" data-id="317207bfcaee807388a6e97b413bfcae"><span><div id="317207bfcaee807388a6e97b413bfcae" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee807388a6e97b413bfcae" title="1. 安装并授权 Tunnel"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 安装并授权 Tunnel</span></span></h4><div class="notion-text notion-block-317207bfcaee804295cbedcef6919c5d">在 Mac mini 终端安装 cloudflared：</div><div class="notion-text notion-block-317207bfcaee80e1bae7c00d21c22336">登录 <a class="notion-link" href="https://one.dash.cloudflare.com/" target="_blank" rel="noopener noreferrer">Cloudflare Zero Trust</a>，在 <code class="notion-inline-code">Networks &gt; Tunnels</code> 点击 <code class="notion-inline-code">Create a tunnel</code>。
选择 Cloudflared，选择 Mac 操作系统，复制并执行控制台提供的以 <code class="notion-inline-code">sudo cloudflared service install...</code> 开头的长命令。
随后启动隧道：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee801d8622f03bb13e0763" data-id="317207bfcaee801d8622f03bb13e0763"><span><div id="317207bfcaee801d8622f03bb13e0763" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee801d8622f03bb13e0763" title="2. 配置路由映射 (Public Hostnames)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 配置路由映射 (Public Hostnames)</span></span></h4><div class="notion-text notion-block-317207bfcaee80fc8140e2d6957ea53e">在隧道的配置页面，添加以下三条映射记录（注意 Type 全部选 <b>HTTP</b>）：</div><ol start="1" class="notion-list notion-list-numbered notion-block-317207bfcaee809181bdd3334833f62b" style="list-style-type:decimal"><li><b>MinIO API (用于代码读写大模型)</b></li><ol class="notion-list notion-list-numbered notion-block-317207bfcaee809181bdd3334833f62b" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-317207bfcaee805ca011d08aac8406cd"><li>Subdomain: <code class="notion-inline-code">s3</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80cb9a90f009f80afb99"><li>URL: <code class="notion-inline-code">localhost:9000</code></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-317207bfcaee80ef9326ee79ec20b185" style="list-style-type:decimal"><li><b>MinIO Console (用于浏览器管理和分享链接)</b></li><ol class="notion-list notion-list-numbered notion-block-317207bfcaee80ef9326ee79ec20b185" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-317207bfcaee800e82c4ed35a11275c9"><li>Subdomain: <code class="notion-inline-code">console</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee808e9428cf37726c1736"><li>URL: <code class="notion-inline-code">localhost:9001</code></li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-317207bfcaee809ebd92c189aff86ebd" style="list-style-type:decimal"><li><b>WebDAV (用于 Zotero 或访达挂载)</b></li><ol class="notion-list notion-list-numbered notion-block-317207bfcaee809ebd92c189aff86ebd" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-317207bfcaee807a86d7f54f37e8caf7"><li>Subdomain: <code class="notion-inline-code">webdav</code></li></ul><ul class="notion-list notion-list-disc notion-block-317207bfcaee80cf851cfb59c52ac047"><li>URL: <code class="notion-inline-code">127.0.0.1:8080</code> (⚠️ 注意这里填 127.0.0.1 而非 localhost，以避免 502 报错)</li></ul></ol></ol><div class="notion-text notion-block-317207bfcaee80e2a1c9e4dc029ced66"><b>💡 关键修复：WebDAV 防 400 报错设置</b>
编辑刚刚建好的 <code class="notion-inline-code">webdav</code> 规则，展开 <code class="notion-inline-code">Additional application settings &gt; HTTP settings</code>，在 <b>HTTP Host Header</b> 中填入 <code class="notion-inline-code">webdav.yourdomain.com</code>，然后保存。这能解决因反向代理导致 Rclone 域名验证失败的问题。</div><hr class="notion-hr notion-block-317207bfcaee8054ad51dfb0b6f33b98"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-317207bfcaee80e1bdf6f3e35928d56e" data-id="317207bfcaee80e1bdf6f3e35928d56e"><span><div id="317207bfcaee80e1bdf6f3e35928d56e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80e1bdf6f3e35928d56e" title="四、 优雅绕过 Cloudflare 的 100MB 上传限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、 优雅绕过 Cloudflare 的 100MB 上传限制</span></span></h3><div class="notion-text notion-block-317207bfcaee807996aad9e92888e5fd">Cloudflare 免费版限制单次 HTTP 请求不得超过 100MB。突破此限制的核心是<b>强制使用 S3 的分块上传（Multipart Upload）</b>。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee809a8d25fac6e50bda51" data-id="317207bfcaee809a8d25fac6e50bda51"><span><div id="317207bfcaee809a8d25fac6e50bda51" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee809a8d25fac6e50bda51" title="1. 在 Python 代码中（boto3）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 在 Python 代码中（boto3）</span></span></h4><div class="notion-text notion-block-317207bfcaee80949334e39910207548">使用 <code class="notion-inline-code">TransferConfig</code> 封装上传函数：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-317207bfcaee80e89055e920aa7cbf1f" data-id="317207bfcaee80e89055e920aa7cbf1f"><span><div id="317207bfcaee80e89055e920aa7cbf1f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#317207bfcaee80e89055e920aa7cbf1f" title="2. 在命令行中（AWS CLI）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 在命令行中（AWS CLI）</span></span></h4><div class="notion-text notion-block-317207bfcaee802199c0e715c48bbfa1">在使用 AWS CLI 的机器上执行一次全局配置：</div><div class="notion-text notion-block-317207bfcaee8015a75ee105dc74ce84">此后所有的 <code class="notion-inline-code">aws s3 cp</code> 都会自动分块绕过限制。</div><blockquote class="notion-quote notion-block-317207bfcaee80c89dbfead5f6a4361a"><div>⚠️ 避坑指南：避免在 Web Console (浏览器) 或 WebDAV 挂载端上传大于 100MB 的单体文件，大模型权重和数据集请统一走 S3 API/CLI。</div></blockquote><div class="notion-text notion-block-317207bfcaee80dabfbeee647d0db24d">至此，您的 Mac mini 已经成为了一台安全、高效且跨网可达的数据中心。</div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>