Set up sync

dol stores nothing.
Your notes stay on your own machine.
Turn sync on and they move through a CouchDB database you own.

Before you start

The quickest way to get a CouchDB you don't have to run yourself is IBM Cloudant. It speaks the CouchDB protocol, and its Lite plan — free as things stand — is far more than a pile of markdown will ever need. Setting it up takes about five minutes.

Already running your own CouchDB? Skip to what goes in dol — you can paste your address straight in.

The plan is IBM's to change, so check what they currently offer before you lean on it.

Set up Cloudant

  1. Find Cloudant in the catalog

    Sign in at cloud.ibm.com, search Cloudant in the Catalog, and click it.

    IBM Cloud catalog with “Cloudant” typed into the search box and Cloudant as the first suggestion
  2. Pick a region

    Leave the environment on Multitenant and choose the region closest to you.

    The Cloudant create page with the Multitenant tab selected and a region dropdown
  3. Name it, and get the authentication right

    • Instance name — anything you like.
    • Authentication methodIAM and legacy credentials. dol signs in with username and password, which “IAM only” switches off.
    • PlanLite. One per account, free as things stand. (1 GB, 20 reads and 10 writes a second — when this was written)

    Then hit Create.

    Configure Cloudant instance form showing the authentication method set to IAM and legacy credentials, and the Lite plan selected
  4. Wait for Active

    The instance shows up in your resource list. It goes green after a minute or so.

    Database Resources list with one Cloudant instance marked Active
  5. Open Service credentials

    Click into the instance, then Service credentials in the left rail. It's empty to begin with — hit Create credential.

    Empty Service credentials page with a Create credential button
  6. Create the credential

    Name it whatever you'll recognise later.
    Set the role to Manager — dol has to create, update and delete documents.
    Leave Service ID on Auto Generate.

    Create credential dialog with the role set to Manager and Service ID on Auto Generate
  7. Copy the credential

    Expand the credential you just made and copy it. It doesn't have to be the whole block — but host, username and password have to be in what you copy.

    The generated credential JSON, with the secret values greyed out

    This JSON is the key to your notes

    Anyone holding it can read and rewrite everything in the database. Never put it anywhere someone else can see. If a credential does get out, delete it on this page and create a new one — the database itself is untouched.

What goes in dol

Open Settings → Sync and switch sync on. There are two things to fill in:

FieldValue
Paste credentialsthe JSON you copied in step 7
Databasenotes
dol's Sync settings with the credential JSON pasted in and the database named notes

Then hit Save. dol pulls host, username and password out of the JSON, creates the notes database on the server if it isn't there yet, and starts replicating.

Check the database name

Even with the same credential, a different database name sends each device to a different place. Nothing errors — both look like they're syncing fine — but neither will ever see the other's notes.

Replication starts on its own and keeps running in the background. The credentials go into the OS keychain — Keychain on macOS, Credential Manager on Windows — not into a config file next to your notes.

The second device

Install dol, open Settings, and paste the same credential with the same database name. Once the first sync is done, an edit on either machine saves itself and shows up on the other within seconds.