One-command deployment of self-hosted Obsidian sync using CouchDB in a Proxmox LXC container.
Sync your Obsidian notes across all devices instantly with end-to-end encryption - completely self-hosted on your own server.
Based on the Self-hosted LiveSync plugin by vrtmrz.
- Instant sync between all your Obsidian devices
- End-to-end encryption - your notes stay private
- Self-hosted - no cloud services, your data stays on your server
- Lightweight - runs in a small LXC container (512MB RAM)
- Easy setup - interactive script handles everything
Run this command on your Proxmox host:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ril3y/obsidian-livesync-lxc/main/obsidian-livesync-lxc.sh)"The script will:
- Create an LXC container
- Install and configure CouchDB
- Apply all LiveSync-compatible settings
- Create your Obsidian database
After completion, you'll see:
Container Details:
ID: 102
Hostname: obsidian-livesync
IP: 192.168.1.110
CouchDB Admin Interface:
URL: http://192.168.1.110:5984/_utils
Obsidian LiveSync Settings:
URI: http://192.168.1.110:5984
Username: admin
Database: obsidian
- Open Obsidian on your computer
- Go to Settings (gear icon, bottom left)
- Click Community plugins in the sidebar
- Click Turn on community plugins (if prompted)
- Click Browse
- Search for Self-hosted LiveSync
- Click Install, then Enable
-
In Settings, find Self-hosted LiveSync in the sidebar
-
Click the π°οΈ Remote Database button (4th icon in the top row)
-
Enter your server details:
Setting Value Remote Type CouchDBURI http://YOUR_SERVER_IP:5984Username admin(or your configured username)Password Your configured password Database obsidian(or your database name) -
Click Test Database Connection
- Should say: "Connected to obsidian successfully"
-
Click Check and Fix
- All items should show checkmarks β
-
Click Apply
- Click the π Sync Settings button (5th icon)
- Set Sync Mode to
LiveSync - Close settings
You should see Sync: β‘ or Sync: zZz in the status bar - sync is now active!
- In LiveSync settings, scroll to End-to-end Encryption
- Toggle it ON
- Enter a strong passphrase
- Click Apply
Important: Use the same passphrase on ALL your devices!
Repeat Steps 1-4 on each device (phone, tablet, other computers).
For mobile devices, see HTTPS Setup below.
| Resource | Minimum | Recommended |
|---|---|---|
| RAM | 256MB | 512MB |
| Disk | 2GB | 4-8GB |
| CPU | 1 core | 1 core |
If you have an existing Debian/Ubuntu LXC container:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ril3y/obsidian-livesync-lxc/main/scripts/install.sh)"- Download from Releases
- Copy to Proxmox:
scp obsidian-livesync-*.tar.zst root@proxmox:/var/lib/vz/template/cache/ - Restore:
pct restore 102 /var/lib/vz/template/cache/obsidian-livesync-*.tar.zst pct start 102 pct enter 102 /root/setup-couchdb.sh
Mobile apps (iOS/Android) require HTTPS. You need a reverse proxy.
-
Install Nginx Proxy Manager
-
Add Proxy Host:
- Domain:
obsidian.yourdomain.com - Forward IP: Your CouchDB container IP
- Forward Port:
5984 - Enable SSL with Let's Encrypt
- Domain:
-
In Obsidian, use:
https://obsidian.yourdomain.com
- Install cloudflared in the container:
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb -o cloudflared.deb dpkg -i cloudflared.deb
- Create tunnel:
cloudflared tunnel create obsidian - Route to:
http://localhost:5984
apt install caddy
cat > /etc/caddy/Caddyfile << EOF
obsidian.yourdomain.com {
reverse_proxy localhost:5984
}
EOF
systemctl restart caddyEach user needs their own database. To add a new user:
pct enter YOUR_CT_ID
/root/obsidian-livesync/scripts/create-database.shOr via CouchDB admin UI: http://YOUR_IP:5984/_utils
- Verify CouchDB is running:
pct exec CT_ID -- curl http://localhost:5984/ - Check the URI has no trailing slash
- Ensure it's
http://nothttps://(unless using reverse proxy) - Try accessing
http://YOUR_IP:5984/_utilsin a browser
- Double-check username and password
- Try logging into CouchDB admin UI to verify credentials
- Mobile requires HTTPS - set up a reverse proxy first
- See HTTPS for Mobile Devices
- Check CouchDB status:
pct exec CT_ID -- systemctl status couchdb - Restart CouchDB:
pct exec CT_ID -- systemctl restart couchdb
pct exec CT_ID -- bash -c "
source /root/.obsidian-livesync-credentials
curl -s http://\${COUCHDB_USER}:\${COUCHDB_PASSWORD}@127.0.0.1:5984/obsidian/_all_docs
"vzdump CT_ID --compress zstd --dumpdir /path/to/backupspct exec CT_ID -- bash -c "
source /root/.obsidian-livesync-credentials
curl http://\${COUCHDB_USER}:\${COUCHDB_PASSWORD}@localhost:5984/obsidian/_all_docs?include_docs=true > backup.json
"obsidian-livesync-lxc/
βββ obsidian-livesync-lxc.sh # Main Proxmox installer
βββ scripts/
β βββ install.sh # Standalone CouchDB installer
β βββ create-database.sh # Add databases for more users
β βββ create-template.sh # Export as shareable template
βββ docs/
β βββ troubleshooting.md
βββ README.md
βββ LICENSE
- Obsidian - The note-taking app
- Self-hosted LiveSync by vrtmrz
- CouchDB - The database
- Original guide from r/selfhosted community
MIT License - See LICENSE for details.
Issues and pull requests welcome!
- Fork the repo
- Create a feature branch
- Submit a PR