Obsidian in NextCloud

Hi Everybody,
I am using Obsidian and I am having issues too many times about the synchronisation between devices. In this case I am using a PC and a Laptop. Both with the Windows Clients v3.7.4.
I have very often duplicates and Problems by the syncronisation.

I am thinking about other solutions.

Is there a way to fix this. I know that changing markdown files can happen every second but It doesn’t that the user should have so many problems.

Maybe there is an easy solution. Thank you in Advance. Have a nice evening.

Michael

2 Likes

Hi @Michael_KasseStimmt,
You are missing the required support template. Please fill this form out and edit into your post.

This will give us the technical info and logs needed to help you! Thanks.

Hi @Michael_KasseStimmt

I know that’s probably not what you want to hear, but Obsidian is not really designed to work with 3rd party server backends and synchronization tools. If you search for “Obsidian” and “Synchronisation” in this forum and also in the wider internet, you will find tons of forum posts and blog posts from people who have issues with Obsidian in combination with 3rd party sync tools. Some of them are using quite adventurous workarounds in order to synchronize their Obsidian data to multiple devices. So this issue is not limited to Nextcloud at all.

I think you have three choices here:

  • You google you’re way through, and with enough thinkering you might get it working, but probably not without occasional hick-ups. Do a separate backup of your Obsidian data if you decide to so!

  • Use the Sync Service of Obsidian. Yeah, I know, It costs money and you have to trust them that they have implemented the encryption right and won’t leak your data. But that’s just the way it is if you are using properitary software and services.

  • Use another tool that is open source and officially supports Nextcloud as a backend, like e.g Joplin. Yes I know that Obsidian has some unique features that Joplin doesn’t have.

3 Likes

Hi @bb77,

thank you very much for your reply.

Yes, I thought about all what you wrote down.

I was thinking about the Sync Services of Obsidian as well. If It costs and it works, it doesn’t matter, but the possibility about leaks of my data could be an issue for me.

I spoke with our IT-Admin. He said, that a customer of us said, that with the Version 25.0.3 there are less problems with syncronisations. We still use the version 25.0.2. Maybe the update will also help. I hope so.

Joplin or Logseq are also great tools. I know, but I am really happy with Obsidian and I would like to find the best solution for this tool.

I was hoping to find here THE solution, but I understand how difficult it is to keep up with the syncronisation, when so many files update theirselves in so short time. Github was also an Idea, but I will try again with nextcloud and with the new version on the server. We will see, how it works.

Thank you again. I appreciate that you took time to write those suggestions down.

Have a nice day.

Michael

2 Likes

I don’t think there are such huge improvements from 25.0.2 to 25.0.3
 the root cause of the issue is your application changes files locally much faster than the sync to the 2 devices you own can follow. Maybe you could change the approach - e.g. if you work on one system at the same time stopping Obsidian on inactive device could help already (so you have only one active sync at time).

If it’s enough to have one instance of the application active at the same time you could mount you NC via webdav and store the files there. Most applications don’t like concurrent access to it’s files - here you need to stop the application when you stop using a device as well but you have consistent storage on Nextcloud usable from both devices (but this approach definitely doesn’t scale well)

Thank you @wwe

Yes, I thought that this is the problem. You are right. I saw that if I use Obsidian just on one Device, it works good. My problem is that, sometimes I am in a meeting, I take my laptop and I work on it and on my main PC ist Obsidian still running. I will try to be careful and do as suggested and have always just one instance open. I think it should be doable. On my 2 devices I always leave Obsidian to start automatically. On my phone I start it only when I have to, because I do not have my laptop by me. I will change my approach and I will hope to see the improvements of the syncronisation.

Thank you for your time. Your comment is really appreciated. Have a wonderful day.

Michael
‘Never let a day pass that will make you say, “I will do better tomorrow”.’

If you want help on this forum please do us the favor of filling out the support template so we can at least confirm what is actually happening. Thank you for your consideration.

Hi @Michael_KasseStimmt,
You are missing the required support template. Please fill this form out and edit into your post.

This will give us the technical info and logs needed to help you! Thanks.

Not sure you’re still searching for a solution, but anyways, I did not try it myself (still working on putting my Nextcloud server up), but I found this blog post: https://medium.com/@ladislavGazo/obsidian-and-nextcloud-is-a-match-made-in-note-taking-heaven-1eb4dd784489

Once I have my server up and running, host Obsidian files will be my next step.

