OpenWorkers is an open-source serverless platform for running JavaScript/TypeScript workers. Deploy functions that scale automatically (soon™), with built-in bindings for databases, key-value storage, and object storage.
| Repository | Description | Language |
|---|---|---|
| openworkers-runner | Core worker execution engine | Rust |
| openworkers-runtime-v8 | V8 JavaScript runtime | Rust |
| openworkers-core | Shared types and traits | Rust |
| Repository | Description | Language |
|---|---|---|
| openworkers-api | User-facing REST API | TypeScript/Bun |
| openworkers-scheduler | Cron job scheduler | Rust |
| openworkers-logs | Log ingestion (NATS) + SSE streaming | Rust |
| openworkers-cli | Admin/infra tool | Rust |
| postgate | Multi-tenant HTTP proxy for PostgreSQL | Rust |
| Repository | Description | Language |
|---|---|---|
| openworkers-dash | User dashboard | Angular |
| openworkers-website | Documentation & website | SvelteKit |
┌─────────────────┐
│ nginx (proxy) │
└────────┬────────┘
│
┌───────────────┬────────┴──┬───────────────┐
│ │ │ │
│ │ │ │
┌────────┸────────┐ ┌────┸────┐ ┌────┸────┐ ┌────────┸────────┐
│ dashboard │ │ api │ │ logs * │ │ runner (x3) * │
└─────────────────┘ └────┬────┘ └────┰────┘ └────────┰────────┘
│ │ │
│ │ │
┌────────┸────────┐ │ ┌────────┸────────┐
│ postgate * │ └──────┥ nats │
└─────────────────┘ └────────┰────────┘
│
│
┌─────────────────┐ ┌──────┴───────┐
* ─────┥ PostgreSQL │ │ scheduler * │
└─────────────────┘ └──────────────┘
Single database. Components marked with * connect to PostgreSQL.
- JavaScript/TypeScript execution via V8
- Web-standard APIs:
fetch(),Request,Response,Headers,crypto,TextEncoder/Decoder - Streaming support: ReadableStream, WritableStream
- Console logging with structured output
Workers can access platform resources through bindings:
export default {
async fetch(request, env) {
// Key-Value Storage (native JSON support)
await env.KV.put("session", { userId: 123 }, { expiresIn: 3600 });
const session = await env.KV.get("session");
// Database (PostgreSQL)
const users = await env.DB.query("SELECT * FROM users WHERE id = $1", [
session.userId,
]);
// Static Assets (S3/R2)
const asset = await env.ASSETS.fetch("/images/logo.png");
return new Response("Hello World");
},
};- Multi-tenant isolation via PostgreSQL schemas
- SQL validation blocks dangerous operations (system tables, schema escapes)
- BYOD support: Bring Your Own Database with direct connection strings
export default {
async scheduled(event, env) {
// Runs on schedule
console.log(`Cron triggered at ${event.scheduledTime}`);
},
};- V8 Isolates: Each worker runs in an isolated V8 context
- No credential exposure: Workers only see binding names, never secrets
- SQL validation: Queries are parsed and validated before execution
- Schema isolation: Multi-tenant databases use
SET search_pathfor isolation - Path sanitization: Object storage paths are sanitized to prevent traversal attacks
- Rust 1.75+
- Bun 1.0+
- PostgreSQL 15+
- NATS Server
# Clone repositories
git clone https://github.com/openworkers/openworkers-runner.git
git clone https://github.com/openworkers/openworkers-api.git
# Start the runner
cd openworkers-runner && cargo run
# Start the API (in another terminal)
cd openworkers-api && bun install && bun run devSee individual repository READMEs for detailed setup instructions.
-
Database is the single source of truth: All components read from/write to PostgreSQL. No local state.
-
API is userland: The API is designed to run as a worker on the platform itself (dogfooding).
-
CLI is the infra tool: All infrastructure operations (migrations, setup) go through the CLI.
-
Security by design: Credentials never reach the JavaScript sandbox.
-
Cloudflare Workers compatible: API compatibility with Cloudflare Workers where possible.
MIT License - see LICENSE for details.
Contributions are welcome! Please read our Contributing Guide before submitting a PR.
Built with Rust, TypeScript, Claude Code, and a lot of love.