Skip to content

psimaker/vaultsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VaultSync

Self-hosted Obsidian vault sync for iOS — powered by Syncthing.
Your notes, your devices, your server — no third-party cloud required.

Download on the App Store

Stars Forks Contributors License: MPL-2.0

CI Last Commit

iOS 26+ Swift 6 Xcode 26+ Open Issues Open PRs


Welcome Home


🆕 What's New — v1.0.2

✅ Reliable Silent-Push Sync — Background sync now correctly waits for pulls to finish instead of shutting down at the first idle flicker. Fixes the core reason why pushes sometimes arrived but files didn't.
🏠 Server Edits Wake iPhone Again — vaultsync-notify now reacts to real outgoing change markers on the homeserver, so direct edits on your server trigger an iPhone wake-up again without falling back to noisy state-transition pushes.
🛠️ Recovery When iOS Resumes Cold — If a silent push wakes VaultSync but Syncthing does not show real peer activity quickly enough, VaultSync now force-restarts the embedded engine and retries within the same background run.
⏱️ Longer iOS Grace Period — The app now holds a background-task assertion on suspend, so Syncthing gets up to ~30 seconds to wrap up in-flight operations.
🧭 Correct Vault Path — Accepting a pending share no longer creates a redundant nested subfolder when the selected Obsidian root already matches the share name.
🔔 Gentler Push Pressure — vaultsync-notify now deduplicates wake-ups per real change marker, reducing the chance of iOS throttling while still covering direct server-side edits.
♻️ Faster Recovery — Relay re-provisioning interval reduced from 24h to 6h so a server-side token cleanup heals automatically.

See CHANGELOG.md for full details.


✨ Features

🔄 Syncthing-Powered Sync Proven, battle-tested protocol — your data syncs directly between your devices over LAN or Internet

📂 Obsidian-First Design Syncs directly into Obsidian's sandbox on iOS — open Obsidian and your vault is up to date

📋 5-Step Setup Checklist Interactive guided setup — scan a QR code to pair, accept the connection, and start syncing

⚔️ Conflict Resolver Side-by-side Markdown diffs when files conflict — choose the right version with confidence

📡 Real-Time Activity Timeline See exactly what's syncing, when it synced, and catch issues early

🔐 Self-Hosted & Private No third-party cloud, no account required — your data never leaves your devices

☁️ Cloud Relay (recommended — $0.99/month) Near-realtime server wake-ups for incoming changes — no need to open the app for every server-side edit

🐳 vaultsync-notify Sidecar Lightweight Docker container watches Syncthing for changes and signals the relay — only the Device ID is sent, never file content

🔧 Sync Issues Panel Actionable remediation for sync problems — diagnose and fix without leaving the app

🏥 Relay Diagnostics Health checks and troubleshooting for your Cloud Relay connection

🔄 Background Sync iOS Background Refresh keeps your vault updated even when VaultSync isn't open

♿ Accessibility Full VoiceOver and Dynamic Type support throughout the app


🏗️ How It Works

┌──────────────┐     Syncthing protocol      ┌──────────────────┐
│  Your Mac /  │◄───────────────────────────►│    VaultSync      │
│  Linux / NAS │     (LAN or Internet)        │    (iOS)          │
│  + Syncthing │                              │                   │
└──────┬───────┘                              │  Syncs directly   │
       │                                      │  into Obsidian    │
       │  vaultsync-notify                    │  sandbox          │
       │  (Docker sidecar)                    └────────▲──────────┘
       │         │                                     │
       │         │ wake-up signal              APNs    │
       │         ▼                             push    │
       │  ┌──────────────────┐                         │
       │  │ relay.vaultsync  │─────────────────────────┘
       │  │      .eu         │   (Cloud Relay, recommended)
       │  └──────────────────┘
  1. Syncthing runs on your desktop/server and syncs files with VaultSync over the Syncthing protocol
  2. VaultSync receives files directly into Obsidian's sandbox on iOS — open Obsidian and your vault is up to date
  3. vaultsync-notify (optional) watches your Syncthing instance, detects when a peer actually needs new data, and signals the Cloud Relay when a wake-up is warranted
  4. Cloud Relay sends a silent push notification to wake VaultSync for immediate sync
  5. Local iPhone edits sync most reliably when VaultSync is opened; iOS background refresh may still help opportunistically, but it is not guaranteed

🚀 Getting Started

1. Install VaultSync

