How does it know what config folder to use?

I can use the “Override config folder” setting to change my config folder to a different name, ok. And I think that applies to only the current vault? But the next time I load Obsidian, how does it know where to find the config folder for that particular vault? How does it find the folder with the vault settings if the vault settings tell it what folder to use??

I’m just trying to better understand how it works. I’m trying to set up a system where two people can have different config and cache settings for the same shared vault (using Google Drive, I can’t use Sync for this).

It’s tied to each application’s instance settings, independent of any vault .obsidian directory.

I had a vault on a network drive where 5 people worked on it simultaneously. Each user had their own .obsidian-user directory in the vault. This allowed each person to choose their own theme, plugins, and settings. It also meant each person’s workspace was independent.

Personally, I have an .obsidian and .obsidian-mobile directory to keep my desktop and phone settings different.

1 Like

Ok, but apparently that setting can be different for each vault if you have different vaults (on the same computer). I have one vault setup to use .obsidian-joe and another vault that uses .obsidian still because I didn’t change the settings for that one. It seems to keep track of what config directory to use separately for each vault?

It may be that I don’t really understand what an “application instance” is?

Sorry for the nerd use of the word “instance”. When I use this word, it means running a specific occurrence of Obsidian on a specific device for a specific user.
Wikipedia : Instance_(computer_science)

Continuing on, each user who runs Obsidian on any given device has user setting files for their “instance” of Obsidian running on that specific device. For example, if you install Obsidian on a desktop machine, each user who runs Obsidian will have their own Obsidian configuration file stored in their home profile somewhere outside of any vault. For example, on my Linux machine, I run a flatpak version of Obsidian. I did a search in my flatpak configuration directory, and found the following file mentioned the locations of my .obsidian directories. This appears to be a log file, so I’m assuming my settings are store in a binary format in the same directory somewhere.

/home/username/.var/app/md.obsidian.Obsidian/config/obsidian/Local Storage/leveldb/000012.log

My Obsidian settings files are completely outside of any of my Vaults. On this particular machine, my two vaults are stored in…

/home/username/Documents/notes/Main
/home/username/Documents/notes/scratch

and the file specifying where my two vaults are located is stored in…

/home/username/.var/app/md.obsidian.Obsidian/config/obsidian/obsidian.json

This will be completely different for my Android phone, because Android stores app configuration files in different locations than Linux. The same will be true for Windows. If I were to install a Snap version of Obsidian on my Linux machine, the Snap version of the file would be stored in my /home/username/snap directory somewhere.

I’m note sure what your concern is if the known solution of setting the “Override config folder” works. Whenever a user chooses to run an instance of Obsidian, either their existing personal settings will be used, or in the case of a fresh install, Obsidian will prompt the user to point their “instance” to the location of their desired vault. Then, the user will specify their preferred “Override config folder”. Obsidian will store these choices in the location allowed for each user specific to the operating system that “instance” is running on.

1 Like

I remember for a long time I kept a .obsidian config only to reindex the vault after big changes. Otherwise I have separate config folders for 3 platforms (necessitated by a number of things).

Thank you for that info. But by that definition, I have just one instance of Obsidian. This is on Windows, with just one user account. When I open the Obsidian vault where I changed the Obsidian config folder location, it’s using that customized config folder. But if I open a different vault, where I didn’t modify that setting, it’s using the standard .obsidian folder for that one.

I did discover that if I move my vault with the custom config folder to a different location (move the whole vault to a different folder), then it forgets that I had set a custom config folder location for it. So I think it has some system where it remembers to use a custom config folder location for a vault you have opened previously in a particular path.

Exactly! I think the issue is you’re confusing your vault settings with the Obsidian program “Global Settings”.

The Obsidian program stores its own settings in your Windows home account under the following directory…

%APPDATA%\Obsidian\

In Windows, the %APPDATA% folder is hidden by default to help people avoid accidentally deleting their various program settings. The following link explains how to find it in Windows 11.

https://www.howtogeek.com/885078/cant-find-appdata-folder-on-windows-11-how-to-get-it-back/

This is where Obsidian looks when first loading to know where your vaults are, and the various other application specific settings. By moving your vaults externally to Obsidian, you pull the rug out from underneath Obsidian. When it starts up, it goes to its settings in the %APPDATA%\Obsidian\ folder, looks up the last known location for your vault, and it’s no longer there. This is the same place where Obsidian stores your choice of “Override config folder”.

Ok, so I think the answer to my original question may be that it keeps track of a separate “Override config folder” setting for each vault that you’ve opened in the past with that instance of Obsidian (keeping track of it using the path to the vault), and it stores that info about the vaults somewhere in the global settings.

Perfect!

Think of Obsidian like your web browser and each vault like a specific website such as wikipedia.org, google.com, or apple.com.

Your browser has its own global settings for things like…

  • bookmarks
  • cookies
  • browsing history
  • overall configurations
  • last website visited
  • etc.
    On Windows, your web browser also stores these settings somewhere in the %APPDATA% directory.

Like each of your vaults, each website (for example, amazon.com) has its own files stored remotely on its servers for things like

  • individual webpages (like notes)
  • website specific color choices (like themes)
  • website specific scripts (like plugins)
  • user specific settings such as passwords, username, addresses, shopping purchases, etc. (like .obsidian)

Your browser and each website are separate entities with their own settings, but they work together to create your browsing experience. Similarly, the Obsidian program and each vault work together to provide a complete experience for each user. It’s not a perfect comparison, but it demonstrates how applications can have local and remote settings for each user.

Yeah, I understand that. I think I’m just still going with my initial guess that it seems like it has a way to associate a different config folder setting with each vault (and that info has to be stored in the global settings since it can’t be stored in the .obsidian folder).

I did agree with you the first time :wink: