Set up bidirectional file sync between Joseph's Mac and the Hermes Linux server using cloud storage providers and rclone.
Mac (official app) ←→ Cloud Storage ←→ Server (rclone bisync)
files.metadata.read, files.metadata.write, files.content.read, files.content.writesharing.read/write — not needed for basic file sync, only for shared links/collaboratorsrclone may not be in system package managers. Manual binary install:
# Download (use specific version URL, not 'current' which may redirect oddly)
cd /tmp
curl -L "https://downloads.rclone.org/v1.75.0/rclone-v1.75.0-linux-amd64.zip" -o rclone.zip
Extract (unzip may not be available — use Python)
python3 -c "import zipfile; zipfile.ZipFile('rclone.zip').extractall('.')"
Install to user bin (no sudo needed)
mkdir -p ~/bin
cp rclone-*/rclone ~/bin/
chmod +x ~/bin/rclone
export PATH="$HOME/bin:$PATH"
Verify
rclone version
Gotcha: unzip is often not installed on headless servers. Use Python's zipfile module instead.
Gotcha: /usr/local/bin/ may require root. Use ~/bin/ and add to PATH.
# Interactive config — follow prompts
rclone config
Or create ~/.config/rclone/rclone.conf directly:
[dropbox]
type = dropbox
token = {"access_token":"...","token_type":"bearer","refresh_token":"...","expiry":"..."}
1. Create app at provider's developer console
2. Get app key + secret
3. Set Redirect URL in app settings: Add http://localhost:53682/ to OAuth 2.0 redirect URIs (required for rclone authorize)
4. Run rclone config → choose Dropbox → enter key/secret
5. rclone opens browser for OAuth authorization
6. On headless server: rclone shows a URL to visit manually, paste auth code back
For headless servers: rclone can generate an auth URL you visit on your Mac, then paste the code back into the terminal.# Initial sync (must run once before bisync)
rclone sync /opt/data/wiki dropbox:/wiki --dry-run # preview first
rclone sync /opt/data/wiki dropbox:/wiki # actual sync
Initialize bisync (required once)
rclone bisync /opt/data/wiki dropbox:/wiki --resync
Normal bidirectional sync
rclone bisync /opt/data/wiki dropbox:/wiki
rclone is not a daemon — it runs once and exits. Schedule with cron:
# Every 5 minutes
/5 * ~/bin/rclone bisync /opt/data/wiki dropbox:/wiki --quiet
Why cron? rclone doesn't watch for changes. Cron triggers periodic sync. 5-minute intervals are fine for markdown files.
rclone mount dropbox:/wiki /mnt/wiki --vfs-cache-mode writes
See wiki-input-output-split skill for where content lives. Cloud sync affects:
produce/blogs/jjude/ and produce/blogs/ctofieldnotes/ — synced FROM Mac via Dropboxproduce/hermes/ — Hermes writes here, syncs TO Mac via Dropboxconsume/ — Hermes writes here, optionally syncs to Mac--resync on first run — without it, bisync refuses to start~/bin/ not /usr/local/bin/zipfile module.env.dropbox or similar; add credentials to the existing /opt/data/.env filehttp://localhost:53682/ in Dropbox app settings first