New to full self-hosting? Read the Overview first.
What runs in your project
Check the prerequisites
- A GCP project you can administer (or create), with a billing account you can link.
- Permission to create a Google OAuth client for console sign-in.
- A static host for the console and a CDN for the SDK. If you have neither, the agent can use Firebase Hosting in the same project.
- Your own Gemini and Anthropic API keys.
- Someone available to run an AI coding agent for the duration.
gcloud, the firebase CLI, Terraform 1.5+, oras, cosign, Node 20+, Docker, curl, python3, and jq. The agent checks versions before it starts and stops if anything is missing.Start your agent
Copy the agent instructions from the Install guide and paste them into your AI coding agent. Then start it with a prompt like this, filled in with your inputs:The agent ends with a final report: your endpoints, your app’s config, and where every secret is stored. Keep
velt-selfhost-state.json; you need it to upgrade later.Stay available for the human steps
The agent pauses and asks at each of these moments, with the exact command or console link.
Wire your app
Hosting the SDK on your CDN only moves the code. Pass the Rules that break production if violated:
selfHosted config the agent generated so the SDK also talks only to your deployment.- React / Next.js
- Other Frameworks
- The SDK lives at exactly
/lib/sdk@<version>/velt.json your CDN, with all its chunks in the same folder. - Every
.jsfile sends anAccess-Control-Allow-Originheader. Missing CORS is the most common failure. - Use the generated
selfHostedfile as is. It setsstrict: trueand the exact list of deployed features. - Allow your CDN in your Content Security Policy’s
script-src, and removecdn.velt.devonce you cut over.
selfHosted config.Confirm it is done
The deployment is complete only when all four pass:
- Console sign-in as a seeded admin lands on the dashboard with the workspace and keys.
- The app loads
velt.jsand its chunks from your CDN, andwindow.Velt.versionmatches the pin. - A comment created in the app appears in the console’s data browser.
- The browser’s network log for both the app and the console shows no requests to
velt.devor other Velt-owned hosts.
Troubleshooting your app
For infrastructure errors, ask your agent: the agent instructions include the full troubleshooting table.
Upgrading later
Upgrades are a delta, not a reinstall. Hand your agent the Upgrade guide and yourvelt-selfhost-state.json. It compares the new release with the installed one and updates only what changed. Releases don’t require data migrations today; if one ever does, its release notes say so.
