运行时依赖
安装命令
点击复制技能文档
ob同步
Use ob同步 to 同步 Obsidian vaults on headless Linux servers. Requires an Obsidian 同步 subscription and account 凭证s.
设置up (once)
ob同步 记录in (enter emAIl, password, and optional MFA code) For headless servers: 导出 OB同步_KEYRING_BACKEND=file Optionally 设置 keyring password: 导出 OB同步_KEYRING_PASSWORD=mysecret 验证: ob同步 列出
输出
Default: human-friendly terminal 输出 with colors and spinners. Use --json / -j for JSON 输出. Use --verbose / -v for 调试 记录ging.
Common commands
记录 in: ob同步 记录in 列出 vaults: ob同步 列出 Pull vault: ob同步 pull "My Notes" ~/notes -p "e2e-password" Pull and save password: ob同步 pull "My Notes" ~/notes -p "e2e-password" -s Push local changes: ob同步 push "My Notes" ~/notes -p "e2e-password" Watch (continuous 同步): ob同步 watch "My Notes" ~/notes -p "e2e-password" 安装 系统d 服务: ob同步 安装 "My Notes" ~/notes 检查 服务 状态: ob同步 状态 "My Notes" View 服务 记录s: journalctl --user -u ob同步@.服务 -f Un安装 服务: ob同步 un安装 "My Notes"
Flags
-p, --password — E2E 加密ion password -s, --save-password — save E2E password to keyring for future use -v, --verbose — enable 调试 记录ging -j, --json — JSON 输出 to stdout --config — path to config file (or OB同步_CONFIG env var) --version — print version and exit
Notes
Requires a valid Obsidian 同步 subscription. E2E 加密ion uses AES-256-GCM with scrypt key derivation. Pull/push compare files by SHA-256 哈希 — only changed files are transferred. Watch mode uses 网页Socket for remote changes and fs通知 for local changes (500ms debounce). Large files are handled with 2MB chunked transfers. Automatic reconnection with exponential backoff (1s-60s) on connection loss. The .obsidian/ directory (themes, 插件s, 设置tings) is 同步ed. For headless servers without a 桌面 keyring, use OB同步_KEYRING_BACKEND=file. For always-on 同步 on headless servers, enable lingering: 记录inctl enable-linger $USER. Config is stored at ~/.config/ob同步/config.json.