Skip to main content
Self-host Veryfront Code in your own cloud, private network, or on-premises environment. Self-hosting does not require a Veryfront account. Self-hosted projects can use OIDC application auth with the same declarative security.auth.oidc config used in Cloud. If a reverse proxy already authenticates users, use security.auth.trustedProxy only when the runtime origin is reachable solely from trusted peers and the proxy strips incoming identity headers before setting its own. See Application authentication.

Prerequisites

  • A project that passes the Local quickstart.
  • Inference available from a provider API, an OpenAI-compatible service, or a built-in local model. See Providers.
  • A host that supports the current Node.js LTS, Deno, Bun, or containers.

Check capability support

Choose substitutes for managed capabilities before you deploy. Allow local integration credentials in the host process before you materialize any local source, both the catalog source and the Salesforce service-account source below:
.env
This is a host-owned capability. Project environment overlays cannot enable it. Leave it unset on shared or proxy runtimes. Without it, both sources refuse to list or execute a tool. If you already run a local source, set this variable before you upgrade, or discovery starts failing. Veryfront does not infer the deployment shape. Setting this exact variable authorizes the current non-proxy process. Local integration credentials are unavailable inside an effective isolated worker. The WORKER_ISOLATION_ENABLED=1 master switch enables no surface by itself, but an enabled isolation surface runs its project worker with the Deno env permission denied. That worker cannot read this grant or any host credential. Run local integration sources outside effective isolated worker surfaces. For supported fixed REST tools, create a local source with the exact canonical tool IDs the application grants:
Pass integrationTools to an agent’s tools option. The source resolves credentials from the project environment by default and never sends them to Veryfront. Managed per-user OAuth and connector features outside the supported local subset still require the configured API layer.

Run Salesforce integration tools locally

The Salesforce service account source runs the catalog’s fixed Salesforce REST tools without a backing API. Use a dedicated Salesforce integration user and External Client App with the OAuth client credentials flow. Existing Connected Apps remain supported. Set these values in the project environment used by the self-hosted runtime:
.env
The login URL must be the target org’s My Domain HTTPS origin. Generic login.salesforce.com and test.salesforce.com endpoints are rejected. Create one materialized tool map for each agent boundary and enumerate the exact tools that agent can use:
lib/case-ingest-salesforce-tools.ts
Pass the materialized tools through the agent’s public tools field:
agents/case-ingest.ts
Credentials stay in the local runtime process. Tool discovery exposes only tool names, descriptions, and input schemas. Credential resolution happens when a tool executes, and requests go directly to the configured Salesforce org through an origin-bound outbound transport. Credentials do not enter prompts, tool metadata, URLs, logs, or project files. The source does not implement interactive user OAuth. Use the managed backing API when each tool call must use an individual user’s Salesforce connection.

Build the project

The build writes browser assets to dist/. API routes, agents, workflows, and tasks remain in the project source.

Test the production server

Open http://localhost:3000 and confirm the app works with the production build.

Create a container

You must ship the whole project directory, not just dist/. Add a .dockerignore so local dependencies, credentials, and build state stay out of the image:
.dockerignore
Add this Dockerfile:
npm ci installs the project-local Veryfront CLI from the lockfile before the image builds the app. Copying the package files first also lets Docker reuse the dependency layer when only application code changes. Create .env with the runtime credentials. Do not commit this file:
.env
Replace <API_KEY> with your OpenAI API key before you run the container or Kubernetes commands. Build and run the image:
Set provider credentials and other secrets through the host environment. The .dockerignore keeps .env files out of the image.

Deploy to Kubernetes

Tag and push the image to a registry that your cluster can read:
Create a namespace and a Secret from the same uncommitted .env file:
Add k8s.yaml. Replace the image placeholder with the immutable tag you pushed:
k8s.yaml
Apply the resources and wait for the Deployment:
When you change .env, rerun the Secret command above, then restart the Deployment so new Pods read the updated values:
Open a local tunnel to the Service:
Open http://localhost:3000. Add an Ingress or service load balancer according to your cluster platform after the local tunnel works. Keep TLS and public access policy at that boundary.

Verify it worked

Open http://localhost:3000 and send a message to the agent. Confirm the page, API route, and inference provider behave as they did under veryfront serve. Deploy the same container to any environment that can run it. The runtime does not require Veryfront Cloud. For production server options, see the Server reference.