# Obsidian Sync Server A headless Docker container that uses `obsidian-headless` to keep a local vault directory synchronized with Obsidian Sync. ## Architecture - **Base Image:** Node.js 20 Slim - **Sync Engine:** `obsidian-headless` (Official CLI) - **Mode:** Continuous Sync (Watches for changes and pushes/pulls in real-time) ## Quick Start 1. **Clone the repo:** ```bash git clone https://gitea-wc4w40kskg0c4g400s0wcgsg.coolify-7dou.ja7z.net/hermes/obsidian-sync-server.git cd obsidian-sync-server ``` 2. **Configure Environment:** ```bash cp .env.example .env # Edit .env with your vault name, E2EE password, and device name nano .env ``` 3. **Launch:** ```bash docker-compose up -d ``` 4. **First-Time Login:** The `obsidian-headless` tool requires an initial login to your Obsidian account. ```bash docker exec -it obsidian-sync-server ob login ``` Follow the on-screen instructions to authenticate. Once logged in, the container will automatically proceed to `sync-setup` and `sync --continuous`. ## Interaction Since this is a headless server, you interact with your vault by: - **Filesystem:** Accessing the `./vault` folder on your host machine. - **Local Obsidian:** Opening the `./vault` folder in your local Obsidian app. - **CLI:** Running commands via `docker exec obsidian-sync-server ob `. ## Environment Variables | Variable | Description | |----------|-------------| | `OBSIDIAN_VAULT_NAME` | The name of the remote vault you want to sync | | `OBSIDIAN_SYNC_PASSWORD` | Your end-to-end encryption password | | `OBSIDIAN_DEVICE_NAME` | The name this device will have in your Sync history | | `OBSIDIAN_SYNC_TOKEN` | (Optional) A session token to bypass interactive login |