Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Free Obsidian PC Android sync
Matthias Schäfer
Matthias Schäfer

Posted on • Edited on • Originally published atmatsch1.github.io

     

Free Obsidian PC Android sync

Obsidian is a great tool for collecting ideas.

I use it mainly for the following reasons:

  • Research
  • Collecting information
  • Saving some spontaneous ideas

Depending on my actual situation I prefer to use my laptop or my phone.
To always have access to my vaults, regardless of the device I am using, I need to sync the data between my devices. For that purpose Obsidian provides the Sync Plugin. But for this plugin they charge you 4$ a month, which I don't want to spend, if there is another option.

I found a solution which meets my requirements:

  • Crossplatform availability: Linux, Windows and Android
  • No manual work: no downloads, no copies, no nothing
  • free to use

What I use now:

  • Syncthing-fork on my android phone
  • Syncthing on my windows and linux machine
  • Shell script to backup the data in a git repository

Setup:

  • Install syncthing on the devices you want to use Obsidian
  • Create folders on every device to store the Obsidian files locally
  • Linking the devices using the QR code
  • Share the folders (also using QR code)
  • Copy your vault into the new directory and open it in Obsidian
  • optional:
    • create a git repository in your Obsidian directory and backup the files to your github account

Obsidian Git autobackup

#!/bin/bashgit-autopush(){  REPO_DIR=$1cd"$REPO_DIR"||{echo"Repository not found:$REPO_DIR"exit1}# Check if the repository has changesif[[-n$(git status--porcelain)]];thengit add.    git statusTIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")    git commit-m"Auto-commit:$TIMESTAMP"    git push origin"$(git rev-parse--abbrev-ref HEAD)"||{echo"Failed to push changes."exit1}echo"Changes pushed successfully."else# Check if there are committed changes to pushLOCAL_BRANCH=$(git rev-parse--abbrev-ref HEAD)if[[-n$(git rev-list origin/"$LOCAL_BRANCH"..HEAD)]];then# Push changes      git push origin"$LOCAL_BRANCH"||{echo"Failed to push changes."exit1}echo"Changes pushed successfully."fi  fi}git-autopush$1
Enter fullscreen modeExit fullscreen mode

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

I am an electrial engineer who now works as a software developerGoalpacer: https://play.google.com/store/apps/details?id=com.matschcode.goalpacer
  • Location
    Karlsruhe, Germany
  • Education
    electrical engineer
  • Work
    DevOps and MBD
  • Joined

More fromMatthias Schäfer

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp