惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
L
LangChain Blog
云风的 BLOG
云风的 BLOG
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
小众软件
小众软件
量子位
The GitHub Blog
The GitHub Blog
博客园 - 【当耐特】

neverland

‘Welcome datacomp’ n memory of the man who put red and green squiggles under words Photos Note Photos Photos Photos pikabubu 在香港骑共享单车:访客视角的经验 Day for Night 一个冷门的速查日历方法 Note Love Is to Be Invested in Someone’s Continual Expansion Photos Photos Note Photos Photos Photos Repetitive Cycles The Slow Death of the Power User Photos Photos Photos Photos The Life and Times of an American Tween Photos AI 裁员潮卑鄙生存指南 The Unethical Guide to Surviving AI Layoffs True resilience is not about bouncing back Note
Use Obsidian Sync on Desktop without Installing Obsidian
2026-03-27 · via neverland

I know this might sound a bit odd. Let me explain: (1) Obsidian Sync is, for now, the most stable, lowest-latency cross-platform (including desktop and mobile) service I’ve found for syncing plain text notes, and it works better than various cloud storage options; but (2) I mainly use Obsidian on mobile, while on desktop I prefer VS Code (see my setup in “VS Code as A Scratchpad”). Previously, to keep things synced, I had to keep Obsidian running on my computer, which is a heavy Electron app, and if it accidentally closed, syncing would stop.

A while ago, I noticed Obsidian released a headless version of the Obsidian Sync terminal client. (I loathe the recent “claw hype” but concede that it contributed to a CLI renaissance, after all.) Once set up, ob --continuous starts monitoring and syncing the notes folder in real time, which is exactly what I need. The only downside is that it doesn’t run in the background or stay active persistently. But that’s fine — this is exactly what PID 1 excels at. For example, on macOS, you can achieve this with launchd. The steps are as follows.

  1. Install obsidian-headless

    npm install -g obsidian-headless
    
  2. Log in and connect your notes library

    cd /path/to/local/vault
    ob login
    ob sync-setup --vault "Your Remote Vault"
    
  3. Create a Launch Agent under ~/Library/LaunchAgents/ with the name, for example, md.obsidian.headless-sync.plist (GitHub):

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    
    <key>Label</key>
    <string>md.obsidian.headless-sync</string>
    
    <key>ProgramArguments</key>
    <array>
        <!-- Replace with your output of npm prefix -g -->
        <string>/opt/homebrew/bin/ob</string>
        <string>sync</string>
        <string>--path</string>
        <!-- Replace with your local vault path -->
        <string>/path/to/local/vault/</string>
        <string>--continuous</string>
    </array>
    
    <key>RunAtLoad</key>
    <true/>
    
    <key>KeepAlive</key>
    <dict>
        <key>SuccessfulExit</key>
        <false/>
    </dict>
    
    <key>StandardOutPath</key>
    <string>/tmp/obsidian-headless-sync.log</string>
    
    <key>StandardErrorPath</key>
    <string>/tmp/obsidian-headless-sync.err</string>
    
    <key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key>
        <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
    </dict>
    
    </dict>
    </plist>
    
  4. Load the Launch Agent and verify

    launchctl load ~/Library/LaunchAgents/md.obsidian.headless-sync.plist
    launchctl list | grep obsidian
    tail -f /tmp/obsidian-headless-sync.log
    

From now on, Obsidian Sync will automatically start syncing after login and restart if it exits unexpectedly. This headless version uses about 40 MB+ of memory, which, while still not a small footprint — Node being Node — is only a fraction of the GUI version.

(On Linux and Windows, you can use systemd and Task Scheduler, respectively, to similar effect.)