Skip to main content
There are three ways to update your sync config in a self-hosted deployment:
  1. CLI — Edit your config and apply with powersync docker reset
  2. Config file — Update your config and restart the service
  3. API endpoint — Deploy at runtime without restarting
During deployment, existing Sync Streams/Sync Rules continue serving clients while new sync config processes. Clients seamlessly transition once initial replication completes.
Run powersync validate in the CLI before deploying to catch errors in your sync config without applying changes.

Option 1: CLI

If you set up PowerSync using the CLI (powersync docker), update your sync config and apply it without a full service restart:
1

Edit Sync Config

Update powersync/sync-config.yaml in your project directory.
2

Validate

3

Apply

This restarts the PowerSync Service and applies your updated sync config.

Option 2: Config File

Define your sync config in service.yaml either inline or via a separate file. See Self-Hosted Instance Configuration for the full config reference.
1

Edit Config

Update the sync_config: section in your service.yaml. The sync_config: key is used for both Sync Streams and Sync Rules:
2

Restart Service

Restart your service to apply changes:
Once the service starts up, it will load the updated sync config and begin processing it while continuing to serve the existing config until initial replication completes.

Option 3: Deploy via API

Deploy sync config at runtime without restarting. Useful for quick iterations during development.
The API is disabled when Sync Streams (or legacy Sync Rules) are defined in service.yaml. Sync Streams/Sync Rules defined in service.yaml always take precedence.
1

Configure API Token

Add an API token to your service.yaml and restart:
service.yaml
2

Deploy Sync Streams

Use /api/sync-rules/v1/validate first to check for errors without deploying.

Additional Endpoints

Troubleshooting

Common errors when using the API: See Error Codes Reference for the complete list.