Deploy
Deploying to VMs & Bare Metal
Run your backend on any Linux VM or bare metal host with a basic systemd unit.
Guide
Upload Your App
- Build your backend locally.
- Copy the build output to your server (example):
Command Line
Place the files somewhere readable by the service user, such as /opt/backend.
Generate Environment Variables
Navigate to Rivet and click Connect > Manual. Copy the environment variables provided, they will be used in the next step. They should look something like this:
Command Line
Create the systemd Service
Create /etc/systemd/system/backend.service:
Configuration
Replace the environment values with those from the Connect tab in the Rivet dashboard (or your self-hosted engine) and adjust paths to match your deployment.
Start and Manage the Service
Reload systemd units and start the service:
Command Line
Operating
Restart
Restart the service after deploying new builds or environment changes:
Command Line
Logs
Follow realtime logs when debugging:
Command Line