How to Install Obsidian Notes and Syncthing on a Self-Hosted Docker Server (with Portainer)

I used to use google keep to keep and store notes and also tried different types of open-source and free notes taking apps. I always looked for more convenient way to store notes which might have more features that I like, but nothing I like until discover self hosted Obsidian notes taking app. And found that I need to spent few bucks to store my notes to the cloud and here I came up on self-hosted notes taking app solutions with Obsidian and Syncthing. This two open-source apps helped me to full-fill my requirements and believe me they works excellent. 

If you're a self-hosting enthusiast and would like to sync your notes like me, combining Obsidian Notes and Syncthing is a brilliant way to keep your notes synced across all devices without relying on third-party cloud services. In this guide, I’ll walk you through setting it up using Docker, Portainer, and a bit of configuration magic.

🧱 Step 1: Launch Portainer and Add the "Obsidian" Stack

  1. Go to your Portainer instance - For me it's here:
    https://192.168.22.176:9443/#!/home

  2. Click Stacks, then Add Stack.

  3. Name the stack obsidian.

  4. Use the Docker Compose file from the GitHub repo:
    docker-compose-obsidian.yaml
    .

  5. Modify paths as needed based on your server setup. For example, I created the obsidian folder inside Docker volumes:
    /var/lib/docker/volumes/obsidian/

  6. Hit Deploy the Stack.

  7. Now visit:
    http://192.168.22.176:3000


🗃 Step 2: Create Your Vault in Obsidian

  1. Click Create New Vault.

  2. Name it (I used mimnets).

  3. Click Browse and select Home, then click Open.

  4. Click Create.

Done! Obsidian is now running on your Docker VM.

🔄 Step 3: Deploy Syncthing Stack

  1. In Portainer, add a new stack and name it syncthing.

  2. Copy the code from the repo:
    docker-compose-syncthing.yaml

  3. SSH into your server (I used PuTTY) and create a folder:
    /var/lib/docker/volumes/syncthing/

  4. Also, make sure this folder exists from earlier:
    /var/lib/docker/volumes/mimnets/

  5. In the docker-compose config, carefully modify these two bind mounts:

    - /var/lib/docker/volumes/obsidian:/config
    - /var/lib/docker/volumes/mimnets:/obsidian
    
  6. Deploy the stack.

  7. Access Syncthing at:
    http://192.168.22.176:8483

🔐 Step 4: Configure Syncthing (Local Computer Mac/Windows)

  1. In the web GUI, set a username and password for future access.

  2. Download and install Syncthing on your local machine:
    Windows Installer v1.29.0

  3. First-time setup includes defining a username/password and accessing the local interface:
    https://127.0.0.1:8384

🔗 Step 5: Sync VM and Local Obsidian Notes

Follow these steps to get automated two-way sync:

  1. Get Syncthing VM QR code and scan it from the local Syncthing.

  2. Add the remote device to your local instance.

  3. On the VM Syncthing, add the folder mapped to /obsidian.

  4. On the local Syncthing, accept the shared folder and select your local folder (e.g. G:\Obsidian-Local).

🎉 You're All Set!

Now you can create or update notes from any connected device, and Syncthing will handle the rest in the background!

Comments