Self-hosted PowerSync stack for Cold Code Labs (deployed on the surtr node via Coolify).
Sync engine + Postgres bucket storage, no MongoDB. Demonstrates the full pipeline: Postgres → logical replication → PowerSync buckets → authenticated client sync.
| Service | Role | Public |
|---|---|---|
pg-db |
Source Postgres (wal_level=logical), sample lists/todos + publication |
no |
pg-storage |
Postgres bucket storage for PowerSync | no |
pg-init |
One-shot idempotent seed (tables + publication + sample rows) | no |
powersync |
PowerSync Service (engine), port 8080 | yes (http://powersync.coldcodelabs.com) |
Config is passed to the engine as base64 env vars (no file mounts):
SVC_B64— base64 of the PowerSync service config (replication, storage, static JWKSclient_auth)SYNC_B64— base64 of the sync rules (lists,todos)SEED_B64— base64 of the seed SQLPGPW— Postgres password (internal network only)
All set as Coolify env vars; nothing secret lives in this repo.
Client auth uses a static RSA JWKS embedded in the service config. Dev JWTs (max 24h per PowerSync) are minted off-repo with the matching private key.
The engine has no admin UI. Navigate sync state with the PowerSync Diagnostics App
(hosted at https://diagnostics-app.powersync.com or the journeyapps/powersync-diagnostics-app
image): enter the engine endpoint + a dev JWT to inspect buckets, sync rules, stats and run SQL.