# Config options

Integration Options are the options you pass to `vitehub()` or a package's Vite plugin. Pick the provider here when the choice changes generated output, bindings, imports, or deployment.

## Built-in host

`vitehub()` builds for exactly one built-in `host`: `cloudflare`, `netlify`, `vercel`, `deno`, or `node`. Set `host` to select it explicitly, or omit it to detect the host from the environment and fall back to `node`. The host sets the runtime, Nitro output, packaging, and built-in Blob, Queue, Rate Limit, and Sandbox adapters. A `VITEHUB_HOST` that names another host fails the config. A `nitro.preset`, `NITRO_PRESET`, or `SERVER_PRESET` that names another host fails the build. A host build variable, such as `VERCEL`, `NETLIFY`, `WORKERS_CI`, or `DENO_DEPLOYMENT_ID`, that names another host fails the production build, and dev prints a warning once. Set `VITEHUB_HOST` to build for another host on purpose.

`name` is the deployment name. On Cloudflare it resolves in this order:

1. An explicit `name`.
2. `WRANGLER_CI_OVERRIDE_NAME`, which Cloudflare Workers Builds sets to the connected Worker. An explicit `name` that differs from it fails, because the connected Worker is still the deploy target.
3. The nearest `package.json` name.
4. The Vite root folder name.

Cloudflare uses this name for the default Worker, Blob bucket, Queue prefix, Rate Limit namespace, Sandbox, and Container names. Outside Workers Builds, an explicit Wrangler Worker name wins. Explicit Blob bucket, driver, or store options also win. These names are stable, but ViteHub does not create the R2 bucket or Queue for them. The generated deployment manifest records the name and where it came from.

| Import | Public type | Placement | Defaults |
| --- | --- | --- | --- |
| `vite-hub` | `ViteHubOptions` | `vitehub({ host })` in Vite `plugins` | Includes Env. Turn on other features with `true` or an options object. |

- If the host cannot support a feature you ask for, the build fails. It never picks a weaker provider in silence.
- The `node` host keeps its filesystem Blob store on one host and its memory Rate Limiter in one process, on purpose.
- The `deno` host rejects Schedule and `agent.runtime: "deno"`, because its deployed Nitro entrypoint does not include those generated servers. Deno output stages runtime packages, validates a deployment manifest, and adds a non-interactive create-or-update runner.
- Each `hubX()` plugin is still available from its `@vite-hub/*/vite` package path, with its full option types.

A Definition file turns its feature on, so these features need no key: Agent (`server/agents/`), Auth (`server/auth.ts`), Browser (`server/browsers/`), Channels (`server/channels/`; a Channel that receives webhooks also turns on Agent, which serves its route), Connections (`server/connections/`), Queue (`server/queues/`), Realtime (`server/realtime/`), Schedule (`server/schedules/`), Workflow (`server/workflows/`), and Workspace (`server/workspaces/`). `vitehub()` turns on Blob, Database, KV, Observability, Rate Limit, and Sandbox Task with `true`. Email accepts `true` with the Cloudflare host, where it selects the Cloudflare Email driver; other hosts reject that boolean default and require explicit provider options.

`vitehub()` is the only config place. Call it with no argument for the defaults. Each feature has one key, `<feature>?: boolean | <Feature>Options`, and `vite-hub` exports each option type with that name, such as `KVOptions` and `ObservabilityOptions`. Vite does not read top-level feature keys such as `kv` or `env`. A direct owner plugin takes the same options as its argument, such as `hubKV(options)`.

## Vite Integration options

In `vitehub()`, set a key to `false` to turn the feature off. Omit it to keep the feature off, unless a Definition file of the feature exists, such as `server/auth.ts` or a file in `server/queues/`. Set `true` for the defaults, or an object to set options.

