Deploy Rust in minutes

Rust web servers — Axum, Actix Web, Rocket — compile to a single fast binary that runs in a tiny container. Add the multi-stage Dockerfile below, pick the Dockerfile preset, and ship behind automatic HTTPS.

Deploy from GitHub Automatic HTTPS subdomain Live build & runtime logs
Step by step

How to deploy Rust

Darmi Cloud doesn't have a dedicated Rust preset yet — but the Dockerfile preset gets you deployed just as fast.

  1. 1

    Add a Dockerfile to your repo

    Commit the Dockerfile below to the root of your Rust repository. Darmi Cloud will build the image from it.

  2. 2

    Sign in with GitHub

    Open darmicloud.tech and sign in with GitHub (or Google). On first sign-in you grant read access so the deploy worker can clone your repositories.

  3. 3

    Import your repository

    Click New Project, pick your Rust repository, and choose the branch to deploy — the default branch is preselected.

  4. 4

    Select the Dockerfile preset

    Choose the Dockerfile preset so Darmi Cloud builds and runs the image from your committed Dockerfile. Set the container port to 8080.

  5. 5

    Add environment variables

    Add any environment variables your app needs (database URLs, API keys, secrets). Mark sensitive values as secrets — they are injected into the container and hidden in the UI afterwards.

  6. 6

    Deploy and watch it go live

    Click Deploy. Watch the live build and runtime logs, and your app goes live on an automatic HTTPS subdomain. Every push to your branch redeploys automatically.

Dockerfile for Rust

Copy this into a file named Dockerfile at the root of your repository.

# syntax=docker/dockerfile:1
FROM rust:1 AS build
WORKDIR /app
COPY . .
RUN cargo build --release

FROM debian:bookworm-slim
RUN apt-get update -qq && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
# Replace "server" with your crate's binary name
COPY --from=build /app/target/release/server /server
ENV PORT=8080
EXPOSE 8080
CMD ["/server"]

Tips for Rust on Darmi Cloud

  • Read the port from the PORT environment variable and bind to 0.0.0.0, not 127.0.0.1.
  • Replace "server" in the COPY line with your binary name from Cargo.toml ([[bin]] or the package name).
  • Release builds are slow the first time — subsequent deploys are faster thanks to Docker layer caching of dependencies.
FAQ

Rust deployment FAQ

Which Rust frameworks work on Darmi Cloud?

Any framework that serves HTTP — Axum, Actix Web, Rocket, Warp — works with the Dockerfile preset. The container just runs your compiled binary.

How big is a deployed Rust container?

With a multi-stage build on debian-slim the image is typically tens of megabytes; using a distroless or scratch base with musl can shrink it further.

Can I use my own custom domain?

Yes. Connect an existing domain or buy one inside Darmi Cloud. DNS is configured automatically and every domain gets free SSL via Let's Encrypt.

Is there a free plan?

Yes. The Free plan deploys one project on an automatic HTTPS subdomain with auto-deploy on every push. Paid plans add custom domains, PR preview deployments and more projects.

Deploy other frameworks

Ready to deploy your Rust app?

Connect GitHub and ship in minutes — on a free HTTPS subdomain, or on your own custom domain.

Deploy Rust now