OpenConnector can run on Fly.io as the Node Docker runtime with persistent SQLite storage. Fly provides TLS termination, remote Docker builds, health checks, rolling deploys, and optional custom domains.
This deployment uses the repository's docker/Dockerfile, the Fly app config in fly.toml, and a
Fly volume mounted at /app/data.
- A Fly.io account.
flyctlinstalled and authenticated withfly auth login.- Docker available locally, or Fly remote builders enabled.
- A public origin for OAuth callback URLs, such as
https://api.example.comor the defaulthttps://<app>.fly.devhostname.
Create a Fly app without deploying yet:
fly apps create my-open-connectorFly app names are globally unique. If you choose a different name, update the app field in
fly.toml before deploying:
app = "my-open-connector"The Docker image stores runtime data in /app/data. Create a Fly volume with the same source name
as fly.toml:
fly volumes create open_connector_data \
--region iad \
--size 1 \
--app my-open-connectorIncrease --size if you expect large run logs, many stored credentials, or heavy temporary file
transit usage.
Store production secrets with Fly instead of committing them to fly.toml:
OOMOL_CONNECT_ENCRYPTION_KEY=$(openssl rand -base64 32)
OOMOL_CONNECT_ADMIN_TOKEN=$(openssl rand -base64 32)
OOMOL_CONNECT_RUNTIME_TOKEN=$(openssl rand -base64 32)
fly secrets set \
OOMOL_CONNECT_ORIGIN="https://my-open-connector.fly.dev" \
OOMOL_CONNECT_ENCRYPTION_KEY="$OOMOL_CONNECT_ENCRYPTION_KEY" \
OOMOL_CONNECT_ADMIN_TOKEN="$OOMOL_CONNECT_ADMIN_TOKEN" \
OOMOL_CONNECT_RUNTIME_TOKEN="$OOMOL_CONNECT_RUNTIME_TOKEN" \
--app my-open-connectorKeep OOMOL_CONNECT_ENCRYPTION_KEY in a password manager or another external secrets vault. If the
key is lost, encrypted credentials, OAuth client configuration, and completed idempotent Action
responses in the SQLite database cannot be recovered.
Optional runtime policy can also be set as secrets:
fly secrets set \
OOMOL_CONNECT_ALLOWED_ACTIONS="github.*,hackernews.*" \
OOMOL_CONNECT_ALLOWED_PROXIES="github" \
--app my-open-connectorSee configuration.md for the full environment variable reference.
Deploy from the repository root:
fly deploy --config fly.toml --remote-onlyThe Fly config uses:
docker/Dockerfilefor the image build.internal_port = 3000for the Node runtime./healthfor HTTP health checks./app/dataas the mounted persistent data directory.
Check the health endpoint:
curl https://my-open-connector.fly.dev/healthThe expected response is:
{ "ok": true }View logs when diagnosing deployment or startup issues:
fly logs --app my-open-connectorFor OAuth2 providers, set OOMOL_CONNECT_ORIGIN to the public origin users will access. The runtime
builds provider callback URLs from that origin and /oauth/callback.
For example, with:
OOMOL_CONNECT_ORIGIN="https://api.example.com"the OAuth callback URL is:
https://api.example.com/oauth/callback
Add that exact callback URL to each provider OAuth app.
Register the domain with Fly:
fly certs add api.example.com --app my-open-connectorFly prints the DNS records to create. After DNS is ready, update the public origin:
fly secrets set \
OOMOL_CONNECT_ORIGIN="https://api.example.com" \
--app my-open-connectorCheck certificate status:
fly certs check api.example.com --app my-open-connectorDeploy new versions from the repository root:
git pull
fly deploy --config fly.toml --remote-onlyThe mounted volume keeps connect.sqlite and transit files across deployments.
fly.toml defaults to suspending the single machine when idle:
[http_service]
min_machines_running = 0For production traffic that should avoid cold starts, keep one machine running:
[http_service]
min_machines_running = 1Keep the machine count at one for the default SQLite deployment. Fly volumes are attached to individual machines, so horizontal scaling requires a separate shared storage design. For this repository's default Fly setup, prefer increasing the VM size before adding more machines.