Private and shared vaults

Rationale

You want to use Dendron for personal and professional use, keeping some notes private, while sharing others with other team members (or even yourself! -i.e. different machines). Some of these notes, in turn, may be published, whereas others, not.

Some specific use cases in which following a Multi Vault Setup strategy would be recommended are:

  • for sensitive notes, multi-vault enables local only vaults vs vaults that can be synced on file sharing services like Dropbox
  • for modularizing knowledge, multi-vault enables users to mix and match existing vaults depending on context
  • for federating and curating knowledge, multi-vault enables users to publish/subscribe to public vaults using protocols like git
  • for access control, multi-vault lets users configure specific vaults to be private which turns off publication and sharing of any notes inside said vault

Overview

Create a blank worspace that will have multiple vaults, each serving different purposes and audiences. Each vault can be independent git repositories that can be shared with others as you would with a regular git repository. The workspace, itself, can also be a git repository.

Step by step

Start from scratch

  1. Create a bare workspace. This workspace will be blank and contain all the needeed vaults as well as the templates and configurations.

    Bare Workspace

    A bare workspace is a workspace where all vaults inside are remote vaults (separate git repos). You can have a bare code workspace or a bare native workspace.

    1. Run Dendron: Initialize Workspace command.
    2. Type the location where you want it to be stored
    3. Select blank
  2. Add as many Vaults as needed, each one serving different purposes or audiences.

    1. Create a local vault for notes that will not be shared (more info here):
      1. Run Dendron: Vault Add
      2. Select local
      3. Type the location where you want it to be stored
      4. Type the name of the vault (can be different from the folder's name)
    2. Add a remote vault for notes that will be shared (either with yourself or with others). You can clone a remote vault or create a local vault that you convert into a remote one:
      1. If adding remote vault(s) that already exist:
        1. Run Dendron: Vault Add
        2. Select remote
        3. Write the git location of the remote vault you want to clone
        4. The vault will be cloned inside your workspace
      2. If converting local vault(s) into remote vault(s):
        1. Run Dendron: Convert Vault
        2. Select the name of your local vault that you want to convert
        3. Select Convert to remote vault
        4. Type the git location where you want to store your remote vault
  3. Create notes in the desired vault using the demo.lookup (Private) tool.

    Lookup

    Lookup supports multiple vaults. When using lookup to find a note, each search result is labeled with which vault it belongs to.

    Vault Location when Creating a Note

    When creating a note in lookup, Dendron will try to create your note in the correct vault. By default, it will place the note into the same vault as the currently opened note. But if it detects that the new note matches an existing hierarchy in a different vault, you will get prompted to pick the destination vault:

  4. Synchronize notes by running Dendron: Worskpace sync

    Syncing your workspace with Git

    Workspace Sync does not sync the workspace if all your vaults are separate git repos. In order to synchronize your workspace, you need to explicitly do a git pull from the workspace folder.

    If you are inside VS Code, you should be able to run > Create Integrated Terminal..., choose the folder containing your workspace, and launch the terminal. After launching, run a git pull inside of it.

Use template

Alternatively, you can use this template from the Teams page:

Workspace

We recommend getting started by using the example in our GitHub template.

This will create a workspace with the following structure

.
└── workspace
    ├── org-private
    │   └── notes
    │       └── ...
    ├── org-public
    │   └── notes
    │       └── ...
    └── org-dev
        └── notes
            └── ...

Vaults

main

  • org-private:
    • for company private notes (eg. roadmap, projects, meetings)
  • org-public:
    • for public notes (eg. wiki, blog, faq)
  • org-dev:
    • for developer related notes (eg. coding guidelines, docs, rfcs)

Acknowledgement

This guide is based on this gist