I’ve recently starting using Obsidian MD for taking notes, having used Google Docs, Notion, Next Cloud and just raw markdown that I wrote in my own style. So far I’ve been liking the mark down approach, with files on my own system. Since the content does not get automatically synced by Obsidian, I’ve decided to use a remote private git repository, hosted by Github, to sync my content across devices. This is fairly easy to do on Mac, Windows and Linux but took a little imagination to achieve on Android. I decided to document my steps in hopes of helping others out, especially because the Obsidian MD app recently was released.

  1. Install the Termux Android app
  2. Install the Obsidian Android app
  3. Generate SSH keys. (see this post for more info)
  4. Upload the public SSH key to Github
  5. Open termux and run the command $ termux-setup-storage. This will create a storage directory in the Termux shell’s home directory, which is symlinked to /storage/emulated/0
  6. Clone your remote git notes repository with Termux, using the git command line, into the /storage/shared
  7. Open the Obsidian android app
  8. Browse to the repository and open it as a vault

As TheDiveO mentioned below, you may have an issue running $ termux-setup-storage the first time. This is a result of the Android permission system. If this happens, simply accept the Android permission popup, and rerun the command.

Once you’ve made a change locally, you simply use Termux to commit and push. Then on another device you may pull down the changes. The procedure is reversed if the changes are made on a device other than your android.

At this point the mobile app with perform a one time index. For reasons unknown, this process does not complete successfully on my Pixel 4A and the application crashes. I’ll update my usage of the mobile app once I figure out how to get around the crashing.

This was caused by the Obsidian Android app attempting to index a rather large (2.5 MB) file that I have. If interested, you can read my forum post discussing this issue here.

For a list of my favorite Obsidian plugins, see this post