✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more
Andrii Bidochko
  • Updated: January 1, 2026
  • 7 min read

OpenWorkers: Self‑Hosted Cloudflare Workers‑Compatible Runtime Launches

OpenWorkers: The Self‑Hosted, Cloudflare Workers‑Compatible Runtime Redefining Edge Computing

OpenWorkers is a self‑hosted, open‑source runtime that lets developers run untrusted JavaScript at the edge with the same API surface as Cloudflare Workers, while providing native KV storage, PostgreSQL, and S3‑compatible storage bindings.

Introduction

In a world where serverless and edge‑first architectures dominate modern web development, many teams still wrestle with vendor lock‑in, unpredictable per‑request pricing, and data‑privacy concerns. OpenWorkers answers these pain points by delivering a self‑hosted runtime that mirrors the developer experience of Cloudflare Workers but runs entirely on your own infrastructure. Built on top of the V8 engine and Rust, it offers a secure sandbox for JavaScript, deterministic execution limits, and first‑class integrations for KV storage, PostgreSQL, and S3/R2‑compatible object stores.

The platform is especially attractive to tech enthusiasts, developers, and cloud engineers who want the flexibility of edge computing without surrendering control of their data. Below we dive deep into what OpenWorkers is, its core capabilities, architecture, deployment workflow, and real‑world scenarios where it shines.

What Is OpenWorkers?

OpenWorkers is an open‑source runtime designed to execute untrusted JavaScript in isolated V8 contexts. It brings the power of edge computing to any environment—whether a private data center, a Kubernetes cluster, or a simple Docker host. The runtime is fully Cloudflare Workers compatible, meaning you can write a worker once and run it locally, on‑prem, or on any cloud that supports Docker.

“The goal has always been the same: run untrusted JavaScript securely on your own servers, with the same developer experience as Cloudflare Workers but without vendor lock‑in.” – OpenWorkers creator

By providing bindings for Telegram integration on UBOS and OpenAI ChatGPT integration, OpenWorkers can be extended into powerful AI‑driven workflows, making it a natural fit for modern AI‑centric applications.

Core Features

KV Storage

A fast, key‑value store that supports get, put, delete, and list operations directly from your worker code. Ideal for caching API responses, session data, or feature flags.

  • Sub‑millisecond latency for reads
  • Automatic replication across nodes
  • Built‑in TTL support

PostgreSQL Integration

Seamlessly bind a PostgreSQL instance to your workers, enabling relational queries without leaving the runtime. This is perfect for transactional workloads, analytics, or user management.

  • Prepared statements with parameter binding
  • Connection pooling managed by the runtime
  • Full SQL compliance

S3 / R2‑Compatible Storage

Workers can read and write objects to any S3‑compatible endpoint, including Cloudflare R2, Amazon S3, or self‑hosted MinIO clusters.

  • Streaming uploads and downloads
  • Multipart upload support
  • Fine‑grained ACLs via signed URLs

Cloudflare Workers API Compatibility

The runtime implements the same global objects (fetch, Request, Response, Headers, crypto.subtle, etc.) that developers know from Cloudflare Workers, ensuring zero‑code migration.

  • Native fetch with streaming bodies
  • Web Crypto API for encryption & signing
  • Timers (setTimeout, clearTimeout)

Together, these bindings turn a simple JavaScript function into a full‑stack edge service capable of handling data persistence, heavy computation, and third‑party integrations—all while staying within a secure sandbox.

Architecture Overview

OpenWorkers follows a modular, container‑first architecture that separates concerns into distinct services:

Component Responsibility
NGINX Proxy Routes incoming HTTP requests to the appropriate worker runner.
Runner Spawns V8 isolates, enforces CPU (100 ms) and memory (128 MB) limits, and executes the JavaScript code.
PostgreSQL Provides relational storage for workers that need structured data.
KV Service Manages fast key‑value operations with optional TTL.
S3/R2 Adapter Handles object storage interactions via the S3 API.
Scheduler Executes cron‑style jobs defined in workers (supports 5‑ or 6‑field syntax).

The diagram below visualizes the data flow from an incoming request to the worker execution and back to the client.

OpenWorkers architecture diagram

All components communicate over a lightweight NATS message bus, ensuring low latency and high throughput. Because each service runs in its own container, you can scale them independently based on workload patterns.