Download VaultSync from the App Store (free).

2. Connect Your Syncthing Device

Open VaultSync and scan your desktop Syncthing Device ID via QR code — or enter it manually. Accept the connection on your desktop Syncthing instance.

3. Sync Your Vault

VaultSync automatically detects Obsidian vaults. Select which vault to sync and it appears directly in Obsidian on your iPhone or iPad.

4. Enable Instant Sync (optional but recommended)

Cloud Relay gives you near-realtime push-based sync — your vault updates on iOS within seconds of a change on your server, without opening the app. Subscribe in the app ($0.99/month), then set up the notify container on your homeserver:

curl -fsSL https://raw.githubusercontent.com/psimaker/vaultsync/main/notify/scripts/bootstrap.sh | bash

The script auto-detects your Syncthing instance, configures the container, and starts it — typically done in under a minute.

Advanced: Manual Docker Compose setup

If you prefer to configure manually, add this to your existing docker-compose.yml:

vaultsync-notify:
  image: ghcr.io/psimaker/vaultsync-notify:latest
  environment:
    SYNCTHING_API_URL: http://syncthing:8384
    SYNCTHING_API_KEY: your-api-key
    RELAY_URL: https://relay.vaultsync.eu
    RELAY_API_KEY: your-relay-api-key

See notify/README.md for full configuration options.


📡 Cloud Relay & vaultsync-notify

Cloud Relay solves the core iOS limitation that third-party apps cannot run an always-on sync daemon in the background. When files change on your server, the vaultsync-notify container detects that remote peers are behind and sends a wake-up signal to the relay, which pushes a silent notification to your iPhone. VaultSync then wakes up and pulls server-side changes through Syncthing.

Privacy-first: only the Syncthing Device ID is sent as a wake-up signal — no file names, folder names, or content ever leaves your server.

Without Cloud Relay, VaultSync still works — just open the app to trigger a sync or rely on iOS background refresh. But for the best experience, Cloud Relay is highly recommended.

See notify/README.md for details.

iOS Background Limitation

iOS does not allow third-party apps like VaultSync to run an always-on sync daemon in the background.

  • Server → iPhone is near-realtime when Cloud Relay silent pushes are delivered.
  • iPhone → Server should be treated as foreground-first. Opening VaultSync is the reliable way to push local iPhone edits back to your homeserver.
  • iOS background refresh may sometimes help in either direction, but it is system-controlled and not guaranteed on a schedule.

The honest product promise is: near-realtime incoming sync to iPhone, reliable outgoing sync when VaultSync is opened.


🔮 Self-Hosted Relay

A fully self-hosted relay option (replacing relay.vaultsync.eu with your own server) is planned for a future release. In the meantime, the app works without any relay via manual sync and iOS background refresh.


📊 Technical Details
Platform iOS 26+
Language Swift 6 (strict concurrency), SwiftUI
Sync engine Syncthing v2.x via gomobile (.xcframework)
Background sync BGAppRefreshTask + BGContinuedProcessingTask
Push sync APNs silent notifications via Cloud Relay
License MPL-2.0
🔨 Building from Source

Requirements: Xcode 26+, Go 1.26+ with gomobile, XcodeGen, Make

git clone https://github.com/psimaker/vaultsync.git
cd vaultsync

# Patch vendored dependencies and build the Go xcframework
cd go && make patch && make xcframework && cd ..

# Generate and open Xcode project
cd ios && xcodegen generate
open VaultSync.xcodeproj

See docs/setup.md for detailed build instructions.

📁 Project Structure
├── ios/                  # Swift/SwiftUI iOS app
├── go/                   # Go bridge (gomobile → .xcframework)
├── notify/               # vaultsync-notify Docker container
├── docs/                 # Architecture and setup docs
└── .github/workflows/    # CI pipeline

🤝 Contributing

Contributions are welcome. Please follow the project conventions (Swift API Design Guidelines, standard Go conventions, Conventional Commits) and open a PR with a description.


🙏 Acknowledgments

VaultSync is built on top of these projects:

Project
Syncthing The open-source file synchronization program powering VaultSync
gomobile Go on mobile — enables the embedded sync engine

VaultSync is designed for Obsidian — the powerful knowledge base for your local Markdown files.


License

MPL-2.0 — You may freely use, modify, and distribute this software under the terms of the Mozilla Public License 2.0.

About

Self-hosted Obsidian vault sync for iOS — powered by Syncthing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors