Skip to main content
Coolify is an open-source, self-hosted platform that simplifies the deployment and management of applications, databases, and services on your own infrastructure. Think of it as a self-hosted alternative to platforms like Heroku or Netlify.
This guide is for development and small deployments. Coolify runs this Compose deployment as a single PowerSync Service container on one server. Coolify can manage several servers, but each resource runs on one destination, and Coolify does not load balance a resource across servers. For large production workloads, use a platform that runs multiple containers behind a load balancer, such as AWS ECS or AWS EKS. See Deployment Architecture for the production setup and Performance and Limits for the scale the Service can reach.

Prerequisites

Before following this guide:
  • Read the Service Configuration guide to understand the requirements and configuration options. This guide assumes you have done so and only covers the Coolify-specific setup.
  • Have Coolify installed and running.

Background

For the PowerSync Service to function correctly, you will need:
  • A database,
  • Authentication service, and
  • Data upload service.
The easiest way to get started is to use Supabase as it provides all three. However, you can also use a different database, and custom authentication and data upload services.

Steps

Add the Compose file as a Docker Compose Empty resource to your project.
Update the environment variables and config files.Instructions for each can be found in the Configuration options section.
Click on the Deploy button to deploy the PowerSync Service.
The PowerSync Service will now be available at
  • http://localhost:8080 if default config was used, or
  • http://{your_coolify_domain}:{PS_PORT} if a custom domain or port was specified.
To check the health of the PowerSync Service, see Health Checks.

Configuration Options

The following configuration options should be updated:
  • Environment variables
  • sync-config.yaml file (according to your data requirements)
  • service.yaml file
Environment VariableValue
PS_DATABASE_TYPEpostgresql
PS_DATABASE_URIConnection string obtained from Supabase
See step 5 in Connect PowerSync to Your Supabase
PS_PORTKeep default value (8080)
PS_MONGO_URImongodb://mongo:27017
PS_JWKS_URLKeep default value
Environment VariableValue
PS_DATABASE_TYPEpostgresql OR mongodb OR mysql OR mssql
PS_DATABASE_URIThe database connection URI (according to your database type) where your data is stored.
PS_PORTDefault value (8080) You can change this if you want the PowerSync Service to be available on a different port.
PS_MONGO_URImongodb://mongo:27017
PS_JWKS_URLThe URL of the JWKS endpoint of your authentication service.

Base Compose File

The following Compose file serves as a universal starting point for deploying the PowerSync Service on Coolify.