- CLI — Edit your config and apply with
powersync docker reset - Config file — Update your config and restart the service
- 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.
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
Option 2: Config File
Define your sync config inservice.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.1
Configure API Token
Add an API token to your
service.yaml and restart:service.yaml
2
Deploy Sync Streams
/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.