The typical components of a self-hosted production environment are:

Self-hosted PowerSync architecture

The self-hosted deployment is run via Docker. A Docker image is distributed via Docker Hub. Run PowerSync using:

docker run \
-p 8080:80 \
-e POWERSYNC_CONFIG_B64="$(base64 -i ./config.yaml)" \
--network my-local-dev-network \
--name my-powersync journeyapps/powersync-service:latest

In the above example, the service configuration is injected as an environment variable (which contains the base64 encoding of a config YAML file), but it’s also possible to use a config file mounted on a volume or specified as a command line parameter. Both YAML and JSON config files are supported.

See here for detailed comments on the config file options.

In order to run the PowerSync Service, the following activities are required: