Self-hosting

Deploy EmuView on your own Cloudflare account with full control over data, configuration, and scaling.

#Self-hosting

EmuView is designed to run on your own Cloudflare account. You get full control over your data, configuration, and infrastructure — with the operational simplicity of Cloudflare's managed platform.

#What you need

Service Purpose Cloudflare plan
Workers API gateway and application logic Free or Paid
D1 SQLite database for collections and system data Free or Paid
R2 Object storage for file uploads Free tier available
KV Key-value store for policy and session caching Free tier available
Durable Objects Real-time WebSocket connections and rate limiting Paid plan required

#What you can do

Action Description
Deploy from source Clone the repo and run the setup wizard with npm run setup
Configure auth Set environment variables for OAuth providers, signup mode, and admin email
Manage databases Run migrations with wrangler d1 migrations apply
Scale horizontally Cloudflare Workers auto-scale. D1 connection pooling distributes load across shards
Monitor Built-in analytics via Cloudflare Analytics Engine

#Key concepts

Concept What it means
Gateway Worker The single Cloudflare Worker that handles all API requests
Bindings Direct connections from the Worker to D1, R2, KV, and Durable Objects
Migrations SQL files in migrations/ that manage system table schemas
Environment variables Configuration for auth providers, admin email, signup mode, and feature flags

#How it fits together

An instance is a small set of Cloudflare resources, all named after your instance. The dashboard (a SvelteKit app on Pages) talks to the gateway worker, which owns all the data bindings:

flowchart LR
    users["Your users"] --> pages["Dashboard<br>SvelteKit app on Pages"]
    pages --> gw["Gateway worker<br>API on Workers"]
    gw --> d1[("D1<br>core + pool databases")]
    gw --> kv["KV<br>policy, session & lens caches"]
    gw --> r2[("R2<br>private + public file buckets")]

The deployment guide shows how npm run setup provisions all of this in one command.

#Guides in this section

  • Deployment — provision and deploy an instance with the one-command setup wizard
  • Rollback — what rolling back a deploy reverts, and what it can't undo
  • Upgrades — how to upgrade to new EmuView versions