Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

ObsidianEncryptedCloudSync

These are scripts to encrypt Obsidian vaults at rest and to sync them over the cloud.

A setup and shell scripts to use a public cloud service as Dropbox to sync encrypted Obsidian Vaults between Mac an/or Linux and/or Android devices. No root needed.

When closing the vault, the script will create an encrypted 7z archive of the vault and upload it to the cloud. After closing, all unencrypted notes are deleted.

To retrieve your notes, the script will make an unzipped copy of the archive available locally.

Installation

Mac / Linux:

  1. Create a cloud linked folder (such as ~/Dropbox/Obsidian_Cloud)
  2. Create a local folder that is not linked to the cloud (such as ~/Obsidian_Local)
  3. Place your vault to be encrypted and synced in Obsidian_Local
  4. Rename vault to private_notes
  5. Optional if you want to sync Obsidian settings across devices:
  • Open private_notes in Obsidian
  • create a symbolic link to local folder ln -s ~/Dropbox/Obsidian_Cloud/.obsidian ~/Obsidian_Local/
  1. Install 7-zip
  2. Zip and encrypt your private_notes using Terminal 7z a -mhe -t7z private_notes.7z private_notes (You will be prompted for a password. Note it down!)
  3. dowonload toggle_private.sh from repository and place it anywhere on your computer
  4. Edit script to adapt to your local and cloud paths in the heading
  5. Make script executable chmod +x toggle_private.sh
  6. Optional in Mac: Make skript a command as to execute it on click mv toggle_private.sh toggle_private_vault.command

Android:

  1. Install Termux and Termux Widget
  2. Install Cloud Service App (as Dropbox) of your choice
  3. Install a Folder Sync App of your choice (as Dropsync)
  4. In File Manager, create a Obsidian_Local folder anywhere on your device
  5. In the Folder Sync App, pair Obsidian_Local with Obsidian_Cloud.
  6. In the Folder Sync App settings, exclude pattern private_notes to be synched.
  7. Download toggle_droid.sh from repository to your device
  8. Edit script to adapt to path to your Obsidian_Local folder
  9. Open Termux and move script: mkdir .shortcuts; mv /path_to/toggle_droid.sh .shortcuts
  10. Make script executable chmod +x .shortcuts/toggle_droid.sh
  11. Type 7zand install the package as instructed. Should you recieve a package unavailable error message change mirror: termux-change-repo
  12. On your Android launcher, start Termux Widget and make a widget pointing to toggle_droid.sh

Usage

(on any device)

  1. Start toggle_private or toggle_droid respectively through click or via command line
  2. If vault is open, you will be promted to close it
  3. If vault is closed, you will be prompted for password to open it

File Creation Dates

Zipping and unzipping may distort the order of note creation shown when displaying a list in Obsidian's file explorer. To account for this, the scripts include a loop to reset file creation dates to dates set in note yaml metadata. To make use of this, set a template to begin your notes with this heading:

---
created: YYYY-MM-DD HH:MM

e.g.

---
created: 2022-01-20 17:01

If you do not care about file creation order, simply remove the loop from the scripts.

About

Scripts to encrypt Obsidian Vaults and sync them over the cloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages