Deploying to Freestyle
Deploy RivetKit app to Freestyle.sh, a cloud platform for running AI-generated code with built-in security and scalability.
Freestyle provides built-in security for running untrusted AI-generated code, making it ideal for AI agent applications. Using Rivet, it is easy to deploy your vibe-coded or user-provided RivetKit backends straight to Freestyle.
Setup
Install packages
Install RivetKit and Hono and create your registry:
Configure serverless driver
Update your server code to run the registry serverless with Deno.
Deploy to Freestyle
Deploy your application to Freestyle with the correct configuration. Create a deployment script or add this to your existing deployment process:
Details on buildDir and other settings are available on Freestyle docs.
Run this deployment script to push your application to Freestyle.
Deployment Configuration:
timeout: 60 * 5- Set timeout to 5 minutes for actor operations - it's important to keep this highentrypoint: "server.ts"- Entry point file with your serverless setupdomains- Your Freestyle domain(s)build: false- Disable build if you're pre-building your assets
Configure runner
Update the runner configuration on the Rivet side to connect with your Freestyle deployment. Create a configuration script and run it after your Freestyle deployment is live:
Execute this configuration script to register your Freestyle deployment with Rivet.
Runner Configuration:
url- Freestyle deployment URL with/startendpointrunnersMargin- Buffer of runners to maintainminRunners/maxRunners- Scaling limitsslotsPerRunner- Concurrent actors per runnerrequestLifespan- Request timeout (slightly less than Freestyle timeout)
Once executed, Rivet will be connected to your Freestyle serverless instance.