Synch

Self-host Synch on Cloudflare

Create your own Synch server on Cloudflare and connect the Obsidian plugin to it.

This guide walks you through creating your own Synch server on a free Cloudflare account, then pasting that server address into the Obsidian plugin. The button below lets Cloudflare prepare most of the setup for you.

Prefer to avoid Cloudflare entirely and run on your own hardware instead? See the self-hosting guide for Docker or systemd.

Deploy to Cloudflare

Before you deploy

You can start with a free Cloudflare account. If your Cloudflare account is new, enable R2 first. In the Cloudflare dashboard, open R2 Object Storage, register a payment card, and turn R2 on. If you skip this step, the deployment can fail.

Cloudflare dashboard with R2 Object Storage selected

Deploy the API

  1. Click Deploy to Cloudflare.
  2. Sign in to Cloudflare and choose the account you want to use.
  3. Follow the prompts to connect your GitHub account to Cloudflare.
  4. When you reach the secrets screen, enter these three values:
    • AUTH_ALLOWED_EMAILS - comma-separated email addresses allowed to create accounts, for example you@example.com,family@example.com
    • BETTER_AUTH_SECRET
    • SYNC_TOKEN_SECRET
Create secret values

Click the button, then paste each value into the matching Cloudflare field.

  1. Click Deploy to start, then wait for the deployment to complete.

Deploy to Cloudflare form showing the required secret fields

Connect Obsidian

After deployment, copy your Synch server address from the Cloudflare Worker Settings tab. It usually looks like this:

https://your-synch-api.your-account.workers.dev

Cloudflare Worker domains and routes section with the workers.dev URL visible

  1. Open Obsidian.
  2. Go to Settings.
  3. Open Synch.
  4. In Self-hosted server, paste the Synch server address you copied. Do not include a trailing /.
  5. Click Save.
  6. Continue sign-in and vault setup normally.

Update your server

Only enable this if you want an easy way to update your server later. You only need to set it up once.

Server update setup (optional)
Initialize server updates

Paste your deployment repository URL and select the button below.

  1. Use the initializer above and commit the pre-filled workflow on GitHub.
  2. Go to the repository’s Actions tab.
  3. Run the Update Synch server workflow whenever you want to update.

Cloudflare then rebuilds and redeploys your server automatically. Your secrets and data are not affected, but any changes you committed yourself (except wrangler.jsonc and workflow files) are overwritten. If the run summary lists items under Manual attention needed, follow the instructions there.