---
title: "Rust hosting on Fly.io: deploy compiled binaries without managing servers"
description: "Rust hosting on Fly.io. Deploy a Rust app in minutes with flyctl; Fly.io terminates TLS and rolls out each release, billed per second while it runs."
---

# Rust hosting on Fly.io: deploy compiled binaries without managing servers

Build and scale Rust apps on a developer-focused public cloud.

[Launch Now](https://fly.io/app/sign-up)

Ready, Set, Go!

## Speedrun Your Rust App Onto Fly.io

Deploy a Rust app to Fly.io in a few minutes with Fly.io's command line tool, `flyctl`.

[Get Started](https://docs.fly.io/rust)

```
> Install flyctl on GNU/Linux
$ curl -L https://fly.io/install.sh | sh

> Run from Rust project root
$ fly launch

> Scale CPU, memory & instances
$ fly scale
```

Not on GNU/Linux? [Install flyctl for your platform.](https://docs.fly.io/flyctl/install)

Up, Up, and Away!

## From Cargo Project to Running App with Fly.io

Run `fly launch` in your project root and it scans the source, writes a `fly.toml` and a Dockerfile (or uses the Dockerfile you already have), and deploys. Every release after that is `fly deploy`, which builds the new image and rolls it out. Your compiled binary ships as it is, with nothing to rewrite for the platform.

Effortless Scaling Made for Rust

## One Image, Every Process Your Rust App Needs

A Rust service is rarely just a web server. Add a `[processes]` section to `fly.toml` and we run your web server, a background worker and a scheduled job from the same image as separate process groups. Each group scales on its own with `fly scale count`, so a busy queue gets more workers without adding web Machines you don't need, and one deploy updates them all.

NEW!

## Managed Postgres for Rust Projects

Focus on features and leave database management to Fly.io. Our Managed Postgres service, gives you:

- Automatic backups and recovery
- High availability with automatic failover
- Performance monitoring and metrics
- Resource scaling (CPU, RAM, storage)
- Automatic encryption of data at rest and in transit

[Learn More](https://fly.io/mpg/)

Quick and Easy Set-up

## From Concept to Launch, Faster Than Ever

Starting fresh with Fly.io feels like a breeze. We've streamlined the process so you can deploy your Rust applications without hassle. Move fast from development to deployment, without compromising the blazing performance and minimal resource usage that come with Rust's compiled binaries.

[Try It Now!](https://fly.io/app/sign-up)

Deploys Without Downtime

## Ship a New Build Without Dropping Requests.

`fly deploy` replaces your Machines one at a time by default. Set `strategy = "bluegreen"` in the `[deploy]` section of `fly.toml` and we boot a full set of new Machines next to the old ones, then move traffic over only after their health checks pass. A build that fails its checks never receives a request, and the version that was working keeps serving.

Pay for What Runs

## Idle Machines Stop, Requests Start Them

Fly Proxy stops your Machines when they sit idle and starts them again on the next request. A stopped Machine is not billed for CPU or RAM, and a running one bills per second. A Rust binary has no interpreter or VM to boot, so there is little between the Machine starting and your code answering.

Secure, Private Networking

## Build with Confidence

Build with confidence knowing your Rust services are protected with built-in secure, private networking, perfectly complementing Rust's memory safety and security-first design philosophy. Your data is safe and your connections are secure.

## Trusted by teams at

- **Secrets Out of Your Repo**
  `fly secrets set` stores API keys and database URLs encrypted and exposes them to your Machines as environment variables. Your app reads them with `std::env::var` at startup, and nothing sensitive lands in `fly.toml` or your Git history.
- **Secure, Private Networking**
  Build with confidence knowing your Rust services are protected with built-in secure, private networking, perfectly complementing Rust's memory safety and security-first design philosophy. Your data is safe and your connections are secure.
- **Built-in Observability**
  It's easy to monitor your Rust app's performance with Fly.io's built-in observability tools. Monitor, troubleshoot, and optimize your Rust applications with real-time metrics and logging that showcase Rust's predictable performance characteristics and zero-cost abstractions.

## Launch Your Rust App into Orbit

Fly.io is tailored for Rust developers seeking to deploy high-performance, memory-safe Rust applications with ease. Get your Rust app up and running in minutes. Say goodbye to infrastructure headaches and focus on building outstanding applications.

[Get Started](https://fly.io/app/sign-up)
