Setting Up Obsidian on Ubuntu and Syncing with Git & Android (Step-by-Step)
Source: Dev.to
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:
https://obsidian.md/download
Install using gdebi (it resolves dependencies automatically):
sudo apt-get update
sudo apt-get install gdebi
Open the downloaded .deb file with GDebi Package Installer and install Obsidian.
Step 2: Create a Private GitHub Repository
- Go to GitHub and create a new repository.
- Set it to Private.
- Do not initialize with a README (Obsidian will populate it).
Step 3: Clone the Repository Using SSH (Desktop)
cd ~/Documents
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 and enable the plugin.
Recommended settings
- Auto commit on interval
- Auto pull on startup
- (Optional) Commit message template
Your notes will now automatically commit and sync.
Step 6: Why Android Needs HTTPS (Important)
- Obsidian Git on Android does NOT support SSH.
- It does support HTTPS with a Personal Access Token (PAT).
We keep SSH on the desktop and create an HTTPS‑compatible copy of the vault for Android.
Step 7: Create an HTTPS‑Compatible Copy (Desktop)
Duplicate the vault:
cp -r ~/Documents/Obsidian_Notes ~/Documents/Obsidian_Notes_HTTPS
cd ~/Documents/Obsidian_Notes_HTTPS
Change the remote from SSH to 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)
The repository is now Android‑compatible.
Step 8: Copy the Vault to Android
- Connect the phone via USB and enable File Transfer (MTP).
- Copy the entire folder, including:
.git/.obsidian/- All markdown files
Recommended location on the device:
Internal Storage / Obsidian
Note: Copy the folder itself, not just its contents.
Step 9: Install Obsidian on Android
- Install Obsidian from the Play Store.
- Open the app and select Open existing folder.
- Choose the copied Obsidian folder.
Step 10: Git Sync on Android (Access Token Required)
- Go to Settings → Community Plugins and enable Obsidian Git.
- Open the Command Palette and run Obsidian Git: Pull.
You’ll be prompted for:
- Username → your GitHub username
- Password → Personal Access Token (PAT)
SSH keys do not work on Android; the token is mandatory.
After entering the token, Obsidian Git will pull updates, commit changes, and 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 effort.
References
- Obsidian + GitLab Setup (Andrew Wegner) – a detailed walkthrough that informed the desktop Git steps.
- Obsidian Android Syncing via GitHub (Reddit) – community discussion about syncing Obsidian on Android using GitHub and personal access tokens.