powersync init self-hosted + powersync docker configure + powersync docker start.
If you’d prefer to write your own Docker Compose setup, here’s a minimal example.
Docker Compose Example
Create a working directory with three files:docker-compose.yaml
This example uses Postgres as the source database and MongoDB as bucket storage. Postgres is also supported as bucket storage — see Self-Hosted Instance Configuration for details.
service.yaml
The main PowerSync Service configuration. See Self-Hosted Instance Configuration for the full reference.
sync-config.yaml
Defines what data syncs to clients. See Sync Streams for full syntax.
Start the Stack
Resources
- PowerSync CLI — open source CLI; use it to scaffold and run a Docker-based local stack
- self-host-demo — complete working examples with Docker Compose
- Self-Hosted Instance Configuration — full
service.yamlreference - Sync Streams — sync config syntax
- Generate a Development Token — for testing without a full auth setup