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, the existing Sync Config continues serving clients while the Service processes the new one. 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:
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 your Sync Config is defined in service.yaml. A Sync Config defined in service.yaml always takes precedence.
1

Configure API Token

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

Deploy Sync Streams

The /api/sync-rules/v1/ endpoints handle both Sync Streams and legacy Sync Rules. 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.