--- title: "Vibe-Kanban + OpenCode 在 Ubuntu Server 上安装与管理指南" type: source tags: [npm, npx, pm2, ubuntu, vibe-coding, vibe-kanban] date: 2026-04-17 --- ## Source File - [[Vibe Coding/Vibe-Kanban + OpenCode 在 Ubuntu Server 上安装与管理指南]] ## Summary(用中文描述) - 核心主题:在 Ubuntu Server 上非 root 用户(shenwei)安装 Node 20、Vibe-Kanban、OpenCode,并通过 pm2 进程管理,实现 AI 辅助编程工作流 - 问题域:Ubuntu Server 环境下的 AI Coding Agent 部署与长期运维 - 方法/机制:使用 nvm 管理 Node 版本、npm/npx 安装工具、pm2 管理进程生命周期、权限配置确保非 root 用户正常运行 - 结论/价值:完整记录了从零开始在 Ubuntu Server 上搭建 Vibe Coding 环境的全流程,含验证步骤和故障排查要点 ## Key Claims(用中文描述) - 使用 nvm 安装 Node 20 可确保版本兼容性和环境隔离 - pm2 能可靠管理 Vibe-Kanban 和 OpenCode Executor 进程并支持开机自启 - 权限配置(/var/tmp/vibe-kanban 和 ~/.vibe-kanban 归属 shenwei)是避免 I/O error 的关键 - 不应以 root 用户启动 OpenCode serve,避免权限问题 - Vibe-Kanban 会自动 spawn OpenCode executor(随机端口),无需手动固定端口 ## Key Quotes > "不要用 root 启动 OpenCode serve,vibe-kanban 会自动 spawn executor" — 核心安全与架构原则 > "遇到 I/O error 时,通常是 executor 没启动或端口被占用" — 常见故障排查方向 > "pm2 只管理 vibe-kanban,executor 随进程一起管理" — 进程管理边界定义 ## Key Concepts - [[Vibe Coding]]:使用自然语言与 AI 编程工具协作的开发方式,Vibe-Kanban + OpenCode 是其代表性工具栈 - [[nvm]](Node Version Manager):Node.js 版本管理工具,通过 $NVM_DIR/$HOME/.nvm 安装,支持多版本共存和快速切换 - [[pm2]]:Node.js 进程管理器,支持进程守护、负载均衡、日志管理和开机自启(systemd) - [[Node 20]]:LTS 版 Node.js,Vibe-Kanban 和 OpenCode 的推荐运行时版本 ## Key Entities - [[Vibe-Kanban]]:AI 编程辅助工具,提供看板界面与 OpenCode executor 集成,通过 npx vibe-kanban 启动 - [[OpenCode]]:开源 AI Coding CLI agent,与 Vibe-Kanban 配合使用,npm install -g opencode-ai 安装 - [[shenwei]]:文档作者,非 root 普通用户,用于在 Ubuntu Server 上运行 Vibe-Kanban 和 OpenCode ## Connections - [[如何在Ubuntu上安装OpenCode并配置Vibe-Kanban]] ← extends ← [[vibe-kanban-opencode-在-ubuntu-server-上安装与管理指南]] - [[Vibe Coding 经验收集]] ← related_to ← [[vibe-kanban-opencode-在-ubuntu-server-上安装与管理指南]] - [[OpenCode]] ← depends_on ← [[Node 20]] - [[Vibe-Kanban]] ← depends_on ← [[OpenCode]] ## Contradictions - 与 [[如何在Ubuntu上安装OpenCode并配置Vibe-Kanban]] 部分重叠: - 冲突点:两篇文档都介绍 Ubuntu 上安装 OpenCode 和 Vibe-Kanban - 当前观点:本篇更详细,覆盖完整 6 步流程、pm2 进程管理、权限配置和验证步骤 - 对方观点:前篇侧重基础安装步骤