Back to Rivet

Custom Platform

website/src/content/docs/connect/custom.mdx

2.2.12.0 KB
Original Source

Steps

<Steps> <Step title="Prerequisites"> </Step> <Step title="Deploy Your App">

Deploy your RivetKit app to your hosting platform of choice. The specific steps will vary depending on your platform, but ensure:

  1. Your app is built and deployed
  2. The /api/rivet endpoint is publicly accessible
  3. Your app can receive incoming HTTP requests
</Step> <Step title="Set Environment Variables">

After creating your project on the Rivet dashboard, select "Custom" as your provider. You'll be provided two environment variables to configure in your hosting platform:

  • RIVET_ENDPOINT - The endpoint for your app to communicate with Rivet
  • RIVET_PUBLIC_ENDPOINT - The public endpoint for clients to connect to actors

Add these environment variables to your hosting platform's configuration.

</Step> <Step title="Connect to Rivet">
  1. Ensure your app is accessible via a public URL
  2. On the Rivet dashboard, paste your URL with the /api/rivet path into the connect form (e.g. https://my-app.example.com/api/rivet)
  3. Click "Done"
</Step> </Steps>

Requirements

Your hosting platform must support:

  • HTTP endpoints - Your app must be reachable via a public URL
  • Environment variables - To configure the Rivet connection
  • Persistent processes or serverless functions - To handle incoming requests to the /api/rivet endpoint

Troubleshooting

Connection fails

  • Verify your app is publicly accessible
  • Check that the /api/rivet endpoint returns a valid response
  • Ensure environment variables are correctly set

Actors not responding

  • Confirm RIVET_ENDPOINT and RIVET_PUBLIC_ENDPOINT are both configured
  • Check your hosting platform's logs for connection errors