Syncing Notes to Obsidian on Android
I've never been a huge fan of tapping posts out on a mobile screen, but there definitely are times when I feel a real need to get something out of my head and onto (virtual) paper.
Last year, I switched to using Obsidian to keep notes and draft posts.
On desktop, the move was easy. The mobile version of Obsidian did take a little more getting used to (the same functionality is there, it's just sometimes harder to find), but it's still preferable to anything else I've tried for this.
Initially, I used Nextcloud to keep my vault synced between my phone and desktop. Unfortunately, as I found when playing with the gadgetbridge db, Nextcloud's ability to sync a directory on newer versions of Android can be a little flakey.
As a result, I ended up in a split-brain situation, with my phone holding a version which simply didn't exist in Nextcloud (leaving me in a position where I was sure I'd updated a draft but it not being in my vault when I checked.... on desktop).
In this post, I'll talk a little about using FolderSync to have notes synced between Nextcloud and Android.
Update
I'm leaving the rest of this post up for posterity, but before implementing the same thing, there are some important things about foldersync
that you should factor into your decision
foldersync
UI anti-patterns
When I first set up foldersync
, it just did what I needed.
However, about a week later, when I opened the interface it popped up a GDPR consent screen for advertising and tracking. This screen had the better part of 200 "partners" listed and many (if not most) of them were pre-ticked. The interface provided no way to de-select all, so the only option was to scroll through manually unticking each.
A look at the reviews on Play showed I wasn't the only one to have noticed
The bit that really concerns me is that the app hadn't updated - this wasn't some new release which introduced the tracking. Instead, it seems to have laid dormant for a period of time after first install before then starting up (ensuring that users have got their workflows in place and feel at least a little invested in continuing to use the app).
That version of foldersync
is free - in today's world it was inevitable that it'd come with a privacy tradeoff. So, I considered upgrading to the paid version instead - the app even includes a convenient button to tap to do so
You'll notice that there's no mention of feature-set or price there. It could be assumed that hitting the button will take you to a page with those details, but instead it attempts to take you straight through checkout
Maybe there's an additional step after that, but I'm not about to risk it and hit agree when I've not seen so much as a price.
foldersync
handling of external file moves
For my use-case, I want to be able to sync in both directions - changes I make on my desktop show up on my phone and vice-versa.
I have a specific workflow for posts I've drafted for my site - once I'm done with them I move them into a directory called published
, essentially decluttering the workspace a little and allowing easy differentiation between work-in-progress posts and those that have been published.
Unfortunately, foldersync
doesn't handle this workflow very well at all:
- Create
foo.md
on (laptop or phone) - Do
$writing
-
foo.md
is now in/
on both laptop and phone - On laptop, move
foo.md
out of the way intopublished
What I need here is for foo.md
to then move into published
on my phone. But, two things happen instead
-
foldersync
sees a newfoo.md
inpublished
and syncs that down -
foldersync
thinks it has a copy of/foo.md
that doesn't exist on the remove and uploads it
The result is that I end up with two copies of foo.md
, one where it's supposed to be and one where it was.
This isn't entirely foldersync
's fault - it's essentially performing filesystem syncs so there isn't really a way to tell it that a file has moved - but it does pose something of a problem for what I want to do.
foldersync
isn't what I need
I'm really not on board with supporting an app that integrates dark patterns into its UI workflows. Whether the intention or not, the delayed enabling of ads and trackers along with making it as difficult as possible to opt-out feels malicious.
If I combine that with the fact that foldersync
doesn't seem to fit my workflows very well, there's only really one possible conclusion: I need to find an alternative solution (maybe SyncThing). It may be that my workflow ultimately needs to adapt, but I'm not going to do that simply to use an app which causes me other concerns.
In the meantime, foldersync
has become one of the relative few apps that I've felt strongly enough about to leave a review.
The original post follows:
Why not Obsidian Sync
Obsidian has the ability to sync built right into it (it's called Obsidian Sync), so why am I not using that?
The simplest answer is: pricing.
At $4/user/month, the pricing is hardly exorbitant but it's still higher than I can really justify for my current needs.
Having access to notes from my phone is nice, but it's very far from essential (in fact, at one point, I used to just Signal or email myself rough article drafts). The use that I'd get out of Obsidian sync is limited further by the fact that I couldn't, in good conscience, sync work related notes through a third party service "just in case".
$4/month is quite a lot to pay for functionality which, realistically, I'd probably make any use of a few times a month at most.
Of course, I might have considered paying for sync as a way to help support development, but I'm already doing that via a commercial license.
Topology
Topology wise, I'm using exactly the same setup as I was before: my Obsidian vault is stored in Nextcloud giving both my phone and my desktop access.
Phone <----- -----> PC
| |
| |
v v
Nextcloud
What's changed is the app responsible for syncing the vault from Nextcloud onto my phone.
FolderSync
FolderSync does what it says on the tin: it syncs a folder from one location to the other.
It supports a variety of protocols and destinations, including Nextcloud:
Setup of a sync is pretty straightforward
- Add a folderpair
- When prompted, set the mode to Two-way
- Set the left folder to
SD Card
and then browse toDocuments/Obsidian
and create a subdirectory under that (I called minearticle_drafts
) - Set the right folder to
Nextcloud
and then select the source folder
Syncs can then be scheduled:
Once the schedule has been created, there's also a Sync Options
tab. Under that tab, there's a section labelled Monitor device folder
.
Ticking Instant sync
will have Foldersync watch the local directory for changes and trigger a sync if files change (by default it'll kick off 1 second after a change - you can modify that in the main settings).
If you're trying to fully replicate the Nextcloud experience, you'll also want to tick Sync deletions
The Result
The result isn't quite what Nextcloud delivers, but it's pretty close:
- When I make changes on my phone, they're synced almost instantly
- But, if I make changes on my desktop, they won't appear on my phone until the next hourly sync runs (or, I trigger a manual one)
Although I could configure a more frequent sync, the delay between PC and phone isn't too big of a drama for me, it's not often (if ever) that I'll need things to go from PC -> phone all that quickly.
It works well enough that this post was written partly on mobile and partly on desktop (though admittedly I did have to use a desktop to crop/resize the images).