Platforms
Deploying to Vercel
Deploy your RivetKit app to Vercel.
Steps
Prerequisites
- Vercel account
- Your RivetKit app
- If you don’t have one, see the Quickstart page or our Examples
- Access to the Rivet Cloud or a self-hosted Rivet Engine
Prepare Your Application
Make sure your project is configured correctly for Vercel deployment.
Your Next.js project should have the following structure:
src/app/api/rivet/[...all]/route.ts: RivetKit route handlersrc/actors.ts: Actor definitions and registry
See the Next.js quickstart or the Next.js template to get started.
Your Hono project needs:
- A
vercel.jsonfile with the Hono framework specified:
vercel.json
- Your server file must import from
"hono"for Vercel to recognize the framework:
TypeScript
- Use
.tsfile extensions in imports and configure yourtsconfig.json:
tsconfig.json
See the Hello World template for a complete example.
For more details on Hono deployments, see Vercel’s Hono documentation.
Vercel currently supports Next.js and Hono frameworks for RivetKit deployments.
For other frameworks, consider deploying to Railway, Kubernetes, or another platform.
Deploy to Vercel
- Connect your GitHub repository to Vercel
- Vercel will deploy your app
Configure Preview Deployments (Recommended)
Add a GitHub action to automatically create isolated Rivet namespaces for each PR:
-
Add these secrets to your GitHub repository:
RIVET_CLOUD_TOKEN: Get from Rivet Dashboard → Settings → Advanced → Cloud API TokensVERCEL_TOKEN: Get from Vercel Account Settings
-
Create
.github/workflows/rivet-preview.yml:
YAML