Introduction

GoSync is an offline-first, real-time sync engine for web apps. You host it yourself.

Your app reads and writes a local database in the browser, so every interaction is instant and keeps working without a connection. GoSync syncs those changes to your server and to the user's other devices and tabs in real time, and resolves conflicts automatically. The server is a single Go binary on SQLite or PostgreSQL, so you own the server and the data.

Why GoSync?

  • Local-first: writes land in IndexedDB first and succeed offline. Data survives reloads and restarts.
  • Real-time: connected devices are notified the moment data changes.
  • Automatic conflict resolution: each field is a last-writer-wins register ordered by a hybrid logical clock. Concurrent edits to different fields merge, and every device converges to the same state.
  • Efficient: devices download only what changed since they last synced and upload only their own pending writes. Both directions are batched and safe to retry.
  • Secure by default: JWT authentication (your own secret, or JWKS from Auth0, Clerk, Supabase, Firebase, Cognito…), per-user data isolation, origin checks, and rate and size limits.
  • Multi-tab aware: one tab holds the connection; the others share the same local database and update instantly.
  • Scales out: run several server instances on PostgreSQL, which coordinate automatically.
  • Self-hosted and open source: MIT licensed, with no per-seat or per-request pricing.

How it works

  1. Write locally. db.set('todos', id, {...}) updates IndexedDB and appends the write to a local outbox, in one transaction. Your UI updates immediately.
  2. Push. When online, the device sends its outbox to the server, which applies each field only if it's newer than what it has.
  3. Pull. Each device remembers a cursor (the last server version it saw) and asks for everything after it.
  4. Poke. When data changes, the server nudges every other connected device to pull, so changes appear in real time.

Because the merge rule is deterministic, every device ends up identical no matter what order changes arrive in, how long a device was offline, or how often a message is retried.

When to use it

GoSync fits apps where each user (or team) works with their own dataset and wants it fast, offline-capable and synced across devices: field-service and inspection apps, order taking, note-taking and productivity tools, CRMs, kanban boards, and internal dashboards.

It's not the right tool for collaborative editing of the same text (use Yjs or Automerge), or for syncing huge shared datasets to every user.

Not sure? Answer four questions on the homepage switchboard and see an honest comparison with Firebase, PowerSync, Zero, ElectricSQL and Supabase.

Status

GoSync v2.0.0 is the current release. It's tested in Chromium, Firefox and WebKit, on SQLite and PostgreSQL, and under load (1,000+ writes/s, p99 under 100 ms).

Ready to build? Quick Start →