Tags: #homelab #obsidian #syncthing #truenas #docker #selfhosted #proxmox


!Image Description

๐Ÿ“Œ Objective#

Create a self-hosted, premium Obsidian experience that:

  • Syncs notes across devices (Windows, Android, future devices) ย 

  • Uses Syncthing to replace Obsidian Sync ย 

  • Runs a local Obsidian Docker instance accessible via Cloudflare Tunnel ย 

  • Leverages TrueNAS for data protection and redundancy ย 

  • Avoids vendor lock-in and monthly subscription fees ย 


๐Ÿ—‚๏ธ Step 1: Dataset and User Setup on TrueNAS#

โœ… Create Dataset#


# Create dataset

/mnt/[data-set]/obsidian

โœ… Create User#

  • Username: obsidian

โœ… SMB Share#

  • Shared path: /mnt/[dataset]/obsidian ย 

  • SMB enabled ย 

  • Set ownership and permissions appropriately

โœ… Enable Snapshots & Replication#

  • Periodic Snapshot Task: Enabled ย 

  • Local Replication: Enabled ย 

  • Remote Replication (StarkAI site): Pulls the obsidian dataset ย 


๐Ÿ› ๏ธ Step 2: Syncthing Setup on Proxmox#

โœ… Create LXC Container#

Use Proxmox Syncthing Script

โœ… Mount Dataset#

Edit /etc/fstab in the Syncthing LXC:


/mnt/[dataset]/obsidian /mnt/obsidian none bind 0 0

Then run:


mount -a

โœ… Syncthing Configuration#

  • Folder added: /mnt/obsidian ย 

  • Devices connected:

ย  - Windows laptop ย 

ย  - Android phone ย 

๐Ÿ” All changes sync in near real-time across devices.


๐Ÿณ Step 3: Obsidian Docker Instance#

โœ… Create Docker LXC#

Use Proxmox Docker Script

โœ… Mount Obsidian Volume#


/mnt/[dataset]/obsidian /mnt/obsidian none bind 0 0

Run:


mount -a

โœ… Docker Compose Example#

Create a Docker Compose file for the Obsidian Web instance:


version: '3.8'

services:

ย  obsidian-web:

ย  ย  image: ghcr.io/your/image/obsidian-web:latest

ย  ย  volumes:

ย  ย  ย  - /mnt/obsidian/homelab:/homelab

ย  ย  ports:

ย  ย  ย  - "8080:8080"

ย  ย  restart: unless-stopped

๐Ÿ“ You can use linuxserver.io/obsidian or an unofficial community image.


๐ŸŒ Step 4: Access via Cloudflare Tunnel (TBA)#

๐Ÿ”’ Goal#

  • Use Cloudflare Tunnel for secure remote access ย 

  • Set up authentication with Zero Trust policies ย 

(To be completed…)


๐Ÿงช Future Improvements#

  • Add a watchdog to ensure Syncthing stays up ย 

  • Enable 2FA for Obsidian Web ย 

  • Deploy a read-only replica on mobile via web view ย 

  • Daily offsite backups of the dataset ย 


โœ… Conclusion#

You now have:

  • Redundant, self-hosted, real-time synced Obsidian notes ย 

  • Cross-device compatibility ย 

  • Docker-based Obsidian access anywhere ย 

  • A setup that avoids cloud lock-in