Requirements
- Bun ≥ 1.0 (runs TypeScript functions + codegen)
- Rust ≥ 1.85 (required to build the CLI from source — edition 2024)
- Node.js ≥ 18 (optional, for client tooling)
Skip the install — use Pylon Cloud
If you don’t want to manage a binary or a server, Pylon Cloud hosts the same backend you’d run yourself. Sign up at cloud.pylonsync.com, then:Install the CLI
~/.local/bin. Linux and macOS, x86_64 and arm64. No Rust toolchain required.
Verify:
pylon doctor checks that bun, node, and the supporting tooling are available.
Install Bun
Pylon uses Bun to run TypeScript server functions and to bundle the client code generator. If you don’t have it:Client SDKs
Web (React, Next.js, Vite, vanilla JS)
@pylonsync/next. See Clients → React and Clients → Next.js.
React Native (iOS + Android)
Swift (iOS, macOS, tvOS, watchOS, Linux)
In yourPackage.swift:
apt-get install libsqlite3-dev for the SQLite-backed offline replica. See Clients → Swift.
Directory conventions
A Pylon app usually looks like this:pylon dev app.ts watches app.ts + functions/ and regenerates pylon.manifest.json + pylon.client.ts on every change.
Environment variables
| Variable | Default | Purpose |
|---|---|---|
PYLON_DB_PATH | .pylon/dev.db | SQLite file location (ignored if DATABASE_URL is set) |
DATABASE_URL | (unset) | postgres://... connection string. When set, Pylon uses the Postgres adapter instead of SQLite |
PYLON_FILES_DIR | .pylon/uploads | File upload storage |
PYLON_CORS_ORIGIN | from manifest.auth.trustedOrigins | CORS allowlist override (comma-separated). * only in dev. Loopback always auto-trusted. |
PYLON_DEV_MODE | true | Dev-only behavior (generous rate limits, CORS * fallback when neither manifest nor env is set) |
PYLON_PORT | 4321 | HTTP port |
PYLON_RATE_LIMIT_MAX | 100 | Max anonymous requests per window (per IP). Kept tight — anon traffic is the brute-force surface. |
PYLON_RATE_LIMIT_MAX_AUTHED | 1000 | Max authenticated requests per window (per user id). Higher than anon because polling dashboards routinely exceed 100/min for a single legit user. |
PYLON_RATE_LIMIT_WINDOW | 60 | Window in seconds (applies to both anon + authed limits). |
PYLON_FN_RATE_LIMIT_MAX | 30 | Function calls per window |