# Obsidian iPad syncing via iSH git (Windows, Linux, Android)

**URL:** <https://forum.obsidian.md/t/obsidian-ipad-syncing-via-ish-git-windows-linux-android/30629>\
**Category:** Workflows & Templates\
**Tags:** linux, sync, ios\
**Created:** [January 15, 2022, 4:08am UTC](https://forum.obsidian.md/t/obsidian-ipad-syncing-via-ish-git-windows-linux-android/30629 "2022-01-15T04:08:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DannyQuah](https://forum.obsidian.md/user_avatar/forum.obsidian.md/dannyquah/32/86053_2.png) [@DannyQuah](https://forum.obsidian.md/u/DannyQuah)\
**Post date:** [January 15, 2022, 4:08am UTC](https://forum.obsidian.md/t/obsidian-ipad-syncing-via-ish-git-windows-linux-android/30629/1 "2022-01-15T04:08:14Z")

</div>

Platform: iOS  
Obsidian Mobile version 1.0.5  
Obsidian Desktop version 0.13.19

This describes using Obsidian on iPad while syncing to other Obsidian platforms. The procedure uses `git` in `iSH` on `iOS`, and thus differs from using either `Obsidian Sync` or `Working Copy` as described in [Obsidian/iOS+app](https://help.obsidian.md/Obsidian/iOS+app).

(To be clear, `Obsidian` is one of my favourite Apps, and I’m all for supporting the team financially. Moreover, everything I’ve heard suggests the paid `Obsidian Sync` is excellent. However, I don’t want my syncing processes to proliferate — each service using a different client sync flow — so I keep my systems minimal: just `syncthing` and `git`. After writing this I found an [Obsidian Forum writeup](https://forum.obsidian.md/t/mobile-sync-with-git-on-ios-for-free-using-ish/20861) which uses the same tools I do to achieve the same goal, but you’ll want to read that with its accumulated contributions dispersed across the comments. So at least I was thinking about all this right 😇. Here, I just provide a linear, consistent run-through.)

I couldn’t just begin using Obsidian on iPad directly as its instructions suggest, because I already have an Obsidian vault on my desktop. How do I bring that information over? iPad Obsidian does not let you open a folder on the iPad filesystem as a vault. And even if it did, how do you get your files into iPad’s filesystem? Instead, iPad Obsidian opens up to give you only the option to create a new vault or to set up syncing through Obsidian Sync or Working Copy.

On desktop and Android, however, Obsidian is perfectly content letting you “Open folder as vault” acknowledging you likely already have existing folders of Markdown files. I wanted the same experience. True, iOS is relatively more closed than other platforms, but Obsidian elsewhere only needs a filesystem, folders, and Markdown files; nothing extra. On other platforms if I need to pop out and edit my Markdown files using something like `gvim`, I do so and come back into Obsidian again seamlessly, with all the changes I made reflected in my Obsidian interface. Surely iPad Obsidian must be able to leverage exactly the same structure that its same underlying code already uses elsewhere else.

It turns out this is possible. I do this using on the iPad a Linux command-line environment `iSH` and code-management system `git`; and on the desktop, related tools I already use there.

By “desktop” here I mean interchangeably your notebook, your desktop, your Android, … basically every platform where Obsidian lives for you and on which you can run `git`, but that is not your iPad.

### iPad preparation

I’m going to describe how I got my Obsidian vault on my desktop into iPad Obsidian to use. If you need to do this in the opposite direction, the steps I describe will of course need be adjusted appropriately.

Initialize iPad for Obsidian use:

- (If needed) Install `iSH` on iPad.
- (If needed) Install `git` in `iSH`.
- (If needed) Install `doas` in `iSH`.

Because `git` will need to write into folders and files that are owned by the Obsidian process, not just your `iSH` login, you will need to invoke `git` everytime either as `root` or using `doas`.

### Initialize iOS Obsidian vault and iSH git repo

1. (If needed) On [github.com](http://github.com) create `myWp` repo, and `git push` desktop’s already-extant Obsidian vault folder up to it.
2. iPad\>Obsidian \> Create new vault `Wp`; exit Obsidian
3. iPad\>`iSH`:  
a. If needed, make mountpoint `mkdir -p /mnt/dq/Obsidian` (I make all my mountpoints contain my user login name `dq`, but it’s unnecessary and you’ll obviously want to adjust this for yourself. I just like things to look clean.)  
b. `mount -t ios null /mnt/dq/Obsidian` (File picker appears, select Obsidian to associate with this mountpoint.). Mounting Obsidian rather than a specific vault means this method will work with multiple vaults. Subsequently just `cd` to the appropriate folder when in `iSH`.  
c. Either as `root` or using `doas` (obviously replace the GitHub URL with your own):

```auto
cd /mnt/dq/Obsidian/Wp
git init
git remote add origin https://github.com/me/myWp.git
# Some users might have to do a "git add" and "git commit" before
# a local branch is available to rename. I didn't, so...
git branch -M main
git pull --rebase origin main # This might take a while
git push -u origin main

```

Open iPad\>Obsidian and check that the contents of `myWp` are now available on the iPad’s Obsidian vault `Wp`.

The sequence of steps 1.-3. above means three items are now in sync: (1) Obsidian vault folder on desktop; (2) Obsidian vault `Wp` folder on your iPad; (3) GitHub repo `myWp` containing the contents of your Obsidian vault folder.

### Normal work cycle

Whenever you want to work on iPad\>Obsidian:

1. Go to iPad\>`iSH`; (if needed) `mount -t ios null /mnt/dq/Obsidian`; `cd /mnt/dq/Obsidian/Wp`; `git pull`.
2. Work away on iPad\>Obsidian.
3. When done, go to `iSH`; (if needed) `mount -t ios null /mnt/dq/Obsidian` (choose Obsidian); `cd /mnt/dq/Obsidian/Wp` (or the appropriate other Obsidian vault sub-folder); `git add .; git commit -m "Message"; git push`.
4. (Optional) If I’m putting iPad aside for a while, I like to `umount /mnt/dq/Obsidian`, but that’s up to you.

Whenever you want to work on desktop\>Obsidian:

1. In a shell go to your Obsidian vault folder, and `git pull`.
2. Work away on desktop\>Obsidian.
3. When done, in a shell go again to your Obsidian vault folder, and `git push`.

### Additional notes

1. The `.gitignore` in my Obsidian vault folders contain at least the line `.obsidian`. This folder can always be created as needed from the Obsidian app based on the data I provide in the vault, and I prefer each platform to have its own Obsidian customization. Moreover, the data I want to share are data I create myself, not information and cache that an app puts together, relatively invisibly, from my data and actions, and that might be finetuned to a specific filesystem and directory structure. So, yeah, `.obsidian` is in my `.gitignore`.
2. An alternative to using `iSH`, `mount -t ios`, and `git` is to use the (for these purposes) workalikes `a-Shell`, `pickFolder`, and `lg2`. These latter are all fast and good. Personally, however, I like having a full-blown linux distro on my iPad so I would choose `iSH` in any case. But, on the other hand, `git` on `iSH` continues to face issues of sporadic hanging on `commit` and `pull` (e.g. [ish-943](https://github.com/ish-app/ish/issues/943), [ish-1640](https://github.com/ish-app/ish/issues/1640)) so having `lg2` around or even as the main `git`-work client can be useful.
3. It would be excellent if iPad\>Obsidian could just use any folder available in iPad’s Files App. Right now, it can only pick up vaults created from within it in the first place. That is why I had first to create the empty vault before mounting Obsidian from `iSH`. The way things are now iPad’s Files app can see my entire `iSH` filesystem. If Obsidian could too, I can then skip the `mount` and `umount` steps.

(I might not get to update this online copy subsequently. So, as needed, look at the SOT version on GitHub [Obsidian on iPad syncing via iSH, git, and GitHub · GitHub](https://gist.github.com/DannyQuah/f686c0e43b741468e12515cd79017489) )

---

<div class="post-metadata">

**Author:** ![SpocWeb](https://forum.obsidian.md/user_avatar/forum.obsidian.md/spocweb/32/42587_2.png) [@SpocWeb](https://forum.obsidian.md/u/SpocWeb)\
**Post date:** [February 6, 2023, 8:27pm UTC](https://forum.obsidian.md/t/obsidian-ipad-syncing-via-ish-git-windows-linux-android/30629/2 "2023-02-06T20:27:06Z")

</div>

Hi, iSh works fine on my iPhone, but when trying to clone it asks user-name and password, whereas Github has disabled Password Auth.

I suppose I have to register an ssh key right? Could you explain the steps to authenticate?

---

<div class="post-metadata">

**Author:** ![zanodor](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/z/b5e925/32.png) [@zanodor](https://forum.obsidian.md/u/zanodor)\
**Post date:** [February 6, 2023, 8:51pm UTC](https://forum.obsidian.md/t/obsidian-ipad-syncing-via-ish-git-windows-linux-android/30629/3 "2023-02-06T20:51:39Z")

</div>

You use the token same as (instead of) the password. Go check out the other thread I advised you the other day.
