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 / Variable | Type | Description |
|---|---|---|
SERVER_DO | DurableObjectNamespace | Namespace binding for the ServerDO class handling live WebSockets. |
DATABASE_DO | DurableObjectNamespace | Namespace binding for the DatabaseDO persistence class. |
ADMIN_SECRET | secret | Authentication token for admin management and provisioning APIs. |
APP_MAX_CONNECTIONS | environment | (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 deployRepository & Licensing
- GitHub Repository: github.com/socketodev/socketo
- License: GNU General Public License v3 (GPLv3)