Skip to content

Syncthing Setup

Syncthing provides real-time file synchronization across all devices on the Tailnet.


🎯 What We Sync

Folder Purpose Devices
~/coder-core Infrastructure code MacBook, Mac Mini, Linux WS
~/Obsidian Notes (optional) All devices

Critical Storage Warning

Do NOT sync large folders (Media, Documents, Downloads) to Bruno!
Bruno has limited local storage. Syncing these folders will fill its disk and crash services.
Use the Direct Backup Strategy (Mac -> Restic -> Storage Box) for large data instead.

🔧 Device Configuration

Existing Devices

Device Device ID Tailscale IP
MacBook Pro NKJDFDT-DVWJ3O4-UVMKQ6D-GC47FZI-S2AGK3J-MTLBCTK-E3HBYS2-2HZXAQP 100.112.119.56
Mac Mini 27SZIFC-XDJAIYC-2T2CSWD-N2TW75S-SOYBOG2-UB36IGP-5NJKBZX-NEH63AA 100.98.13.38
Production VPS E6D7VK4-EQBQRYT-OGZH4V5-U3YQ467-HR6GCTL-BJACABK-YTXNB2X-NAYODQU 100.80.53.55

🚀 Adding a New Device

Step 1: Install Syncthing

# macOS
brew install syncthing
brew services start syncthing

# Linux (Debian/Ubuntu)
sudo apt install syncthing
systemctl --user enable syncthing
systemctl --user start syncthing

Step 2: Get Device ID

# Open Syncthing Web UI
open http://localhost:8384   # macOS
xdg-open http://localhost:8384  # Linux

# Or get ID from CLI
syncthing --device-id

Step 3: Add Device to Existing Nodes

On your MacBook (http://localhost:8384):

  1. Click "Add Remote Device"
  2. Paste the new device ID
  3. Give it a name
  4. Save

Step 4: Share Folders

On your MacBook:

  1. Edit the coder-core folder
  2. Check the new device under "Share With"
  3. Save

On the New Device:

  1. Accept the folder share when prompted
  2. Set the folder path to ~/coder-core
  3. Save

⚙️ Configuration Files

Syncthing config is stored at:

  • macOS: ~/Library/Application Support/Syncthing/config.xml
  • Linux: ~/.config/syncthing/config.xml

Create ~/coder-core/.stignore:

// Ignore system files
.DS_Store
*.swp
*.swo
*~

// Ignore generated files
node_modules
__pycache__
*.pyc
.git
.venv
venv

// Ignore secrets (should be in Infisical)
.env
*.age
*.pem
*.key

// Ignore large binary files
*.zip
*.tar.gz
*.dmg

🔒 Security Notes

  1. Syncthing only syncs over encrypted connections (TLS)
  2. Device IDs are public - sharing them doesn't grant access
  3. Both devices must approve folder sharing
  4. Use .stignore to prevent syncing secrets

🐛 Troubleshooting

Devices Not Connecting

# Check if syncthing is running
ps aux | grep syncthing

# Check logs
tail -f ~/Library/Application\ Support/Syncthing/syncthing.log

# Restart syncthing
brew services restart syncthing  # macOS
systemctl --user restart syncthing  # Linux

Conflicts

Syncthing creates .sync-conflict-* files when conflicts occur.

# Find conflicts
find ~/coder-core -name "*.sync-conflict-*"

# Review and resolve manually

Slow Sync

Check VFS cache if using rclone mounts in the sync path.