Skip to content
Docs/Self-Hosting
Docs/CLI & Self-Hosting

Self-Hosting

Deploy Socketo OSS on your Cloudflare Workers and Durable Objects infrastructure.

Overview

Socketo's self-hosted server is licensed under the GNU General Public License v3 (GPLv3). It deploys directly to your own Cloudflare Workers account, using hibernating SQLite Durable Objects for state management with zero external database dependencies.

Architecture

plaintext
Internet -> Cloudflare Worker (Global Anycast)
                |
                +-> ServerDO    (SQLite Durable Object: WebSockets & Sessions)
                +-> DatabaseDO  (SQLite Durable Object: App Metadata & Webhooks)

Cloudflare Bindings & Environment Variables

Binding / VariableTypeDescription
SERVER_DODurableObjectNamespaceNamespace binding for the ServerDO class handling live WebSockets.
DATABASE_DODurableObjectNamespaceNamespace binding for the DatabaseDO persistence class.
ADMIN_SECRETsecretAuthentication token for admin management and provisioning APIs.
APP_MAX_CONNECTIONSenvironment(Optional) Cap on simultaneous connections per tenant.

Deployment Commands

Deploy the server using Bun and Wrangler:

bash
# 1. Clone repository
git clone https://github.com/socketodev/socketo.git
cd socketo/oss/apps/server

# 2. Install dependencies & run typecheck
bun install

# 3. Deploy to Cloudflare Workers
bun run deploy

Repository & Licensing