Deployment Steps & Benefits

Deploying OpenWorkers is intentionally straightforward: a single PostgreSQL instance and a Docker‑Compose file are enough to get a production‑grade cluster up and running.

  1. Clone the repository:

    git clone https://github.com/openworkers/openworkers-infra.git
  2. Configure environment variables (copy the example and edit secrets):

    cd openworkers-infra && cp .env.example .env
  3. Start PostgreSQL and run migrations:

    docker compose up -d postgres

    After the DB is ready, execute the migration script included in the repo to create the KV tables and scheduler schema.

  4. Launch the full stack:

    docker compose up -d

    This brings up NGINX, the runner pool, KV service, S3 adapter, and the scheduler.

  5. Deploy your first worker:

    Create a worker.ts file with the familiar Cloudflare Workers syntax and place it in the /workers directory. The platform will automatically compile and hot‑reload it.

Why Choose a Self‑Hosted Runtime?

  • Data sovereignty: All data stays inside your network, satisfying compliance regimes like GDPR and HIPAA.
  • Predictable costs: No per‑request billing; you pay only for the underlying compute and storage you provision.
  • Vendor independence: Avoid lock‑in to any single cloud provider.
  • Full observability: Integrate with existing logging, tracing, and monitoring stacks.

Real‑World Use Cases

The flexibility of OpenWorkers makes it suitable for a wide range of scenarios. Below are three representative examples:

1️⃣ Edge‑Native API Gateways

Companies can expose low‑latency APIs that query a PostgreSQL database, cache results in KV, and stream large files from S3—all from the edge. This reduces round‑trip time for global users and offloads origin servers.

2️⃣ AI‑Powered Chatbots

By combining the ChatGPT and Telegram integration with OpenWorkers, developers can host a privacy‑first chatbot that processes user messages at the edge, stores conversation state in KV, and calls OpenAI APIs only when needed.

For a ready‑made example, see the GPT‑Powered Telegram Bot template in the UBOS marketplace.

3️⃣ Real‑Time Content Personalization

Media platforms can personalize HTML fragments on the fly using KV for user preferences and PostgreSQL for subscription data. The edge execution ensures the personalized content is delivered within milliseconds, improving engagement metrics.

A similar workflow can be built with the AI SEO Analyzer template, which demonstrates how to fetch, process, and return SEO insights at the edge.

Get Started with OpenWorkers & UBOS Today

If you’re ready to experiment with a self‑hosted edge runtime, the UBOS platform overview provides a complementary suite of tools—such as the Web app editor on UBOS and the Workflow automation studio—that accelerate development cycles.

For startups looking for a fast launch, explore UBOS for startups. SMBs can benefit from UBOS solutions for SMBs, while enterprises may consider the Enterprise AI platform by UBOS for large‑scale deployments.

Need a ready‑made template to jump‑start your project? The UBOS templates for quick start library includes the AI Article Copywriter, AI Video Generator, and many more. Pair any of these with OpenWorkers to create a fully self‑hosted, edge‑first solution.

Curious about pricing? Review the transparent UBOS pricing plans to see how you can keep costs predictable while scaling.

Finally, join the UBOS partner program to get dedicated support, co‑marketing opportunities, and early access to new integrations such as Chroma DB integration and ElevenLabs AI voice integration.

Ready to unleash the power of edge computing on your own terms? Dive into the official OpenWorkers announcement and start building today.

Conclusion

OpenWorkers bridges the gap between the convenience of Cloudflare Workers and the control of a self‑hosted environment. Its open‑source nature, robust bindings for KV, PostgreSQL, and S3, and strict sandboxing make it a compelling choice for developers who demand performance, privacy, and cost predictability.

By integrating OpenWorkers with the broader UBOS ecosystem—ranging from AI marketing agents to workflow automation—you can construct end‑to‑end, serverless applications that run at the edge, stay within your security perimeter, and scale effortlessly.

The future of edge computing is open, modular, and developer‑centric. OpenWorkers is leading that charge—are you ready to follow?


Andrii Bidochko

CTO UBOS

Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.

Sign up for our newsletter

Stay up to date with the roadmap progress, announcements and exclusive discounts feel free to sign up with your email.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.