Self-host architecture
ShareOut is a Cloudflare Worker that publishes and serves interactive HTML artifacts. Every install is self-hosted on your Cloudflare account — configuration (origins, admin roster, optional bindings) is the fork in the road.
Three planes
Section titled “Three planes”- Control — REST API, auth, workspace admin (
/v1/*,/auth/*,/home). - Storage — D1 (metadata), R2 (HTML/assets), KV (slugs / rate limits), Durable Objects (tables, realtime, MiniDB, chat, …).
- Execution — Sandboxed artifact HTML in the browser + ShareOut SDK
(
json→table→ realtime).
Origins
Section titled “Origins”| Var | Role |
|---|---|
SHAREOUT_BASE_URL |
Trusted app apex (cookies, OAuth callback, canonical URLs). |
ARTIFACT_ORIGIN |
Optional untrusted content host. Unset ⇒ same-zone paths. |
Workspace subdomains (https://acme.<apex>/…) need wildcard DNS to the worker.
Without wildcard DNS, use apex /@workspace/slug and /a/<slug>/ URLs.
Typical self-host knobs
Section titled “Typical self-host knobs”| Admin | /setup first user, or SETUP_ADMIN_EMAIL to lock who can claim it |
| Marketing site | Optional — point MARKETING_ORIGIN at your own site, or leave unset |
| Custom domain | Yours — update SHAREOUT_BASE_URL after DNS |
Related
Section titled “Related”- Self-host overview
- Secrets
- Ops
- Agent-oriented map:
AGENTS.mdin the public repo
