How I sync my Obsidian vault across devices
Tags: productivity, git, github, obsidian
Published: 2022-04-11 23:24:56

In the last few days, I’ve trying to improve my productivity and with it  my note-taking system. Over the last couple of years, I've tried  different tools, from [Notion](https://www.notion.so/product?fredir=1), [Evernote](https://evernote.com/), [Google Docs](https://docs.google.com), [Google Keep](https://keep.google.com), etc.  In the end and after many hesitations, research and testing, I have  concluded that the best software for me is [Obsidian.md](http://obsidian.md/).  Obsidian is a handy little program that uses links to connect notes. It  is based on [Markdown](https://en.wikipedia.org/wiki/Markdown), which is a lightweight language used for writing  and formatting plain text documents.

One advantage that Obsidian offers over many other applications is that it is completely free but  within certain nuances. That is, for personal use it is 100% free, you  don't need to register, and it offers access to many plugins and  community support. Thanks to this, the fact that the possibility of  [syncing your notes through Obsidian](https://obsidian.md/sync) is a paid feature was not a  drawback. This is because I have decided to use [git](https://git-scm.com/), software for  tracking changes in any set files, and [GitHub](https://github.com/) as the cloud-based git  [repository](https://en.wikipedia.org/wiki/Repository_(version_control)) hosting service.

In this way, I only had to install  and set up [git](https://git-scm.com/) on my different devices and clone the repository. In case  anyone is wondering, my devices are a desktop pc, an iPad, and a phone  (Android). I built my system as follows:

First of all, I created  the repo on [GitHub](https://github.com/). Afterward, on my pc I installed Obsidian and with  [Gitkraken](https://www.gitkraken.com/), a graphical interface for git, I cloned the repo to my local  machine. For anyone who wants to build a similar system, there is no  need to use Gitkraken, you may directly use git from the [command line](https://en.wikipedia.org/wiki/Command-line_interface) as  well as other graphical interfaces such as [GitHub Desktop](https://desktop.github.com/) or  [Sourcetree](https://www.sourcetreeapp.com/). Then, the only thing left to do was to use my repository as  the base folder for the Obsidian vault.

On the other hand, as for  the iPad, the tools I use are [Working Copy](https://apps.apple.com/us/app/working-copy-git-client/id896694807) and the [Obsidian app](https://apps.apple.com/us/app/obsidian-connected-notes/id1557175442). I must  admit that the setup on my iPad took me a bit longer since I didn't  know how to do it at first, but I don't have any regrets since I have  found the way that best suits my needs. You may pull repos with the free  version of Working Copy, but I think you need the pro version to push  to a repo (You may access all Pro features while you are a student  through the [GitHub Student Developer Pack](https://education.github.com/pack/offers)). To start with the setup, you  need to download the Obsidian app from the App Store and create a new  vault. On the creation screen, you need to make sure that `Store in iCloud` isn’t selected.

Next, after downloading Working Copy will  have to configure the credentials for the git host ([GitHub](https://github.com/), [Bitbucket](https://bitbucket.org/),  [GitLab](https://about.gitlab.com/)…) where you have the repo. Once you are done, clone the repo.  Subsequently, from Working Copy, open the repo, select the “share menu”  and click on the `Setup Folder Sync` option. Under the `On My iPad` section  there should be an Obsidian folder that contains the Obsidian vault  folder which you need to select. This step is crucial because it’s the way to sync the repo with  the vault.

Finally, the configuration that I honestly find the  most time-consuming and complicated. The first thing to do is to install  [Termux](https://github.com/termux/termux-app), an android terminal application, and a Linux environment. There  are two ways to download the latest version of Termux: [F-droid](https://f-droid.org/en/packages/com.termux/) and  [GitHub](https://github.com/termux/termux-app/releases). Once we have successfully installed Termux we must run a series  of commands:

1. `apt update && upgrade`. With this command, we will update all the packages in Termux.
2. `termux-setup-storage` . Allow Termux to access your existing directories.
3. `pkg install git` . Install git.
4. `pkg install gh` . Not needed, but recommended. It’s a command-line tool by GitHub.
5. `gh auth login` . Login into your GitHub account.
6. `git config --global` `user.name` `“your name”` . Global git username associated with commits on all repositories in your system.
7. `git config --global` `user.email` `“youremail@yourdomain.com”` . Global git email address associated with commits on all repositories in your system.
8. `git clone “your repo link”` . Clone the repo to your local environment.
9. `mv “your repo name”/ storage/shared/` . Move the repo to the shared folder so you may access it from any Android app.

When  using obsidian on your different devices, always remember to pull down  the latest repo changes and commit and push any changes you make  afterward!!

Thanks for reading this far!! I will be leaving links  to resources below, in case it helps!! I’m open to constructive  criticism, feedback and suggestions 😊

Resources & Useful links:

* Desktop setup software:
   * [Download Obsidian](https://obsidian.md/download)
   * [Download git](https://git-scm.com/downloads)
   * [Git Windows GUIs](https://git-scm.com/download/gui/windows)
   * [Git MAC GUIs](https://git-scm.com/download/gui/Mac)
   * [Git Linux GUIs](https://git-scm.com/download/gui/Linux)
* iPad setup software:
   * [Obsidian app](https://apps.apple.com/us/app/obsidian-connected-notes/id1557175442)
   * [Working copy app](https://apps.apple.com/us/app/working-copy-git-client/id896694807)
   * [More Git GUIs for iOS](https://git-scm.com/download/gui/ios)
* Android setup software:
   * [Obsidian app](https://play.google.com/store/apps/details?id=md.obsidian&gl=US)
   * [Termux GitHub repo](https://github.com/termux/termux-app)
   * [Termux F-droid](https://f-droid.org/en/packages/com.termux/)
   * [More Git GUIs for Android](https://git-scm.com/download/gui/android)
* Guides, documentation, tutorials…
   * [Git documentation](https://git-scm.com/doc)
   * [Github documentation](https://docs.github.com/en)
   * [Git for Termux](https://dev.to/jyotirmoydotdev/git-for-termux-g14)
   * [How to sync your obsidian vault on android](https://domenicoluciani.com/2021/12/31/how-to-sync-your-obsidian-vault-on-android.html)
   * [Syncing your Obsidian vault to Android via an encrypted GitHub repository](https://renerocks.ai/blog/obsidian-encrypted-github-android/)
   * [How I use obsidian mobile with git on android](https://www.greghilston.com/post/how-i-use-obsidian-mobile-with-git-on-android/)
   * [Obsidian Notes iOS + working copy setup](https://ryan.himmelwright.net/post/obsidian-ios-setup/)
   * [Obsidian: Sync Your Vaults with Git/GitHub](https://youtu.be/H6ipjzaN2WY)
   * [How to use Obsidian remotely with GitHub Codespaces](https://youtu.be/CaqhIoj8MWk)
   * [How do you sync your vaults - Obsidian forum](https://forum.obsidian.md/t/how-do-you-sync-your-vaults/21332/3)
   * [How to sync Obsidian for free using Google Drive](https://gildoncodex.com/articles/how-to-sync-obsidian-for-free-using-google-drive/)
   * [How to sync Obsidian vault for free using Git?](https://desktopofsamuel.com/how-to-sync-obsidian-vault-for-free-using-git/)
   * [Token authentication requirements for git operations](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/)
   * [Awesome Obsidian](https://github.com/kmaasrud/awesome-obsidian)