553a1cf818c00d90a6cd7b4ac572c6262bb919d7
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
-
Clone the repo:
git clone https://gitea-wc4w40kskg0c4g400s0wcgsg.coolify-7dou.ja7z.net/hermes/obsidian-sync-server.git cd obsidian-sync-server -
Configure Environment:
cp .env.example .env # Edit .env with your vault name, E2EE password, and device name nano .env -
Launch:
docker-compose up -d -
First-Time Login: The
obsidian-headlesstool requires an initial login to your Obsidian account.docker exec -it obsidian-sync-server ob loginFollow the on-screen instructions to authenticate. Once logged in, the container will automatically proceed to
sync-setupandsync --continuous.
Interaction
Since this is a headless server, you interact with your vault by:
- Filesystem: Accessing the
./vaultfolder on your host machine. - Local Obsidian: Opening the
./vaultfolder in your local Obsidian app. - CLI: Running commands via
docker exec obsidian-sync-server ob <command>.
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 |
Description
Languages
Shell
80%
Dockerfile
20%