Org-mode Everywhere with Orgzly and Syncthing!

tl;dr: Read your org-files on your Android device with Orgzly and keep them in sync with your laptop and other devices with Syncthing.

Org-mode is amazing. You know this, or should.

I've a hundred org files that remember things for me, about articles I read or ideas I had. People I met. Lessons I've learnt, things I want to try.

They also help me to organize myself: daily schedules for repetetive tasks, working procedures, check lists (for example for traveling: I don't forget the toothbrush anymore! Woohoo! Small win! :D ).

But, half the time I need them on my Android phone. Who is this guy, I know I've met him at a Python meetup a few months ago! How do I check my harddrive again from busybox? When were this year's conferences for QA in South-East Asia again?

There are two problems: Viewing and syncing. The first one is easy: Orgzly is an amazing org file viewer and editor for Android. Editing, re-organizing, search over all notebooks. It just works.

Screenshot of the demo notebook, demonstrating structure, TODOs, folding.

A screenshot of the demo notebook.

Keeping the org files in sync is not so easy, though. Orgzly supports two “repositories”: Dropbox and a directory on disk. Repositories are locations where it syncs changed files to. Links to a repository can be set per notebook. (Press and hold on a notebook to see or change the link.)

Dropbox I don't have and don't want to start using, because I am trying to avoid relying too much on companies, their proprietary software and shareholder-dependent moods.

So, that leaves directories.

Enter Syncthing, an open-source, decentralized, secure protocol and toolbox to keep files in sync. (Need to look into those claims in details, but hey, they're on GitHub! :p )

Syncthing works by making devices aware of each other by redundant but central discovery servers. The actual data exchange then happens directly between devices.

So far, it's been a blast: Changes in either direction get synced within seconds, and my knowledge database is now easily accessible for me.

Gotcha with Orgzly

Repositories don't support directories. (Or I don't know how.) The org files must be on the first level. And you need one repository per directory.

Multiple directories with Orgzly and Syncthing

I've listed the steps below to get notebooks from multiple directories synced and readable by Orgzly.

You can read the manual yourself, so here the short version:

  1. Install: Laptop: Syncthing. There are packages for some common Linux distros. Phone: Orgzly and Syncthing Apps
  2. Link the two devices in Syncthing. You need to do this on both devices.
  3. In Syncthing on your laptop, select the directories with org-files that you want to share to your Android phone. Make sure to explicitly check sharing with your Android phone.
  4. In Syncthing on your Android phone, accept the shares. You should get a notification for this. Remember where you save those synced directories.
  5. In Orgzly, open settings and find the repositories (currently at the bottom). Add each directory as a repository.
  6. In Orgzly, hit sync.