Obsidian Plugin in Nextcloud

Dear People,

today I wanted to share with you an idea I had when reviewing my workflow with Obsidian and Nextcloud. Since I am currently syncing and using Obsidian over Nextcloud and Nextcloud Notes, which I already wrote about here. I recommend you to check it out, so you get the picture.

Thinking further in this direction, I tought to myself: Why not have a Nextcloud-Plugin, which works like Nextcloud-Notes. You could have your Obsidian Vault as normal, but additionally you would have a webinterface in your nextcloud-instance (since Nextcloud Notes is already doing that with markdown files)?

The cool thing is, you could then have an app on your phone, which syncs with your nextcloud-server (like the NC Notes App). You could even do that with the obsidian-app itself, create a configuration option for Nextcloud instances. Which is kind of a buzzkill for Obsidian Sync, I am aware of that. But I think there lies great potential in self-hosted solutions and I think they could be very well integrated into obsidian.

Thinging even further ahead: Why not develop a self-hosted solution for obsidian and have a server-based licence (I would pay for that).

Please let me know what you think! And also let me know, if you would be up for developing something like that (the NC Plugin, not a Server-based Obsidian - that would be insane as a hobby project).

Cheers!

1 Like

Hi :wave:

I’m newer here and maybe I will use Obsidian as my note software instead of Boostnote app.

But, it’s a pity that Obsidian is not under Free Software license. I wouldn’t extend on this subject, I read about this in another topic ^^’

I’m a web developer for Arawa and I created the Workspace app for Nextcloud.

If the community needs some ressources :

  1. The Nextcloud community forum : https://help.nextcloud.com/
  2. How to generate an application : Generate app - App Store - Nextcloud
  3. The tutorial and developer documentation to develop on Nextcloud : Tutorial — Nextcloud latest Developer Manual latest documentation
  4. A development environment to develop under Nextcloud : GitHub - juliushaertl/nextcloud-docker-dev: Nextcloud development environment using docker-compose

If you need more information, don’t hesitate to contact me here or on the Nextcloud forum via a new topic with my pseudo “z4k”.

Hoping to help you and the community :slightly_smiling_face:

2 Likes

Hi @fschober ,
That would be so great to have Obsidian as a native NC App. I you have the chance to develop this it would be a great gift to the community.

Ahoi
cobii

Let me add my two cents here. Your idea is way overkill, and let me tell you why: First of all, what are the advantages of having a 3rd party Nextcloud app instead of using one of the core apps? Which features would this app actually provide you with, which are not met by Nextcloud Notes?
You are possibly not aware of the complexity of such an app, as you have to deal with a ton of hooks, APIs; just think of “sharing” or “user permissions”. The Notes app is a convenient, yet very complex web interface for collaborative editing. Where does Obsidian come in here? Replicating the power of Obsidian’s desktop functionality in a webUI? Good luck with that.
Nextcloud has very fast development iteration cycles. Maintaining this app would be a nightmare, since they offer a lot of backward compatibility but also upgrade libraries frequently. Lest not forget the sheer number of Nextcloud developers, who drive these iterations. You would need a solid team to maintain the compatibility of an Obisidian app within the Nextcloud realm. That’s not something like “hey, we could raise 2,000 bucks and pay a smart dude for building this” - it is rather “we have to come up with a solid budget of 30,000 bucks to keep that going over the next 6 months”.
You also would need to run client-side development, as the Obisidan desktop and phone apps need to connect to this service.

There are no benefits of a standalone Obsidian app, since the webUI of Nextcloud Notes mostly is about providing users with a convenient edit from anywhere option, whereas most people I have talked to mostly use desktop editors (QOwnNotes, Joplin, also Obsidian) for managing their content and using Nextcloud as their to-go sync service.

Our company is (among many other things) in the field of professional Nextcloud implementation, so we have to make many workflow design decisions for our clients. I honestly would never recommend a setup with an Obisidan-Nextcloud workflow that relies on a 3rd party Obsidian app to our clients.

There is a reasonable alternative though: The Grauphel Nextcloud app basically establishes a WebDAV sync service over Nextcloud for Tomboy and Gnote. I had used Tomboy for many years since I always found it very convenient, before I dropped it in favour of Obsidian.

Also the QOwnNotes API does a wonderful job concerning sync and integration. The developer is fully committed to maintaining both the desktop software and the Nextcloud app. In my opinion it is a much more feasible way to fork this app and adapt it to the Obsidian environment. There is the community plugin Remotely Save which might solve the client-side requirement issues, but I haven’t checked the codebase yet. In my humble opinion it just makes more sense to fork an existing tool and having it hook into the given Nextcloud apps than reinventing the wheel.

I am highly interested in such a plugin, since I am trying to find a workflow design with Obisidan-Nextcloud in a collaborative environment, which is another topic…

i am the author of remotely save plugin, which allows you sync your notes between local vault and remote webdav servers.

nextcloud provides webdav api, so the plugin works with nextcloud.

however my plugin doesn’t treat nextcloud as special, and it just think nextcloud as one kind of webdav “web disk”. So feel free to evaluate the plugin and see if it meets your partial needs.

2 Likes

The plugin is fantastic, it does need a little work to make syncing happier with vaults that contain things other than md documents. Took a fair amount of work to construct the ignore list to sync my vault. Would be a better option if it just skipped the things it could not sync and notify the user that there are unsynced items and to check compatibility or something of the sort.

I made this to answer the question on a few different forums, but I will also post it here for those still on the hunt! With this setup you really don’t need a Nextcloud integration either because you can just use Obsidian when you want, the Nextcloud Notes plugin other times, heck I even use VS Code when I am programming.

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"
]