Obsidian iOS sync with a Dev's touch
Last updated
Last updated
While there are several free methods available, such as using Google Drive or iCloud, to synchronize notes across different devices, there was still a desire to achieve note synchronization via GitHub. This desire gave rise to the concept of employing the Obsidian-git plugin in conjunction with the iOS app Working Copy, which, at the time, offered a robust free solution. However, it's worth noting that Working Copy has since implemented a one-time lifetime payment of $24 for its iPhone push functionality.
This new development prompted me to explore alternative approaches to address this situation. That's when I came up with the idea of utilizing a spare Raspberry Pi (or any remote instance, I am going to user my Pi) in combination with an Apple innovation: the Shortcuts application. Apple Shortcuts, when configured with the appropriate user permissions, enables the execution of scripts over SSH. As a result, I created a shortcut, outlined below:
Now, I will elucidate the steps for crafting a Git-Push Shortcut and configuring Git over SSH on a Raspberry Pi:
Create a new shortcut as shown below:
Note: Please substitute the folder named Voidd with your specific folder name and ensure to include the hostname, IP address/domain of your remote server, and the necessary user credentials, such as a username and password if authentication is required for the connection.
Directory Structure of my Obsidian Vault/Folder is depicted below:
Voidd._ > CISSP > Domains.md
SSH script used in the shortcut:
Next, generate a Bash script named "git-bash.sh" in the directory where you've extracted the necessary files. This script will streamline and automate various Git-related tasks:
Now, we are fully prepared to synchronize our notes across iOS devices using Git.
Our Shortcuts Automation takes care of the synchronization process by invoking the Working Copy pull shortcut each time we access Obsidian notes and utilizing the Custom Git Push Raspberry Pi shortcut upon closing the application.
It's important to note that this approach is primarily intended for educational and learning purposes, as it may be more intricate to set up compared to simpler alternatives.
We appreciate your time and consideration.
To implement the process of pulling changes from Working Copy and Obsidian-git plugin, along with setting up automation using the Shortcuts app, you can follow the detailed guide provided at this link: . The only variation in this setup is that we will replace the standard push shortcut with our customized version.
Utilize the provided guide, "," to configure SSH connectivity to GitHub on your Raspberry Pi. This setup eliminates the need for user interaction when supplying your Git username and password combination. Additionally, add Git remote for your repository where your notes are stored.