Sync Your Obsidian Vault with OpenClaw on a VPS Using Syncthing
Running OpenClaw on a VPS is great for 24/7 availability, but what if you want your agent to access and edit your Obsidian vault? A recent Discord discussion surfaced a clean solution: Syncthing.
The Problem
User szewong asked:
"Anyone trying to share their Obsidian vault to OpenClaw? My setup runs in a VPS. I'm thinking on ways to sync the vault and keep it up to date between my local and a copy within the OpenClaw VPS."
This is a common scenario: you want your remote OpenClaw agent to read and edit your notes, but Obsidian Sync doesn't work on headless servers.
The Solution: Syncthing
Agentic Lawyer shared their working setup:
"Use Syncthing to sync between VPS and local machine... It's a very powerful tool because OpenClaw can edit and format markdown files like a boss. And it's fun to watch live."
Why Syncthing Works Well
- No cloud dependency โ direct peer-to-peer sync between your devices
- Real-time updates โ changes propagate within seconds
- Works headless โ runs perfectly on Linux VPS without a GUI
- Free and open source โ no subscription fees
Quick Setup
1. Install Syncthing on Both Machines
On your local Mac/Linux:
brew install syncthing # macOS
# or
sudo apt install syncthing # Ubuntu/DebianOn your VPS:
sudo apt install syncthing
systemctl enable syncthing@$USER
systemctl start syncthing@$USER2. Access the Web UI
Syncthing runs a web UI on port 8384. On your VPS, tunnel it:
ssh -L 8385:localhost:8384 user@your-vpsThen open http://localhost:8385 in your browser.
3. Add Your Vault Folder
- In the Syncthing UI, click Add Folder
- Point it to your Obsidian vault path
- On the remote device, accept the folder share and choose where to store it
4. Point OpenClaw to the Synced Vault
In your OpenClaw workspace, reference the synced vault path. You can add it to your agent's context or create a skill that reads/writes to it.
Alternative: MongoDB + LiveSync
For more advanced users, Agentic Lawyer also mentioned:
"If you're brave, set up a MongoDB and sync from mongo to local vault using the livesync addon."
The Obsidian LiveSync plugin can sync via CouchDB/MongoDB, but it's more complex to set up. Syncthing is the easier path for most users.
Pro Tip: Keep Vaults Separate
"Just make sure you keep separate vaults for personal and OpenClaw tasks."
This is important advice. Having a dedicated vault (or folder) for agent tasks prevents your personal notes from being accidentally modified during agent operations.
Summary
| Method | Complexity | Best For |
|---|---|---|
| Syncthing | Easy | Most users, real-time sync |
| LiveSync + MongoDB | Hard | Advanced users, multiple devices |
Syncthing gets you 90% of the way there with minimal setup. Your OpenClaw agent can now read context from your notes and write structured outputs directly to your knowledge base.
Tip sourced from the OpenClaw Discord #users-helping-users channel. Thanks to szewong for the question and Agentic Lawyer for the solution!
Comments (0)
No comments yet. Be the first to comment!