Sync your vault to the VPS
Get your Obsidian vault onto the VPS so Claude Code on the server can read and write to it.
Lesson outcome
You will have your Obsidian vault on the VPS, accessible to Claude Code running on the server.
Why this matters in an agency
If the vault only exists on your laptop, Claude Code on the VPS cannot see it. Your notes, SOPs, client info, and business context would only be available when you run Claude Code locally. By putting the vault on the VPS, Claude Code can access your business knowledge from the always-on server. Any tool or script you build later can reference the vault too.
Inputs, tools, and prerequisites
Your Obsidian vault on your local machine. SSH access to the VPS. Claude Code running on your local machine.
Step-by-step walkthrough
Choose your sync method
There are two primary ways to keep your vault on the VPS:
Obsidian Sync (recommended) — Obsidian's paid sync service ($4/month) syncs your vault across devices automatically. However, Obsidian Sync requires the Obsidian desktop app, and the VPS does not have a desktop environment. So Obsidian Sync keeps your vault in sync between your personal devices (laptop, phone, tablet), but you will need a separate method to get the vault onto the VPS.
Direct copy with rsync — For the VPS, the simplest approach is to copy the vault from your local machine to the VPS using rsync, a command-line tool that copies files efficiently. This is what we will use.
Copy the vault to the VPS
On your local machine, ask Claude Code:
```
Copy my Obsidian vault from [your-vault-path] to my VPS at /root/vault using rsync over SSH. The SSH host is "vps". Only copy .md files and skip the .obsidian folder — Claude Code does not need theme files or plugin data.
```
Claude Code will propose an rsync command like:
```
rsync -avz --include='/' --include='.md' --exclude='*' ~/Documents/AgencyVault/ vps:/root/vault/
```
This copies all .md files while preserving the folder structure. The .obsidian configuration folder is excluded because Claude Code does not need it.
Allow the command. Depending on the size of your vault, it completes in seconds to a minute.
Verify on the VPS
SSH into the VPS and check:
```
ssh vps
ls /root/vault/
```
You should see your vault notes. Start Claude Code in the vault directory:
```
cd /root/vault
claude
```
Ask Claude Code:
```
What notes exist in this vault? Give me a list.
```
It should list the same notes you have locally. Your vault is now on the VPS.
Keeping it in sync
When you add or change notes locally, you need to sync again. Run the same rsync command from your local machine. Rsync only transfers files that changed, so subsequent syncs are fast.
For now, manual syncing is fine. You will update the vault on the VPS when you know local changes need to be available remotely. This is a lightweight approach that does not require any additional software. In F2, you will learn more sophisticated sync and deployment methods.
If you want to push changes from the VPS back to your local machine (for example, if Claude Code created notes on the server), reverse the rsync:
```
rsync -avz --include='/' --include='.md' --exclude='*' vps:/root/vault/ ~/Documents/AgencyVault/
```
Failure modes and verification checks
The main failure is syncing to the wrong directory on the VPS — double-check the destination path. Another issue is accidentally syncing the .obsidian folder, which is unnecessary and can cause confusion if Obsidian is not installed on the VPS.
Verification: ls /root/vault/ on the VPS shows your notes. Claude Code on the VPS can read them.
Implementation checklist
- Choose sync method (rsync for VPS).
- Copy vault to VPS with rsync, excluding .obsidian.
- Verify notes are on the VPS.
- Start Claude Code on the VPS in the vault directory.
- Confirm Claude Code can read the notes.
- Understand how to re-sync when notes change.
Immediate next action
Move to the next lesson. Your vault is on the VPS. Now you will organize it properly.
Exercise
Test the round-trip. On the VPS, start Claude Code in the vault directory and ask it to create a new note:
```
Create a note called "VPS Test" with the text "This note was created by Claude Code on the VPS."
```
Verify the note exists on the VPS. Then sync the vault back to your local machine using the reverse rsync command. Open Obsidian locally and confirm the "VPS Test" note appeared. Delete it afterward — it was just a test. This proves the vault can flow in both directions.