cargo run --release, which produces an optimized binary ready for production workloads. You do not need to pre-compile your project or manage a build pipeline — Virtus Cloud handles the build on every deployment. This guide walks you through the full process.
Prerequisites
Before you deploy, make sure you have the following:- Rust and Cargo installed locally. Download them from the official Rust website.
- A Virtus Cloud account — sign up at virtuscloud.app/login using your email or Discord.
- An active paid plan on your account. Browse plans at virtuscloud.app/plans.
Rust version
Virtus Cloud provides the following Rust versions:VERSION value | Rust version |
|---|---|
recommended | 1.89.0 |
latest | 1.89.0 |
Create your config file
Every Virtus Cloud deployment requires avirtuscloud.app configuration file at the root of your project. Set MAIN to your primary Rust source file (typically main.rs or a path like src/main.rs).
Config File Reference
Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
virtuscloud.app
Startup behavior
Virtus Cloud determines how to start your application based on whether theSTART field is set in your config file.
- If
STARTis not set, the platform runscargo run --releaseto build and execute your project in release mode. This optimizes the binary for performance, which is the recommended approach for production. - If
STARTis set, the platform executes theSTARTcommand directly, bypassing the default build behavior.
Custom start command example
The first deployment may take longer than expected because Cargo compiles your project from scratch. Subsequent deploys reuse the build cache when possible.
For more information on all startup parameters, see the Config File Reference.
Required files
Your ZIP archive must include the following files:| File | Purpose |
|---|---|
virtuscloud.app or virtuscloud.config | Platform configuration |
src/main.rs (or your Rust source files) | Application source code |
Cargo.toml | Crate manifest and dependency list |
Upload your project
Once your files are ready, package them into a.zip archive and upload using your preferred method.
- CLI upload
- Dashboard upload
Install the CLI
If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:To update an existing installation:
Authenticate
Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
Troubleshooting
The main file is invalid or corrupted
The main file is invalid or corrupted
This error appears when the file path in your
MAIN parameter does not match a file in your ZIP archive. Verify the path is correct relative to the ZIP root. A common value is MAIN=src/main.rs.Bad Memory
Bad Memory
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. Cargo compilation is memory-intensive — if you see out-of-memory errors during the build phase, increase the
MEMORY value in your config file. See the LACK_OF_RAM troubleshooting guide for details.Cargo.toml dependency errors
Cargo.toml dependency errors
If Cargo fails to resolve a dependency, check that all crate names and version constraints in your
Cargo.toml are correct. Run cargo build --release locally first to confirm your project compiles cleanly before uploading.