Platforms
Deploying to VMs & Bare Metal
Deploy your RivetKit app to any Linux VM or bare metal host.
Steps
Prerequisites
- A Linux VM or bare metal server with SSH access
- Your RivetKit app
- If you don’t have one, see the Quickstart page or our Examples
- Access to the Rivet Cloud or a self-hosted Rivet Engine
Upload Your App
- Build your RivetKit app locally
- Copy the build output to your server (example):
Command Line
Place the files somewhere readable by the service user, such as /opt/rivetkit-app.
Set Environment Variables
After creating your project on the Rivet dashboard, select VM & Bare Metal as your provider. You’ll be provided RIVET_ENDPOINT and RIVET_PUBLIC_ENDPOINT environment variables to use in the next step.
Create the systemd Service
Create /etc/systemd/system/rivetkit-app.service:
Configuration
Replace the environment values with those from the Rivet dashboard and adjust paths to match your deployment.
Start the Service
Reload systemd units and start the service:
Command Line
Connect to Rivet
- Ensure your server is accessible via a public URL (e.g.
https://my-app.example.com) - On the Rivet dashboard, paste your URL with the
/api/rivetpath into the connect form (e.g.https://my-app.example.com/api/rivet) - Click “Done”
Operating
Restart
Restart the service after deploying new builds or environment changes:
Command Line
Logs
Follow realtime logs when debugging:
Command Line