Back to Demo Projects
🦀

Deploy Rust to Your VPS

Install and self-host Rust on any VPS. Install and deploy Rust to your VPS with this ready-to-use demo project. Self-host Rust on any server with Docker, health checks, and environment variables. Built with Rust, Actix-web/Axum, PostgreSQL.

Tech Stack

Rust

Actix-web/Axum

PostgreSQL

SQLx/Diesel

Docker

Install & Run on Your VPS

1Clone the repository
git clone https://github.com/kai-builder/servercompass-rust-actix-demo.git
2Navigate to project
cd servercompass-rust-actix-demo
3Build Docker image
docker build -t servercompass-rust-actix-demo .
4Run the container
docker run -d -p 3000:3000 --env-file .env servercompass-rust-actix-demo

API Endpoints

MethodEndpointDescription
GET/Main application page or API root
GET/api/envDisplay public environment variables
GET/healthHealth check endpoint for monitoring

Environment Variables

VariableTypeDescription
APP_NAMEPublicApplication display name
APP_ENVPublicEnvironment (development/production)
PUBLIC_URLPublicPublic-facing URL of the application
SECRET_KEYPrivateApplication secret key for signing
DATABASE_URLPrivateDatabase connection string

Self-Host Rust on Your VPS

1

Connect Your VPS

Add your VPS to Server Compass. Install on any Ubuntu/Debian server from DigitalOcean, Hetzner, Linode, or any provider.

2

Deploy from GitHub

Connect your GitHub account and deploy this Rust project to your VPS. Server Compass builds and deploys automatically.

3

Configure Environment

Set environment variables, configure your domain, and enable auto-SSL. Self-host Rust with zero DevOps required.

4

Go Live on Your Server

Your Rust app is live on your VPS with Docker containers, Nginx reverse proxy, SSL certificates, and health monitoring.

🦀

Rust Web Stack Deployment Guide

Learn how to install and deploy Rust on your VPS. Includes use cases, self-hosting benefits, related templates, and tutorials.

🦀

Ready to Self-Host Rust?

Install Server Compass and deploy Rust to your VPS in minutes. Self-host on any server. One-time payment, no monthly fees.