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
- Your RivetKit app
- If you don’t have one, see the Quickstart page or our Examples
- A Rivet Cloud account and project
- Docker running locally
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
- Open the Rivet dashboard and navigate to your project
- Click Connect and select Rivet Cloud
- Copy the
RIVET_CLOUD_TOKENvalue 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:
| Status | Description |
|---|---|
| Provisioning | Allocating compute resources |
| Initializing | Starting the runtime environment |
| Allocating | Assigning the runner to your pool |
| Deploying | Pulling and launching your container |
| Binding | Connecting the runner to the network |
| Ready | Deployment complete |
Once the status reaches Ready, your backend is live and actors are available for connections.