Hello,
I’m also using Obsidian. And my solution with the synchronization issues is: I stored my Obsidian Vault on an USB-Stick with USB-1 and USB-3 connector. So I can work on every PC/Android. I’m working this way since about 2 months and had so far no issues with that.
In addition I recommend the “secure safe” plugin, with the option ‘only push’ the synchronization to Onedrive. As an additional (plan B) backup, I zip the Vault in a regular time period.

regards

Hi @ABeltz,

I didn’t think about this kind of solution.

I am closing Obsidian before I use it on another Device. Sometimes I have some issues with the data.json file, but usually it works well. Much better then how it worked with older versions.

I am using a laptop for work and when I start my laptop and I am at work on my main pc, I programmed a script in Autohotkey that asks me If I want to start Obsidian after Windows loaded. I say no and everything works fine. That’s is a solution that works for me. Sure, on Android, I cannot do something like that, but I am a pc/laptop user
on my smartphone I use Obsidian one time every 6 months
and wenn I use it, I need to syncronize it and it’s a nightmare.

Thank you for sharing your experience!

ML

Intro

I went down this road hard, and for anyone who stumbles onto this, there is still no official integration, however, I found a way that works 99.9% of the time flawlessly. It does involve a bit of setup depending on how exactly you want to access your notes. For me, I wanted to be able to pull them up in Nextcloud, through Obsidian, through Windows Explorer, and any web service I am working in, such as Codeserver (VS Code).

Again, for me I wanted to basically access my notes from anywhere with anything. This is because my vault is not just my notes, it is also all my configurations, settings, etc for my entire codeserver. This is the way

Database Location

This is where you may or may not have to change your setup based off of your conditions. The issue is, you cannot touch a file in nextcloud without using nextcloud to sync easily. Yes it can be done, but it is a pain to have to manually sync the database after every change. The solution is to use external storage. Set it up through nextcloud and when you use nextcloud sync or the web gui or anything else you can still access and tweak your files as needed. You lose no functionality. If you are running the all in one docker container you can also just add it to the borg backup as well so you are backing up your files.

Sync Methods

Nextcloud Client

This works good on PC’s. It is one of the best options there is. Depending on your setup, you may have to tweak the ignore list to get it to work seamlessly.

SMB Share

This one is what I use. So because I am using external storage for my vault, I can also set it up to utilize SMB. Can you use webdav instead? Yes, but from my experience it caused syncing issues. First set up your vault to use SMB, then map the drive on your PC’s. Set up the obsidian app to use that drive. Now you can access your files from Obsidian or File Explorer.

Remotely Save

You will set this up as a webdav directly to nextcloud. I have to admit, I about gave up on getting this to work. For most people there will be no issue and it will work great. For me it was an absolute pain to setup. The reason again was because I store much more than just markdown documents in my vault. Remotely Save is picky about what it wants to see in the vault. For example ZIP files. What happens is the sync will terminate and never fully sync as it is seeing things it does not know how to deal with. This can be fixed by tweaking the ignore list in remotely save itself, for me these were the two most important ones.

.*\.gitignore$
.*\.zip$

Obsidian Docker Container

While I would not recommend this as a long term solution, it does work well. What it does is spin up a docker container that has Obsidian installed already. You point it to your vault and bam, it is just like it is a local install. I have this then setup thru Traefik so in a pinch I can just go to web address I have setup and access my vault. This is handy for if you need access on a public / friends PC for whatever reason.

services:

  obsidian:
    image: lscr.io/linuxserver/obsidian:latest
    container_name: obsidian
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - obsidian_config:/config
      - /mnt/Media/Apps:/mnt/Media/Apps
    ports:
      - 3003:3000
      - 3005:3001
    shm_size: "1gb"
    restart: unless-stopped
  
volumes:
  obsidian_config:

Conclusion

In conclusion, I can access my vault from basically anywhere anytime. In the past several months I have had zero issues with syncs other than personal error, aka I add something to my vault that makes one of the syncs angry or my SMB server decides it wants a reboot.

There are a ton of fantastic addons as well in Obsidian you can use if you are trying it out for the first time. Here are a few of my favorites:

[
  "remotely-save",
  "table-editor-obsidian",
  "calendar",
  "codeblock-customizer",
  "cmdr",
  "dataview",
  "obsidian-excalidraw-plugin",
  "obsidian-icon-folder",
  "obsidian-kanban",
  "omnisearch",
  "obsidian-outliner",
  "quickadd",
  "remember-cursor-position",
  "obsidian-style-settings",
  "obsidian-tasks-plugin",
  "templater-obsidian",
  "vscode-editor",
  "sheet-plus"
]
5 Likes