This content originally appeared on DEV Community and was authored by Lightning Developer
I’ve been an Obsidian user for over two years, relying on it for everything from research notes and project documentation to personal thoughts. While Obsidian Sync works well, I didn’t want to pay \$5 per month for something I could build myself. After experimenting, I found a setup that’s fast, secure, and almost free: Docker for containerization, CouchDB for real-time synchronization, and Pinggy for secure remote access. With this combination, I can manage large vaults across multiple devices without worrying about conflicts or downtime.
The key piece making this setup reliable is the Obsidian LiveSync plugin. Compared to the official sync service, it’s faster and handles complex edits more gracefully. Everything is containerized in Docker, so the environment is consistent whether you’re on Windows, macOS, or Linux. With a few straightforward steps, you can have your own private sync server running in under an hour.
What You’ll Build
- CouchDB database to store your notes securely
- Docker containers for cross-platform deployment
- Pinggy tunnel for secure, remote access without port forwarding
- Real-time sync using the LiveSync plugin
- Full data ownership, avoiding the \$48/year Obsidian subscription
Why I Built My Own Sync Server
I keep over 3,000 notes in Obsidian, so reliability and control are critical. Some of the main motivations were:
- Privacy: My notes include sensitive projects and personal content
- Cost: Avoid recurring subscription fees
- Learning: Understand how real-time sync works
- Reliability: Full control over uptime and performance
- Customization: Tailor the system to my workflow
After exploring different options, CouchDB combined with LiveSync, Docker, and Pinggy emerged as the most robust solution.
Prerequisites
Before starting, make sure you have:
- Docker installed (Docker Desktop for Windows/macOS or Docker Engine for Linux)
- Basic command-line familiarity
- Obsidian installed on all devices to be synced
Step 1: Installing Docker
Windows
Download Docker Desktop from docker.com and install it. Windows 10 Pro/Enterprise/Education (Build 19041+) or Windows 11 is required. Ensure WSL 2 is enabled.
docker --version
docker-compose --version
macOS
Download Docker Desktop for Mac (Intel or Apple Silicon) and install. Verify installation with:
docker --version
docker-compose --version
Linux (Ubuntu/Debian)
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo usermod -aG docker $USER
docker --version
docker compose version
Step 2: Setting Up CouchDB with Docker
Create a directory for your project:
mkdir obsidian-sync
cd obsidian-sync
Create a Docker Compose file:
touch docker-compose.yml
Add the following configuration:
version: '3.8'
services:
couchdb:
image: couchdb:latest
container_name: couchdb-for-ols
user: 5984:5984
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=your-secure-password-here
volumes:
- ./couchdb-data:/opt/couchdb/data
- ./couchdb-etc:/opt/couchdb/etc/local.d
ports:
- 5984:5984
restart: unless-stopped
volumes:
couchdb-data:
couchdb-config:
networks:
obsidian-network:
driver: bridge
Start CouchDB:
docker compose up -d
docker compose ps
docker compose logs couchdb
Check it in your browser at http://localhost:5984
.
Step 3: Configuring CouchDB
- Open
http://localhost:5984/_utils
in your browser. - Log in using your Docker Compose credentials.
- Create a new database named
obsidian
. - Add a user (e.g.,
obsidian_user
) with read and write permissions.
Your CouchDB instance is now ready for Obsidian LiveSync.
Step 4: Setting Up Pinggy for Remote Access
Pinggy provides a secure tunnel to your CouchDB instance:
ssh -p 443 -R0:localhost:5984 free.pinggy.io
Pinggy will generate a URL like https://abc123.a.pinggy.io
which you’ll use in LiveSync.
Step 5: Installing Obsidian and LiveSync
Download Obsidian from obsidian.md for your platform.
Install and launch it, then create a new vault.
Install the Self-hosted LiveSync plugin:
- Settings → Community plugins → Browse → Search “Self-hosted LiveSync” → Install → Enable
- Configure the plugin with:
- Server URI: Your Pinggy URL
- Username: admin
- Password: CouchDB admin password
- Database: obsidian
- Enable CORS
Test the connection and you’re ready to sync.
Step 6: Adding Additional Devices
- In LiveSync settings → Setup tab → Copy setup URI.
- On other devices, install LiveSync and choose “Connect with setup URL.”
- Paste the URI and enter the passphrase. Sync begins automatically.
Conclusion
This setup-Docker, CouchDB, Pinggy, and LiveSync—gives you a private, reliable, and free alternative to Obsidian Sync. It works seamlessly across all devices, handles large vaults, and keeps your data completely under your control. By self-hosting, you not only save money but also gain peace of mind and a better understanding of how real-time sync works.
Reference
This content originally appeared on DEV Community and was authored by Lightning Developer

Lightning Developer | Sciencx (2025-09-25T10:17:50+00:00) How to Set Up a Self-Hosted Obsidian Sync Server. Retrieved from https://www.scien.cx/2025/09/25/how-to-set-up-a-self-hosted-obsidian-sync-server/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.