BIENVENUE10valid for the first month only! on all offersView plans
Skip to content
← Knowledge base

Deploy a Rust application on onesubnet

Compile a Rust binary (cargo) and run it: build, port via env, environment variables.

Deploy a Rust application on onesubnet

onesubnet compiles your Rust binaries (Actix, Axum, Rocket…) and runs them. Deploy via Git.

1. Prepare the project

  • A Cargo.toml at the root.
  • Make your server listen on the port from the PORT variable:
let port: u16 = std::env::var("PORT").unwrap_or("8080".into()).parse().unwrap();
axum::serve(listener, app).await.unwrap();

2. Deploy

  1. Connect your Git repository in the panel.
  2. Build command: cargo build --release
  3. Start command: ./target/release/<binary_name>

3. Environment variables

DATABASE_URL, secrets, etc. in Settings → Environment.

4. Logs

Live console in the panel. Use the tracing crate for structured logs.

References

Related products

oneSubnet

French hosting provider in Paris. High-performance game and voice servers.

SERVICES

Resources

LEGAL

All systems operational