Deploy Rust

Deploy Rust on your own server.

Deploy a Rust service on your own server: a release binary built for you, health-checked rollouts with no downtime, and HTTPS on your domain.

Rust on Beep
Build
Railpack (auto)
Start
./your-binary
Port
$PORT, set by Beep
Health check
/health

Step by step.

  1. Connect a server

    Use Beep Cloud, a server in your own cloud account, or any Ubuntu or Debian VPS. Beep installs its runtime and agent and locks the server down: inbound traffic is denied, and app ports are reachable only from Beep’s edge.

  2. Create a service from your repository

    Pick the GitHub or GitLab repository and the branch to track. In a monorepo, set the root directory for this service; watch paths limit rebuilds to changes that touch it.

  3. Let Beep build it

    Beep detects Rust from Cargo.toml and builds your binary. You can override the install, build or start command on the service.

    Start command
    ./your-binary
  4. Listen on $PORT

    Beep sets PORT for every service unless you set it yourself, and routes traffic from its edge to that port. Bind to 0.0.0.0 so the edge can reach the container.

    main.rs
    let port = std::env::var("PORT").unwrap_or_else(|_| "8080".into());
    let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{port}")).await?;
    axum::serve(listener, app).await?;
  5. Add a database

    Add managed Postgres (16 to 18, with pgvector and PostGIS), Redis or Valkey to the project, then reference its connection string from your service. References resolve at deploy time.

    main.rs
    let pool = sqlx::PgPool::connect(&std::env::var("DATABASE_URL")?).await?;
    sqlx::migrate!().run(&pool).await?;
    // DATABASE_URL=${{ postgres.DATABASE_URL }}
  6. Set a health check and deploy

    Set the health check path to /health. Every push to the tracked branch builds and releases; traffic moves to the new version only once it passes, and rolling back re-releases an earlier image without a rebuild.

  7. Add your domain

    Every service starts with a URL on edge.usebeep.sh. When it works, point a CNAME for your domain at Beep; the certificate is issued and renewed for you. Each GitHub pull request also gets its own preview environment, removed when it closes.

Rust tips.

Embedding migrations with sqlx::migrate!() runs them at startup, so no pre-deploy command is needed.

Set SQLX_OFFLINE=true and commit the .sqlx directory so builds don’t need a database.

Release builds are CPU-heavy; a dedicated build server keeps them off your production box.

Rust on Beep, answered.

Straight answers. Anything missing, ask us directly.

Do I need a Dockerfile to deploy Rust?

No. Beep detects Rust from Cargo.toml and builds your binary. If your project already has a Dockerfile, you can build with that instead.

Where does the Rust app run?

On the server you connected: Beep Cloud, your own cloud account or any Ubuntu or Debian VPS. Beep bills per server, so databases, workers and previews on the same server add nothing to the plan.

Can I SSH into the server?

No, and that’s deliberate: Beep manages each host end to end so manual changes can’t drift from its setup. To debug, open a shell inside any container from the dashboard, next to its logs and metrics.

Own your infrastructure again.

Plans from $1 a month, billed per server, never per service.

Early access · We’ll set up your workspace

Or talk to us →