Rust deployment guide # Deploy rust on Deplomo Deploy Rust on Deplomo for Axum, Actix Web, and Rocket. Connect from Git or the CLI, set build and run commands, configure environment variables and a domain, then deploy your Rust service. Short answer forDeploy rust For Axum and Actix Web, an optimized release build runs directly on the server. To learn about container environments, see the [Cloud containers](/products/containers) dedicated [Rust hosting](/products/rust) and the guide [Deployment guide](/guides) guide. Last reviewed:6 September 2026 ## Prepare your project for Deploy rust Add the project dependency files, `Cargo.toml and Cargo.lock` to your Git repository. Default build and run commands for this stack: ``` # Build command cargo build --release # Run command ./target/release/app ``` Match the binary name to the project package and configure the listener for 0.0.0.0:$PORT. ## Automatic deployment directly from the Git repository - Create a new project and environment in the Deplomo user panel. - Connect the service to the GitHub or GitLab repository and the desired branch. - Set the build and run commands to match your project. - Set the required environment variables, then deploy. - Connect your custom domain in the Domains section and use free SSL. ## Deploy a local folder with Deplomo CLI ``` curl -fsSL https://get.deplomo.com/install.sh | sh deplomo login cd your-project deplomo deploy deplomo logs ``` Use the Deplomo CLI to deploy local code directly without pushing it to Git. On Windows (PowerShell), use `irm https://get.deplomo.com/install.ps1 | iex` instead of the first command. ## Production tips for Rust - Keep Cargo.lock in Git for production applications. - Use a multi-stage build to reduce image size. - Handle SIGTERM and drain connections during shutdown. - Check the health check and startup time before routing live traffic. - Store persistent data and user files on persistent disks or cloud storage. ## Frequently asked questions ### How do I deploy and build Rust apps? The Rust build runs cargo build --release to compile the final binary for production. ### How much RAM does a Rust project need to deploy? Rust builds can use more memory during compilation. After deployment, the optimized binary may use less RAM.