Platforms

Deploying to Railway

Deploy your RivetKit app to Railway.

Option A: Deploy from Template

If you’re starting from scratch, go to the Connect tab on the Rivet dashboard and follow the Railway deployment steps. This give you a 1-click deploy of the RivetKit Railway template.

Option B: Deploy Manual

Prerequisites

Setup Project for Railway

Ensure your package.json has a start script:

{
  // ...
  "scripts": {
    "start": "node server.js"
  }
  // ... Rest of package.json
}
JSON

Deploy to Railway

  1. Connect your GitHub account to Railway
  2. Select your repository containing your RivetKit app
  3. Railway will automatically detect and deploy your app

Railway will automatically deploy your RivetKit app on every git push.

Detailed steps are available on Railway’s docs.

Set Environment Variables

After selecting your project on the Rivet dashboard, go to Connect > Railway to get the environment variables needed.

To add your environment variables:

  1. Go to your Railway project dashboard
  2. Select your service
  3. Navigate to the Variables tab
  4. Add the required environment variables and deploy your changes

Detailed steps are available on Railway’s docs.

Connect to Rivet

  1. In your Railway project, go to Settings > Networking
  2. Click Create Custom Domain
  3. Click Create Domain to generate a Railway domain (e.g. my-app.railway.app)
  4. On the Rivet dashboard, paste your domain with the /api/rivet path into the connect form (e.g. https://my-app.railway.app/api/rivet)
  5. Click “Done”

Test Your Deployment

Visit your Railway frontend to see everything working.