Global Settings / Same settings, themes, and plugins across multiple vaults

Use case or problem

I have many sets of notes, for different purposes: Work General, Work Projects, Work Research, Hobbies Projects, Hobbies Research, Personal.

Tweaking settings across all is tedious as many are vault local settings. However Obsidian does have a default set for new vaults ( just don’t know where this is stored).

Proposed solution

I propose a hierarchical settings model similar to what is implement in the *Nix world:

  • Default ( /etc/default/xxx)
  • System ( /etc/xxx)
  • Local ( ~/xxx)

I understand this may or may not be possible on the architecture of the application code. But this is a fairly common overlay model used by many applications built using frameworks, and I am sure it is possible under the Electron framework.

In effect

  • Default: Obsidian Project Creators proposed settings.

Modified by package updates and/or manual editing of the skeleton file

  • System: A System (.obsidian) file that contains deviations to the Default. Stored in applications config folder.

Modified using the settings dialog, when a radio selector is activated.
In this mode the change settings become applicable on all vaults, not only the active vault.

  • Local: A (.obsidian ) file local to the vault, that has deviations to the Default/System settings.

Modified using the settings dialog, when a radio selector is deactivated.
In this mode the change settings become applicable only to the active vault.

Current workaround (optional)

Related feature requests (optional)

Related topics referenced in topis above, but no longer resolving

  • https://forum.obsidian.md/t/allow-specifying-the-obsidian-folder-location/16452
  • https://forum.obsidian.md/t/custom-default-vault-settings/6613
  • https://forum.obsidian.md/t/copy-current-vault-settings-to-new-one/36134

Scrolling through the many comments on this original topic (Global Settings / Same settings, themes, and plugins across multiple vaults) which prompted me to post the topic. I see a similar suggestion to what I am proposing was also made.

I reference that reply here to make this topic easier to read.

I don’t suppose you have links to the posts that those broken links appear in? I put them in search but only got your posts.

These links above were extracted from the initial posting ( Global Settings / Same settings, themes, and plugins across multiple vaults - #4 by obsequious ) , but returns this message when clicking on the link: Oops! That page doesn’t exist or is private.

Thanks! When I copy-pasted the addresses from your post, I saw that message. But clicking the links in the post you got them from, I see those posts were deleted and their comments merged into another thread. (I guess I had pasted them into a browser where I was logged out and can see them now because I’m a moderator.) So you’re not missing anything. I’ll add a note to that post; sorry for the inconvenience.

Adding another vote to this feature. I just started using Obsidian and was playing around with test vaults to get the hang of things; made a new one and all the plugins I’ve set up are gone. Very frustrating for someone trying to onboard; I can also imagine it being frustrating in the future were I to keep using Obsidian and have multiple vaults, which seems like a reasonable expectation of how to use it.

1 Like

I was frustrated about the same problem so I started to create a plugin to solve this. Recently my plugin Settings profiles was released. I think this could solve some of the problems mentioned in this thread. I hope you give it a try and it can solve this problem for you. I would also be happy to receive feedback or suggestions for improvement.

1 Like

Can you comment a little on which parts it addresses?

1 Like

Same question as @argentum. I read the github description but would like to know more about how it works.

Also, what’s the effect on vaults synced to mobile, since it doesn’t support the mobile app?

The initial post mentions 3 options to solve the problem that you need to configure your settings, styles, plugins in each vault you have. My plugin is Option 4 you can create a profile where your settings get stored and you can then load them from other vaults.

  1. You only need to download “Settings profiles” in an existing vault.
  2. Create a profile, you can select what you like to synchronize, and save the settings in it.
  3. Than you can go to an different vault download “Settings profiles” there too.
  4. Load the profile you created in the other vault and everything you selected in the profile gets loaded.

You can also create multiple profiles if you want different settings that you can easily switch between.

At the moment mobile is not tested. I marked it as not mobile capable because it accesses the documents folder and saves the profiles there. I’m not sure if this is possible without additional work.

2 Likes

I see that in configuring your profile you pick a location on your computer. I assume all settings from the vault get copied there. And then when you open another vault and configure the profile to that location, settings get copied from there to your vault. And I guess after that it follows the simple sync algorithm “if profile is newer copy to vault; if vault is newer, copy to profile.”

I’m pondering how that works with multiple computers, with say dropbox sync. I could point this tool at a second dropbox folder, so my profiles are always synced to the net as well. What could go wrong?

This would be best if the path could be “…/Profiles/” as relative to the vault, supposing dropbox and vaults are not at the same drive location on each machine.

But I’m vaguely worrying about overlapping syncs.

In any event, the plugin does not support relative paths, so I can’t do it.

I tried using absolute paths, the same on every computer to the profile, but the overlapping sync problem bit me, so sadly this can’t work.

Currently you can disable AutoSync and the settings from the profile will not be automatically loaded while the plugin is loading.

For your setup, the plugin needs many more options to be able to configure it.

Supporting an arbitrary number of vaults is harder than my case of supporting exactly 2 vaults. I have solved my case using the shell plugin so I can from one vault copy settings to the other vault, when i need to.

+1 to these requests for global (across vault) settings.

1 Like

I’ve used this for a while now, and it works well subject to caveats:

  • don’t modify settings (themes, css, plugins, options) on two vaults at the same time.
  • remember to run sync after modifying settings on a vault.
    • I wonder if there’s a way closing of settings could trigger this? The Shell Commands plugins has a bunch of automatic triggers, but none for closing Settings. Too bad.
  • you would have to reload a vault after copying-in settings to get the changes loaded.

The system could easily be extended to multiple vaults by implementing this pseudo-code.

   fun copy_from(source):
       for each directory in obsidian_vaults
            if directory is not source
                copy_from_to(source, directory)

I liked OP but want to emphasize this comment above:

  1. User-specific global settings and plugins
  2. Workspace settings and plugins that override global settings. Only the individual modified (different) settings should be stored i.e. don’t copy the entire user-specific json. Read both and the workspace json should contain only the overriding setting.
  3. Show in the UI which settings are modified in user/workspace
  4. Allow in the UI for the user to reset a setting to app/user default

i.e. what Visual Studio Code does. It is just perfect.

2 Likes

How about this as a quick fix. It doesn’t handle syncing of settings, but I think it handles most of what people are requesting otherwise. Obsidian knows about at least some of my vaults because they show up under manage vaults and I can switch between them. This appears to be stored per user profile somewhere already, as in not in each vault. How about when I create a new vault or open a vault that doesn’t already have settings i.e. a .obsidian folder in it ask me if I want to copy settings from another vault in that list. Give me a checkbox to include/exclude plugins and another to include/exclude plugin settings.

Files required by any of those settings are probably hard to enumerate since obsidian doesn’t know what settings a plugin uses to reference templates or other special files, so maybe warn that any templates or other files need to be copied manually. We could also add another checkbox to copy all files from the source vault into the new vault and if there is anything that would be overwritten prompt about whether to overwrite or not.

Then, for a longer-term solution, allow me to compare my current vault settings with another vault and either copy them all or maybe copy only settings not set in the current vault. Similarly for dependent files we could also allow me to copy files from the source vault.

1 Like