Fly.io
You can deploy ElectricSQL to Fly.io as a Fly Machine instance.
The machine needs ports 5133
and 5433
exposed and the environment variables described in API -> Sync service configured.
For example, using a fly.toml
file:
[build]
image = "electricsql/electric:latest"
[env]
DATABASE_URL = "postgresql://..."
LOGICAL_PUBLISHER_HOST = "<your fly hostname>"
AUTH_JWT_ALG = "HS512"
AUTH_JWT_KEY = "<your signing key"
[http_service]
internal_port = 5133
force_https = true
auto_stop_machines = false
auto_start_machines = false
[[services]]
internal_port = 5433
auto_stop_machines = false
auto_start_machines = false
[[services.ports]]
port = 5433