- 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:
Option 2: Config File
Define your sync config inpowersync.yaml either inline or via a separate file. See Self-Hosted Instance Configuration for the full config reference.
Edit Config
Update the
sync_config: section in your powersync.yaml. The sync_config: key is used for both Sync Streams and Sync Rules:Option 3: Deploy via API
Deploy sync config at runtime without restarting. Useful for quick iterations during development.Additional Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/sync-rules/v1/current | GET | Get active and pending Sync Streams / Sync Rules |
/api/sync-rules/v1/reprocess | POST | Restart replication from scratch |
Troubleshooting
Common errors when using the API:| Error Code | Meaning |
|---|---|
PSYNC_S4105 | Sync Streams / Sync Rules defined in config file - API is disabled |
PSYNC_S4104 | No Sync Streams / Sync Rules deployed yet |
PSYNC_R0001 | Invalid Sync Streams / Sync Rules YAML - check details field |