In this guide, I’ll walk you through:
- Installing Obsidian on Ubuntu
- Syncing your vault with GitHub (private repo)
- Making it work seamlessly on Android, even though mobile Git does not support SSH
This setup is stable, version-controlled, and works offline.
Why Obsidian + Git?
- Markdown-based, future-proof notes
- Full version history (unlike cloud sync tools)
- Private repositories = full control over data
- Works across Linux, Windows, and Android
Step 1: Install Obsidian on Ubuntu
Download the .deb package from the official site:
Install using gdebi
First, install gdebi if it’s not already installed:
sudo apt-get update
sudo apt-get install gdebi
Then open the downloaded .deb file with GDebi Package Installer and install Obsidian.
Why gdebi?
It automatically resolves dependencies, unlikedpkg.
Step 2: Create a Private GitHub Repository
- Go to GitHub
- Create a new repository
- Set it to Private
- Do not initialize with README (Obsidian will populate it)
Step 3: Clone the Repository Using SSH (Desktop)
On Ubuntu, navigate to where you want your vault:
cd ~/Documents
Clone the repository:
git clone git@github.com:DasDNS/Obsidian_Notes.git
You should see output similar to:
Cloning into 'Obsidian_Notes'...
Receiving objects: 100% (4/4), done.
Verify the remote:
cd Obsidian_Notes
git remote -v
Output:
origin git@github.com:DasDNS/Obsidian_Notes.git (fetch)
origin git@github.com:DasDNS/Obsidian_Notes.git (push)
Step 4: Open the Vault in Obsidian (Ubuntu)
- Open Obsidian
- Click Open folder as vault
- Select
Obsidian_Notes - Start creating notes
Step 5: Install & Configure Obsidian Git Plugin (Desktop)
- Go to Settings → Community Plugins
- Disable Safe Mode
- Install Obsidian Git
- Enable the plugin
Recommended settings:
- Auto commit on interval
- Auto pull on startup
- Commit message template (optional)
Now your notes automatically commit and sync.
Step 6: Why Android Needs HTTPS (Important)
Obsidian Git on Android:
- ❌ Does NOT support SSH
- ✅ Supports HTTPS + Personal Access Token (PAT)
So we keep SSH on desktop, but create an HTTPS copy of the vault for Android.
Step 7: Create an HTTPS-Compatible Copy (Desktop)
Duplicate your vault:
cp -r ~/Documents/Obsidian_Notes ~/Documents/Obsidian_Notes_HTTPS
cd ~/Documents/Obsidian_Notes_HTTPS
Change the remote from SSH → HTTPS:
git remote set-url origin https://github.com/DasDNS/Obsidian_Notes.git
Verify:
git remote -v
Output:
origin https://github.com/DasDNS/Obsidian_Notes.git (fetch)
origin https://github.com/DasDNS/Obsidian_Notes.git (push)
✅ This repo is now Android-compatible.
Step 8: Copy the Vault to Android
- Connect phone via USB
- Enable File Transfer (MTP)
- Copy the entire folder:
.git/.obsidian/- All markdown files
Recommended location:
Internal Storage / Obsidian
⚠️ Copy the folder itself, not just its contents.
Step 9: Install Obsidian on Android
- Install Obsidian from the Play Store
- Open the app
- Select Open existing folder
- Choose the copied Obsidian folder
Step 10: Git Sync on Android (Access Token Required)
- Go to Settings → Community Plugins
- Enable Obsidian Git
- Open the Command Palette
- Run Obsidian Git: Pull
You’ll be prompted for:
- Username → GitHub username
- Password → Personal Access Token (PAT)
⚠️ This token is mandatory. SSH keys do NOT work on Android.
Once entered, Obsidian Git will:
- Pull updates
- Commit changes
- Push back to GitHub
Final Result
✔ Ubuntu → SSH Git (secure & fast)
✔ Android → HTTPS Git (token-based)
✔ Same private repository
✔ Full version history
✔ Offline-first notes
Final Thoughts
This setup gives you:
- Full control over your data
- No paid sync service
- A workflow that scales from student notes to research archives
If you’re serious about long-term note-taking, Obsidian + Git is worth the setup.
References
I used several community resources when refining this workflow:
🔗 Obsidian + GitLab Setup (Andrew Wegner)
A detailed walkthrough of connecting Obsidian to a Git repository, which helped inform the desktop Git steps in this guide:
https://andrewwegner.com/obsidian-gitlab-setup.html
🔗 Obsidian Android Syncing via GitHub (Reddit)
A community discussion about syncing Obsidian on Android using GitHub and personal access tokens:
https://www.reddit.com/r/ObsidianMD/comments/17odzjb/obsidian_android_syncing_via_github_in_2023/
Top comments (0)