Skip to content

Hosting overview

Knetik has two hosts built from the same source. Cloudflare Workers is the primary one: data in D1, artifact bytes in R2. Node is the secondary one: one Docker image (the Dockerfile at the repository root) with a SQLite file and artifact files in a data folder on a persistent volume. The rest of this page covers Node. This page summarizes the repository’s deploy/README.md, which is the authoritative copy.

The Worker (apps/worker) needs a D1 database (binding DB) and an R2 bucket (binding ARTIFACTS) per environment. Create the tables with wrangler d1 migrations apply DB before deploying. A RunCoordinator Durable Object drives each run and a single StreamHub Durable Object serves live updates to every viewer, so the one-instance rule below does not apply. Limits that come from D1: 2 MB per row (a run’s stage outputs must stay under about 1.5 MB in total), 10 GB per database. A run’s zip download is limited to 64 MB. D1 Time Travel keeps 30 days of history on the paid plan and 7 on the free plan.

Node: the one rule is to run exactly one instance

Section titled “Node: the one rule is to run exactly one instance”

The agent framework (Flue) on Node needs one live owner per conversation, and stage work continues in the background after a request returns. So on every host:

  • one instance or replica, with no autoscaling above 1;
  • CPU available between requests. On Cloud Run, no CPU throttling. On Fly, do not auto-stop machines. On Render, use a plan that does not spin down.

Running more replicas needs a lock around the executor, which is not built yet, and SQLite files are not shared between machines. In-memory indexes (connection metadata, module configuration) would also drift between instances.

Piece Notes
The image docker build -t knetik . from the repository root. Node 22.19 or newer is checked at build time.
A persistent volume KNETIK_DATA_DIR must point at it. It holds knetik.db, flue.db and artifacts/. Default ./.knetik/data.
A public origin KNETIK_BASE_URL, used for sign-in callbacks and links
Sign-in At least one method and an allowlist. See Sign-in.
TLS Terminate it at a proxy or load balancer. There is no TLS in the image.
Optional Model keys, a connector vault key, OAuth apps. See Environment variables.

Modules are installed at build time (knetik add, then rebuild). Changing the installed modules means a new image. There is no runtime install.

The server refuses to start unless it has a base URL, an allowlist and at least one sign-in method. KNETIK_AUTH=none works only under knetik dev or local mode.

GET /api/health answers {"ok":true,"modules":N} without sign-in. The image’s own HEALTHCHECK calls it every 15 seconds.

Set KNETIK_BASE_URL=https://... and KNETIK_TRUST_PROXY=1. An https:// base URL turns on Secure cookies and the __Host- cookie prefix.

The image is about 576 MB, mostly the agent framework and model-provider SDKs. The database is SQLite through Node’s built-in node:sqlite, so there is nothing extra to ship.

  • No API tokens for non-browser callers (CI, a CLI). Everything uses browser sessions.
  • Authorization is coarse: any signed-in user can start any run and decide any gate. Admin has no extra powers beyond connecting for the workspace and editing module configuration.
  • No secret-manager integration. Secrets come from environment variables.
  • Real GitHub, real Firebase, real SMTP and TLS cookie behavior are verified against mocks and config checks, not live services.

Next: Docker and Compose.