Skip to main content
Platforms

Deploying to Rivet Compute

Run your backend on Rivet Compute.

Rivet Compute is currently in beta.

Using an AI coding agent? Open Connect on the Rivet dashboard, select Rivet Cloud, and paste the one-shot prompt into your agent and have it connect with Rivet Compute for you.

Steps

Prerequisites

Create a Dockerfile

Add a Dockerfile to your project root that builds and runs your RivetKit server:

FROM node:24-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
CMD ["node", "src/server.js"]

Get Your Cloud Token

  1. Open the Rivet dashboard and navigate to your project
  2. Click Connect and select Rivet Cloud
  3. Copy the RIVET_CLOUD_TOKEN value shown

Deploy

Run the deploy command from your project root. The token is saved to ~/.rivet/credentials, so later deploys can omit it.

npx @rivetkit/cli deploy --token cloud_api_xxxxx

The CLI resolves your project from the token, builds and pushes your Docker image to Rivet’s built-in registry, upserts the managed pool, and prints the deployment URL on stdout when the pool is ready.

Optionally Add CI

After local deploys work, install the GitHub Actions workflow that deploys on every push and pull request:

npx @rivetkit/cli setup-ci

This writes .github/workflows/rivet-deploy.yml. Add your token as a repository secret to enable it:

gh secret set RIVET_CLOUD_TOKEN

The workflow creates production and pull-request namespaces, posts preview links, and cleans up PR namespaces when pull requests close. See the CLI reference for all commands.

Monitor Deployment

The dashboard shows live status as Rivet Compute provisions your backend:

StatusDescription
ProvisioningAllocating compute resources
InitializingStarting the runtime environment
AllocatingAssigning the runner to your pool
DeployingPulling and launching your container
BindingConnecting the runner to the network
ReadyDeployment complete

Once the status reaches Ready, your backend is live and actors are available for connections.

Troubleshooting