Guides · FOR

Best hosting for a Rust web service in 2026: a small VPS

We are paid if you buy through an 'Order' link. 'Visit' links pay us nothing.

Prices in this guide, checked 28 Nov 2026

  1. Webdock VPS Essential1 vCPU, 2 GB, 15 GB NVMe

    $2.36/mo before tax · billed €2.15 (euro rate of 27 Nov 2026)checked 28 Nov 2026

  2. Vultr Regular 512MB1 vCPU, 0.5 GB, 10 GB SSD

    $3.50/mo before taxchecked 28 Nov 2026

  3. Hetzner CPX021 vCPU, 1 GB, 20 GB NVMe

    $8.09/mo before tax · $7.49 server + $0.60 IPv4 · Germany; $6.59 in Helsinkichecked 28 Nov 2026

How we pick: the plans this guide names, then the providers it names, then the cheapest we would pick, in that order, each one you can order today; cheapest first within each of the three. Figures in the text below were written 22 Sep 2026. Prices in this table were checked 28 Nov 2026 on each provider's own site. How we check prices

Rust web services (Axum, Actix, Rocket, Warp) have a specific advantage as a hosting workload: they use dramatically less RAM and CPU than equivalent Node, Python or Ruby apps. A Rust service handling 10,000 requests per second comfortably fits on a $4.60 Hetzner CX22 — the same box a WordPress site would need with far less headroom.

Figures in this text were written 22 Sep 2026.

What Rust actually needs

  • RAM: 512 MB - 2 GB for most services. Rust binaries are small; the compiled service itself uses ~10-50 MB baseline. Most memory usage comes from your data structures, not the framework.
  • vCPU: 1-2 for small services, 2-4 for high-throughput. Rust's async runtime scales well across cores.
  • NVMe storage. Only matters for logs and any local state.
  • Fast network for external service calls.
  • Latest Rust toolchain for optimal compile output.

Recommended picks

Small production Rust service ($5-8/mo)

Hetzner CX22 at $4.60/mo — 2 vCPU, 4 GB RAM. Overkill for most Rust services in a good way. Cross-compile locally or build on the box (Rust compilation is CPU-hungry but only during builds).

Alternative: Vultr Regular 1 GB at $5/mo if you need the specific regions Vultr has.

Real production Rust service with Postgres ($10-20/mo)

Hetzner CX32 at $7.60/mo — 4 vCPU, 8 GB. Run your Rust service, Postgres, and Redis all on the same box. Rust's efficiency lets you consolidate services that would need multiple boxes on Node or Python.

CPU-bound Rust workload (heavy compute) ($15-30/mo)

Hetzner CPX31 at $15.60/mo — 4 AMD vCPU, 8 GB. AMD's single-thread performance is a real win for CPU-bound Rust workloads.

Or Vultr High Frequency for 3.7+ GHz single-thread — Rust benchmarks generally show meaningful gains.

Deploying Rust: the systemd + reverse proxy pattern

Rust services deploy as a single statically-linked binary. Trivial to run under systemd:

/etc/systemd/system/myservice.service:

[Unit]
Description=My Rust web service
After=network.target

[Service]
Type=simple
User=deploy
WorkingDirectory=/opt/myservice
Environment=RUST_LOG=info
Environment=DATABASE_URL=postgres://...
ExecStart=/opt/myservice/myservice
Restart=always

[Install]
WantedBy=multi-user.target

systemctl enable --now myservice.

Nginx reverse proxy:

server {
    server_name api.yourdomain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

certbot --nginx -d api.yourdomain.com for SSL.

Building Rust on cheap VPS

Building Rust from source is CPU-hungry. On a small VPS (2 GB or less), the compiler can OOM.

Options:

  • Cross-compile locally and scp the binary to the VPS. Cleanest.
  • Use cargo build --release --jobs 1 on the VPS to limit parallelism.
  • Add swap space to the VPS if it's under 4 GB.

For CI: build on a bigger box (GitHub Actions runner, or a dedicated Hetzner CX32) and deploy the binary.

Rust deployment patterns

Static binary + systemd. Simplest. Everything Rust needs.

Docker container. If you use Docker elsewhere in your stack, Rust builds cleanly into a scratch or distroless image.

Kubernetes. Overkill for a single service. Legitimate at multi-service scale.

Fly.io Machines. Excellent Rust support. See Fly.io vs VPS.

Cloudflare Workers. Rust compiles to WebAssembly and runs on Workers. Different model; different economics. Not really "hosting a Rust web service" in the traditional sense.

When Rust is genuinely cheap to host

  • Small binary. Small RAM footprint. Small CPU baseline.
  • You can put more services on one box than you could with Node or Python.
  • You don't need a runtime, garbage collector, or interpreter.
  • Binary is static; no dependency hell on the deployment box.

Real efficiency numbers vs Node/Python for the same workload:

  • RAM: 3-8x less.
  • CPU: 2-5x less.
  • Cold start: near-zero (single binary, no runtime warmup).

Which one you should actually pick

  • Prototype / small production Rust service → Hetzner CX22 at $4.60/mo.
  • Real production with Postgres on the same box → Hetzner CX32 at $7.60/mo.
  • CPU-heavy Rust workload → Hetzner CPX31 at $15.60/mo or Vultr HF.
  • Deploy-from-git DX preferred → Fly.io Machines.
  • Serverless model → Cloudflare Workers for WebAssembly Rust.

Related guides

Figures in this text were written 22 Sep 2026.