| Package | Public type | Placement | Confirmed options and defaults |
| --- | --- | --- | --- |
| Agent | `AgentOptions` | `agent` config key or `hubAgent(options)` | `false` disables Agent in `vitehub()`. Omission turns it on when `server/agents/` exists, and keeps it off otherwise; `true` enables inferred defaults, and an options object enables and configures it. `runtime`: `auto`, `cloudflare-agents`, `deno`, `unknown`, `vercel`, `vite`; default `auto`. `execution`: `inline`, `sandbox`, `workflow`; default `inline`. `imports` defaults to `true`. `invocations` (`vitehub()` only) sets the app-wide [Invocation journal](https://vitehub.dev/docs/agents/invocation-storage#use-one-journal-for-every-agent): `"database"`, `"memory"`, `false`, `{ store, ...options }`, or the [default journal](https://vitehub.dev/docs/agents/invocation-storage#use-the-default-journal) options `{ databaseUrl, observations, retention }`; omission installs the default journal, with the Console on or off. `providers.state.driver` defaults to `auto`. Automatic state uses Cloudflare state on Cloudflare and local SQLite at `file:.vitehub/data/agent-state.sqlite` during Vite development; production output requires a durable `VITEHUB_AGENT_STATE_URL` or explicit provider options. Hosted Agent Definitions mount `/_vitehub/agents/[agent]/chat`; each Agent's route-enabled Channel controls whether it answers. Webhook routes remain Channel-owned and available for adapter delivery. Set `routes.discordGateway` to generate the Discord Gateway listener route; `true` selects the package default route. `routes.inspection` is disabled by default; `true` mounts `/_vitehub/agents/[agent]/inspection`, while a string selects a custom route. Inspection includes operational metadata and does not add authorization. The host must authorize the route before ViteHub resolves the Agent. `shutdown.drainMs` sets the default for `VITEHUB_SHUTDOWN_DRAIN_MS`, the shared budget of every [stop signal drain](https://vitehub.dev/docs/agents/process-hosts#drain-agent-work-on-stop-signals) on a persistent server; `shutdown: false` removes the inline Chat drain. |
| Auth | `boolean` | `auth` config key or `hubAuth()` | `server/auth.ts` turns Auth on without the key, and `false` disables the integration. Every other Auth option is in `defineAuth()`: `basePath` default `/api/auth`, `route: false`, `access` with the sign-in pages `signIn` and `afterSignIn`, `database`, `secondaryStorage`, and `components.prefix`, which renames [`<AuthPermission>`](https://vitehub.dev/docs/auth/abilities) in Nuxt. The removed `auth: { redirects }` fails with `AUTH_REDIRECTS_MOVED`. Pass a callback to `defineAuth()` for options that you resolve at runtime. |
| Blob | `BlobOptions` | `blob` config key or `hubBlob(options)` | Omission or `false` disables Blob in `vitehub()`; `true` enables the selected host's store, and an options object enables and configures it. Driver literals include `fs`, `cloudflare`, `netlify-blobs`, `vercel`, `minio`, `s3`, `gcs`, `azure`, and other exported Blob drivers. Defaults: `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY`, and `S3_BUCKET` select `s3` on every host; Cloudflare hosting selects `cloudflare` binding `BLOB`; Netlify hosting selects `netlify-blobs`; `BLOB_STORE_ID`, `BLOB_READ_WRITE_TOKEN`, or Vercel hosting selects `vercel` with `access: "public"`; otherwise the integration selects `fs` at `.vitehub/data/blob`. In `vite dev`, an inferred Vercel Blob store uses `fs`, and an inferred R2 store uses `fs` when the dev runner has no R2 binding, unless the store sets `remote: true`. Builds ignore `remote`. MinIO defaults to bucket `vitehub-blob`, endpoint `http://localhost:9000`, region `us-east-1`, and `forcePathStyle: true`. `images` sets image variants: `transformer` is `auto` (default), `sharp`, `cloudflare-images`, or `passthrough`; `sizes`, `quality`, and `binding` (default `IMAGES`) tune it; `false` serves originals. |
| Browser | `BrowserOptions` | `browser` config key or `hubBrowser(options)` | `false` disables Browser in `vitehub()`. Omission turns it on when `server/browsers/` exists; `true` enables Cloudflare Browser Run actions with binding `BROWSER`, `{ binding }` changes the binding name, and `remote: true` connects local Wrangler development to the hosted service. Browser Definitions currently require the Cloudflare host. The root integration and direct standalone `hubBrowser()` output generate the binding and required compatibility fields while preserving unrelated Wrangler fields. |
| Bundle | `boolean` | `bundle` config key in `vitehub()` | Omission or `false` writes nothing. `true` writes a report of each production build to `.vitehub/bundle/`: client and server size, the code that loads at startup, and the package or folder of each module. Read it with `vitehub bundle` and `vitehub bundle why <package or file>`. Development is not measured. See [Bundle reports](https://vitehub.dev/docs/bundle). |
| Cache | `CacheOptions` | `cache` config key in `vitehub()` | Omission or `false` leaves Nitro's `cache` mount unchanged. `true` mounts the host's store: Workers KV (driver `cloudflare`) with binding `CACHE` (with `namespaceId`, or an existing `CACHE` namespace ID) on Cloudflare, Vercel Runtime Cache (driver `vercel`) on Vercel, Deno `deno-kv` with base `cache`, Node `fs-lite` at `.vitehub/data/cache` (or `<dataDir>/cache`). Netlify has no default and fails the build. An options object selects one of these drivers; each driver requires its host. Cloudflare accepts `binding` and `namespaceId`, `fs-lite` and `deno-kv` accept `base`. Development uses `fs-lite` at the local cache directory. `{ driver: "kv" }` works on every host: it stores the cache in the default KV Store under the `nitro-cache:` prefix (`base` changes it), in development too, and requires `kv`. A `cache` mount in `nitro.kv` (`nitro.storage` in Nuxt) takes precedence. |
| Channels | `ChannelsOptions` | `channels` config key or `hubChannels(options)` | `false` disables Channel discovery in `vitehub()`. Omission turns it on when `server/channels/` exists; `true` discovers `server/channels/<path>.ts` and `<path>.channel.ts`. `projectRoot` changes where ViteHub looks for those files. Connectors and provider credentials belong in the Channel Definition. |
| Connections | `ConnectionsOptions` | `connections` config key or `hubConnections(options)` | `false` disables Connections in `vitehub()`. Omission turns it on when `server/connections/` exists; `true` discovers `server/connections/<path>.ts`. Requires `database`. `database` defaults to `default`. `encryptionKey` defaults to the optional secret `VITEHUB_CONNECTIONS_KEY` and cannot use `env.provider()` or a default. |
| Console | `boolean \| ConsoleOptions` | `console` config key in `vitehub()` | Omission or `false` registers no [Console](https://vitehub.dev/docs/console) endpoint or plugin in a production build. `vite dev` without the option serves only the Operations endpoint. `true` serves `POST /_vitehub/rpc`, which takes only requests that the ViteHub Console or the CLI [signed](https://vitehub.dev/docs/console/signed-requests) with a key in a `VITEHUB_CONSOLE_KEY_<NAME>` variable. An options object does the same. `auth: false` takes calls without a signature, for development only (a production build fails). `authorize` is a server file that every Console call runs. It can return `{ sections }` to allow only some sections. `invoke` defaults to `true` in development and `false` in production builds. The Agent Console reads the shared invocation journal of discovered Agent Definitions. Without one, it reads the [default Agent journal](https://vitehub.dev/docs/agents/invocation-storage#use-the-default-journal), which ViteHub installs with the Console on or off. |
| Database | `DatabaseOptions` | `database` config key or `hubDatabase(options)` | Omission or `false` disables Database in `vitehub()`; `true` enables inferred defaults, and an options object enables and configures it. `projectRoot` sets the Database discovery, generated-artifact, and provisioning root; relative paths resolve from the Vite root in Vite and the Nuxt `rootDir` in Nuxt. Integration options are `cli.generate` and `cli.migrate`, each disableable with `false`. `connection` supplies a hosted libSQL default for Vercel and other hosted output. Cloudflare D1 runtime fields are `driver: "cloudflare"`, `binding`, `databaseId`, `previewDatabaseId`, `databaseName`, `migrationsTable`, and `local.filename`. Database Definitions own tables and may override integration connection values. |
| Deploy | `DeployOptions` | `deploy` config key in `vitehub()` | Used by `vitehub deploy` only. `check` is a path or a list of paths, such as `["/", "/api/products"]`, that must answer with a `2xx` status on the deployed URL after each deploy; with `health`, the health route is checked first. A failed check exits with `SETUP_DEPLOY_CHECK_FAILED` and the rollback command of the host. `indexNow: true` sends the URLs of `<publicUrl>/sitemap.xml` to IndexNow after a production deploy that passed its checks, and serves the key at `/<key>.txt`; it needs a string `publicUrl` (`VITE_HUB_DEPLOY_INDEX_NOW_PUBLIC_URL_MISSING`). A check that is not a path fails the build with `VITE_HUB_DEPLOY_CHECK_INVALID`. See [Check the deployed app](https://vitehub.dev/docs/cli/project#check-the-deployed-app). |
| Docker | `boolean` | `docker` config key in `vitehub()` | On by default for the `node` host; other hosts ignore it. A production build writes `.output/Dockerfile`. The image runs as `node` in `/app`, mounts volumes for `/app/.vitehub` and a separate `dataDir`, stops on `SIGTERM`, and probes the `health` route over HTTP when enabled. With native packages, build the app in the same Linux Node image that runs it. `false` writes no Dockerfile. See [Run the server with Docker](https://vitehub.dev/docs/frameworks-hosts/node-self-hosted#run-the-server-with-docker). |
| Email | `EmailOptions` | `email` config key or `hubEmail(options)` | `driver` is `resend`, `smtp` (Node hosts, needs `nodemailer`), `cloudflare`, `log`, or the path of a [driver module](https://vitehub.dev/docs/email/configure#configure-another-provider) that starts with `./` or `../` and default-exports a function that returns an `EmailDriver`; `options` accepts serializable literals and runtime Env declarations. Omission or `false` disables Email in `vitehub()`. The root package also accepts `email: true`: Cloudflare Email on Cloudflare, and on other hosts the `log` driver in `vite dev` and a production build that fails with `VITE_HUB_R0089` until you set `driver`. Markdown and Vue templates under `server/emails/**/*.{md,vue}` are discovered recursively and exposed through typed `#vitehub/emails/<name>` renderer imports. Vue templates need `vue` and `@vitejs/plugin-vue`. |
| Env | `EnvOptions` | `env` config key in `vitehub()`, or `hubEnv(options)` | On by default in `vitehub()`; `false` turns it off. `public`, `define`, and `server` declare Public Env, build define values, and Server Env. `diagnostics`: `off`, `summary`, `trace`; default `summary`. `prefix` changes inferred environment variable names. `projectRoot` changes generated file placement. `providers` maps read-only runtime provider names to application modules. |
| Health | `boolean \| HealthOptions` | `health` config key in `vitehub()` | Omission or `false` adds no route. `true` adds `/_vitehub/health` on every host; `route` moves it, for example `{ route: '/api/health' }`. It answers `{ ok, version, commit, vitehub }` with `cache-control: no-store`. `version` is the `version` of the app's `package.json`, left out when it has none. `commit` is the commit of the build, from `VITEHUB_BUILD_COMMIT`, `VERCEL_GIT_COMMIT_SHA`, `WORKERS_CI_COMMIT_SHA`, `CF_PAGES_COMMIT_SHA`, `COMMIT_REF`, `GITHUB_SHA`, `CI_COMMIT_SHA`, or `RENDER_GIT_COMMIT`, else from Git, else `null`. `vitehub` is the installed `vite-hub` version. With `database`, `kv`, or `blob`, `checks` has `true` or `false` for each Database (`SELECT 1`), each KV store (one read), and each Blob store (opens the root directory on `fs`, lists up to one object on `s3` with `s3:ListBucket`, and checks object metadata on other drivers), and the route answers `503` when one fails or takes more than 2 seconds. The response never holds error text; the error goes to the server log. `checks` picks the primitives to check, for example `{ checks: ['database'] }`; `[]` checks none. A primitive in `checks` that the app does not turn on fails the build with `VITE_HUB_HEALTH_CHECK_DISABLED`. |
| Same-origin writes | `boolean \| SameOriginWritesOptions` | `sameOriginWrites` config key in `vitehub()` | Omission or `false` checks nothing. `true` answers `403` with `{ error: { code: "VITEHUB_CROSS_ORIGIN_WRITE" } }` to a request that is not `GET`, `HEAD`, or `OPTIONS`, has a `Cookie` header, and has `Sec-Fetch-Site: same-site` or `cross-site`, or an `Origin` other than the app's origin, before any middleware or route runs. The app's origin honours `X-Forwarded-Proto` and `X-Forwarded-Host`. Requests without cookies pass. `exclude` lists path prefixes that take writes from other sites, for example `{ exclude: ['/api/forms/contact'] }`. See [Run behind a reverse proxy](https://vitehub.dev/docs/frameworks-hosts/node-self-hosted#run-behind-a-reverse-proxy). |
| Security | `SecurityOptions` | `security` config key in `vitehub()` | Omission sends `Strict-Transport-Security: max-age=31536000`, `X-Content-Type-Options: nosniff`, and `Referrer-Policy: strict-origin-when-cross-origin` in built output, on each response that does not set the header itself. An object changes a value, adds a header such as `X-Frame-Options` or `Permissions-Policy`, or removes one with `false`; `headers: false` sends none. Static files get the same headers through `_headers` on Cloudflare and Netlify and a static-file route on Vercel. `maxBodySize` takes bytes or a size such as `'1mb'` and answers `413` with `data.code: "VITE_HUB_REQUEST_BODY_TOO_LARGE"` to a larger body, on every route. No Content Security Policy. See [Add security headers and a body limit](https://vitehub.dev/docs/frameworks-hosts/production#add-security-headers-and-a-body-limit). |
| Trust proxy | `boolean` | `trustProxy` config key in `vitehub()` | Default: `false`. `true` upgrades the request URL from `http:` to `https:` when the first `X-Forwarded-Proto` value is `https`. On the Node host only, it also sets the client address to the last `X-Forwarded-For` value. Both changes happen before middleware or routes run. It never reads `X-Forwarded-Host`. Turn it on only behind a proxy you run that sets the trusted headers. |
| KV | `KVOptions` | `kv` config key or `hubKV(options)` | Accepts `false`, one store config, or `{ stores }` with `stores.default`. Driver literals are `fs-lite`, `cloudflare`, `deno-kv`, `upstash`, `redis`, and `database`. Defaults: Deno hosting selects `deno-kv`; Upstash env selects `upstash`; Vercel hosting selects `upstash`; Cloudflare hosting selects `cloudflare` binding `KV`; otherwise `database` on Node with a Postgres Default Database, else `fs-lite` at `.vitehub/data/kv`. `redis` is never inferred: set `driver: "redis"`. A build that has `REDIS_URL` and no `driver` reports the hint `KV_REDIS_URL_UNUSED` with that fix. |
| Logs | `boolean \| LogsOptions` | `logs` config key in `vitehub()` | Omission or `false` adds no log source. `true` keeps a bounded Evlog buffer in `vite dev` that the Console and `vitehub logs` read, and registers Evlog; a production build fails on it. `{ source }` reads an existing backend through a `LogSource` module, in development and production, and starts no logger without `observability`. See [Logs](https://vitehub.dev/docs/logs). |
| Observability | `boolean \| ObservabilityOptions` | `observability` config key in `vitehub()` | Omission or `false` registers nothing. `true` registers the Evlog Nitro module for request logs. `evlog` passes Evlog options, such as `sampling` and `redact`. `browserErrors: true` sends uncaught browser errors, and the errors and warnings that the page sends with `reportBrowserError()` from `vite-hub/logs/client`, to `POST /_vitehub/browser-errors`, which logs each one on the request's Evlog event. `service` installs `useObservability()` for Agent telemetry, and enables `posthog` export and `papercuts`. See [Observability](https://vitehub.dev/docs/agents/observability) and [Logs](https://vitehub.dev/docs/logs). |
| Redirects | `RedirectsOptions` | `redirects` config key in `vitehub()` | Omission adds nothing. `host` redirects every other host to it, `https: true` redirects `http:` to `https:`, and `trailingSlash: "add" \| "remove"` changes page paths (`GET` and `HEAD`, not under `/api/` or `/_`, no file extension). One redirect fixes all three, with `301` for `GET` and `HEAD` and `308` for other methods. `vite dev`, local names, IP addresses, and preview hosts (`*.workers.dev`, `*.pages.dev`, `*.vercel.app`, `*.netlify.app`, `*.deno.dev`, `*.deno.net`, and `previewHosts`) keep their host and scheme. The client origin honours `X-Forwarded-Proto` and `X-Forwarded-Host`. On Cloudflare it sets `assets.run_worker_first` and, with `trailingSlash`, `assets.html_handling`. See [Redirect to one canonical address](https://vitehub.dev/docs/frameworks-hosts/redirects). |
| Queue | `boolean \| QueueOptions` | `queue` config key in `vitehub()`, or `hubQueue(options)` from `@vite-hub/queue/vite` | `false` disables Queue. Omission turns it on when `server/queues/` exists. `true` uses the host's driver: `cloudflare` selects `cloudflare` and prefixes queue names with the deployment name, `vercel` selects `vercel`, and `node` selects `postgres` when the app has a Postgres Default Database, else `local`. Both run jobs in the server process. `postgres` shares jobs across instances. `local` works on one instance only. The `netlify` and `deno` hosts have no Queue driver, so `queue` fails configuration there. An options object sets driver options such as Cloudflare `binding`, Vercel `region`, local `base`, and shared `cache`; `driver` replaces the host's driver. Queue concurrency and retry behaviour belong to Queue Definition or enqueue options. |
| Rate Limit | `RateLimitOptions` | `rateLimit` config key or `hubRateLimit(options)` | `driver`: `auto`, `cloudflare`, `kv`, or `memory`; default `auto`. Auto selects memory for Vite serve and Cloudflare for a known Cloudflare production host. On a `node` build in `vitehub()`, auto uses `kv` when the default KV store can share counts (Postgres, Redis, or Upstash), otherwise `memory`. Explicit `driver: 'kv'` in `vitehub()` requires the `node` host and a KV store that can share counts. In `vitehub()`, the namespace is the deployment name and ViteHub ignores `namespace`. `hubRateLimit()` on Cloudflare requires a deployment-unique `namespace`. `projectRoot` and `scanDirs` are source-collection escape hatches. Handler-local `requireRateLimit()` calls own static limits, windows, enforcement guarantees, and failure behavior. |
| Realtime | `RealtimeOptions` | `realtime` config key or `hubRealtime(options)` | `false` disables Realtime. Omission turns it on when `server/realtime/` exists. `driver`: `auto`, `cloudflare`, `memory`, `postgres`, or `redis`; default `auto`. Auto uses a Durable Object when Realtime can resolve a Cloudflare Nitro preset or hosting environment. With only `vitehub({ host: 'cloudflare' })` during Vite development, set `driver: 'cloudflare'` explicitly. Other development hosts fall back to process memory. On a Node build, auto picks when the server starts: `redis` with `REDIS_URL`, else `postgres` with `REALTIME_POSTGRES_URL` or a Postgres Default Database, else `memory`. `redis` and `postgres` share rooms across Node instances; `memory` keeps them in one process. `memory`, `postgres`, and `redis` need the Node host. Vercel, Netlify, and Deno builds with Realtime Definitions fail. Realtime Definitions keep the engine and document format separate from this deployment choice. |
| Sandbox Task | `boolean \| SandboxTaskOptions` in `vitehub()`; `SandboxTaskOptions` in `hubSandboxTask()` | `sandboxTask: true` in `vitehub()`, or `hubSandboxTask(options)` from `@vite-hub/sandbox/task/vite` | `true` uses the Sandbox of the host: `cloudflare` or `vercel`. The `netlify`, `node`, and `deno` hosts have no Sandbox driver, so `sandboxTask: true` fails configuration. An object sets the driver options, such as `{ driver: 'cloudflare', migrationTag: 'v2' }`. `{ driver: 'vercel' }` also works on the `node` and `netlify` hosts. Cloudflare defaults are binding `SANDBOX`, class name `Sandbox`, and migration tag `v1`. Per-run sandbox identity belongs to Sandbox Run invocation options. |
| Schedule | `ScheduleOptions` | `hubSchedule(options)` | `false` disables Schedule. Omission turns it on when `server/schedules/` exists. `providerOutput`: `auto`, `standalone`, `nitro`, or `false`; default `auto`. Generated output targets only the build's host. `projectRoot` changes where generated schedule output is written. There is no public `schedule.provider` option. |
| SEO | `SeoOptions` | `seo` config key in `vitehub()` | Omission adds nothing. `{ sitemap: true }` serves `/sitemap.xml` with the Nuxt pages without a dynamic part, the static prerender routes, the published Content pages with a URL, and the entries of `server/sitemap.ts`, and `/robots.txt` that names it unless the app has `public/robots.txt` or a `robots.txt` server route. `{ sitemap: { exclude } }` leaves path prefixes out, and `pages: false` lists no Nuxt pages or prerender routes. URLs start with `publicUrl`, else the request origin; prerendering the files needs `publicUrl` (`SEO_PUBLIC_URL_MISSING`). `robots: { disallow }` adds `Disallow` lines and serves `/robots.txt` alone too; `robots: false` serves none. Content then adds neither route. See [Sitemap and robots.txt](https://vitehub.dev/docs/frameworks-hosts/sitemap). |
| systemd | `boolean \| SystemdOptions` | `systemd` config key in `vitehub()` | On by default for the `node` host; other hosts ignore it. A production build writes `.output/<name>.service`. `name` defaults to the deployment name. `workingDirectory` defaults to the project root of the build. `environmentFile` defaults to `.env` in that directory, read only when it exists; `false` reads no file. `user`, `group`, and `environment` add `User=`, `Group=`, and `Environment=`. `TimeoutStopSec` is the `agent.shutdown.drainMs` budget, or `environment.VITEHUB_SHUTDOWN_DRAIN_MS`, plus 30 seconds. `false` writes no unit. See [Run the server with systemd](https://vitehub.dev/docs/frameworks-hosts/node-self-hosted#run-the-server-with-systemd). |
| Workflow | `WorkflowOptions` | `workflow` config key or `hubWorkflow(options)` | `false` disables Workflow in `vitehub()`. Omission turns it on when `server/workflows/` exists; `true` enables inferred defaults, and an options object enables and configures it. `driver`: `cloudflare`, `openworkflow`, or `vercel`. Cloudflare hosting selects `cloudflare`; Node or Docker hosting, also `vite dev` with the `node` host, selects `openworkflow`; Vercel selects `vercel`. Deno builds require a driver or OpenWorkflow storage; development and Agent-only Workflows can run inline. Netlify does not infer a driver. Shared fields are `binding` and `name`. OpenWorkflow fields are `postgres`, `sqlite`, and `worker`. Each Nitro server starts the OpenWorkflow worker; `worker: false` turns it off, and `worker.concurrency` sets how many runs it executes at the same time. Without `postgres.url` or `sqlite.path`, OpenWorkflow uses `OPENWORKFLOW_POSTGRES_URL`, then the app's Postgres Default Database, else a SQLite file. `vite dev` uses the SQLite file unless `remote: true`. Only discovered Workflow files run on OpenWorkflow; other Workflows run inline. Select storage with `postgres.url` or `sqlite.path`; `workflow.database` is unsupported. |
| Workspace | `WorkspaceOptions` | `workspace` config key or `hubWorkspace(options)` | `false` disables Workspace in `vitehub()`. Omission turns it on when `server/workspaces/` exists; `true` enables inferred defaults, and an options object enables and configures it. `root` defaults to `.vitehub/workspaces`. `projectRoot` changes source root resolution. `assets` controls build-time asset generation. `store` driver literals are `local`, `memory`, `cloudflare`, `vercel`, and `github`. Explicit `cloudflare` selection generates its Cloudflare binding. Defaults: local development uses `local`; Cloudflare hosting uses `memory`; `BLOB_STORE_ID` or `BLOB_READ_WRITE_TOKEN` selects `vercel`; Vercel hosting without Blob env uses `memory`; otherwise `local`. |

Use the ViteHub `cache` integration when Nitro cache storage should use a host-appropriate driver. Cache is for replaceable values. It is not the source of truth for durable application data.

Read the [configuration reference](https://vitehub.dev/docs/reference/config-options#vite-integration-options) and the [host guide](https://vitehub.dev/docs/frameworks-hosts). The integration selects Cloudflare KV, Vercel runtime cache, Deno KV, or local filesystem storage from the host and options.

Keep cache keys, expiry, and invalidation in application code. To clear related entries together, use `tags` and `invalidateTag()` from `vite-hub/cache`. To return the stored value when a cached third-party call fails, use `staleIfError` on `defineCachedFunction()` from `vite-hub/cache`. See [Cache server results](https://vitehub.dev/docs/guides/cache-server-results). Inspect and clear entries with `vitehub cache list`, `get`, and `delete`. A `nitro.kv` (`nitro.storage` in Nuxt) cache mount takes precedence over the ViteHub cache option. Netlify requires an explicit supported arrangement.

Prove a miss, a hit, expiry or invalidation, and the selected host output. Never use cache as the only copy of data that must survive eviction.

## Option placement

| Option kind | Belongs in | Example |
| --- | --- | --- |
| Integration Options | `vitehub()` or package integration call | Provider choice, generated output mode, project root. |
| Definition Options | The Definition file (`define*()`) | Queue concurrency, Database tables, Workspace Sources and rules. |
| Invocation Options | Runtime Helper call | Sandbox Identity, Agent input options, schedule creation input. |
| Runtime Env | Server Env | Provider tokens, app secrets, request-time runtime values. |

This page only summarizes provider driver fields. For deep provider setup, read the exported package types. Keep provider choices in Integration Options, unless the package documents an invocation-time option.

## Agent eval options

Set Agent Eval Runner defaults in the Agent options.

### Nuxt

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['vite-hub/nuxt'],
  vitehub: {
    agent: {
      eval: {
        cache: true,
        maxConcurrency: 2,
        scoreThreshold: 85,
        testTimeout: 60_000,
      },
    },
  },
})
```

### Nitro

```ts [vite.config.ts]
import { defineConfig } from 'vite'
import { nitro } from 'nitro/vite'
import { vitehub } from 'vite-hub'

export default defineConfig({
  plugins: [
    vitehub({
      agent: {
        eval: {
          cache: true,
          maxConcurrency: 2,
          scoreThreshold: 85,
          testTimeout: 60_000,
        },
      },
    }),
    nitro(),
  ],
})
```

### Vite

```ts [vite.config.ts]
import { defineConfig } from 'vite'
import { vitehub } from 'vite-hub'

export default defineConfig({
  plugins: [
    vitehub({
      agent: {
        eval: {
          cache: true,
          maxConcurrency: 2,
          scoreThreshold: 85,
          testTimeout: 60_000,
        },
      },
    }),
  ],
})
```

## Env options

Env keeps Public Env, compile-time define values, and Server Env apart. Put secrets in `env.server`, never in `env.public` or `env.define`.

### Nuxt

```ts [nuxt.config.ts]
import { env } from 'vite-hub/env'

export default defineNuxtConfig({
  modules: ['vite-hub/nuxt'],
  vitehub: {
    env: {
      diagnostics: 'summary',
      providers: { credentials: './server/env/credentials.ts' },
      public: {
        appName: env({ default: 'Acme', mode: 'build' }),
      },
      server: {
        apiToken: env({ secret: true, source: env.source('API_TOKEN') }),
        githubToken: env({ secret: true, source: env.provider('credentials', 'github/token') }),
      },
    },
  },
})
```

### Nitro

```ts [vite.config.ts]
import { defineConfig } from 'vite'
import { nitro } from 'nitro/vite'
import { vitehub } from 'vite-hub'
import { env } from 'vite-hub/env'

export default defineConfig({
  plugins: [vitehub({
    env: {
      diagnostics: 'summary',
      providers: { credentials: './server/env/credentials.ts' },
      public: {
        appName: env({ default: 'Acme', mode: 'build' }),
      },
      server: {
        apiToken: env({ secret: true, source: env.source('API_TOKEN') }),
        githubToken: env({ secret: true, source: env.provider('credentials', 'github/token') }),
      },
    },
  }), nitro()],
})
```

### Vite

```ts [vite.config.ts]
import { defineConfig } from 'vite'
import { vitehub } from 'vite-hub'
import { env } from 'vite-hub/env'

export default defineConfig({
  plugins: [vitehub({
    env: {
      diagnostics: 'summary',
      providers: { credentials: './server/env/credentials.ts' },
      public: {
        appName: env({ default: 'Acme', mode: 'build' }),
      },
      server: {
        apiToken: env({ secret: true, source: env.source('API_TOKEN') }),
        githubToken: env({ secret: true, source: env.provider('credentials', 'github/token') }),
      },
    },
  })],
})
```

## Related

- [Vite](https://vitehub.dev/docs/frameworks-hosts)
- [Runtime and host support](https://vitehub.dev/docs/frameworks-hosts/support-matrix)
- [Provisioning](https://vitehub.dev/docs/development/provisioning)
- [Provider output](https://vitehub.dev/docs/reference/provider-output)

<!-- vitehub-docs:section-links -->
## In this section

- Setup
  - [Package reference](https://vitehub.dev/raw/docs/reference.md)
  - [Import paths](https://vitehub.dev/raw/docs/reference/import-paths.md)
  - [File conventions](https://vitehub.dev/raw/docs/reference/file-conventions.md)
  - [Config options](https://vitehub.dev/raw/docs/reference/config-options.md) (this page)
- [Runtime and output](https://vitehub.dev/raw/docs/reference/provider-output.md)

Next: [Provider output](https://vitehub.dev/raw/docs/reference/provider-output.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
