Skip to content

Sync server overview

The Barq sync server stores synced files and verifies client access tokens.

It is built from Barq Core.

  • listen for sync websocket clients
  • verify JWT access tokens
  • isolate tenants
  • store synced database files
  • enforce tenant limits
  • support TLS
  • support partition sync and flexible sync

The server verifies tokens. It does not issue tokens.

Your app or auth service should sign access tokens. Clients pass those tokens to Barq.User.fromToken() or the native sync user API.

The server prints a route like:

ws://localhost:9090/barq-sync

Clients use that route when creating or configuring a sync user.

With TLS enabled, the route uses wss://.