Skip to main content
Fly.io is a good fit when you want to run Redop as a containerized service on a VM-style platform. For Redop, treat Fly.io as a Docker-based deployment target.

Prerequisites

  • the flyctl CLI installed
  • a Redop HTTP server
  • a Dockerfile for the app you want to deploy

Minimal server shape

import { Redop } from "redop";

new Redop({
  name: "redop-mcp",
  version: "0.1.0",
}).listen({
  port: Number(process.env.PORT ?? 3000),
  hostname: "0.0.0.0",
});

Minimal Dockerfile

Use a Dockerfile like this:
FROM oven/bun:1

WORKDIR /app

COPY package.json bun.lock ./
RUN bun install --frozen-lockfile

COPY . .

EXPOSE 3000

CMD ["bun", "run", "src/index.ts"]
If your app builds to dist, change the command to start the built output.

Deploy steps

  1. Add a Dockerfile for your Redop app.
  2. Run fly launch from the app directory.
  3. Let Fly generate fly.toml around that containerized app setup.
  4. Set secrets with fly secrets set.
  5. Deploy with fly deploy.
Example:
fly launch
fly secrets set API_KEY=your-secret
fly deploy

Health checks

Add an HTTP check for Redop’s built-in health route:
[http_service]
  internal_port = 3000
  force_https = true
  auto_start_machines = true
  auto_stop_machines = "stop"
  min_machines_running = 1

  [[http_service.checks]]
    interval = "15s"
    timeout = "5s"
    grace_period = "10s"
    method = "GET"
    path = "/mcp/health"
If you set internal_port to 3000, keep your app listening on process.env.PORT ?? 3000 so local development and hosted deployment both work cleanly.

Verify the deployment

Check the endpoint after deploy:
curl https://your-app.fly.dev/mcp/health
fly checks list

Redop note

Fly does not require a function adapter here. You can run the normal Redop Bun server shape as a long-running process inside a Docker image.

Common mistake

Do not skip the HTTP health check. Routing works best when Fly can confirm /mcp/health before sending traffic to a Machine.

Next