c15t
/
Select a framework
Nitro Quickstart
Writing Runners
Configuration
Deployment
Orchestration
Advanced Topics
OSS
Contributing
License
C15T Logo
DocsChangelog
xbskydiscordgithub0
c15t
/
Select a framework
Nitro Quickstart
Writing Runners
Configuration
Deployment
Orchestration
Advanced Topics
OSS
Contributing
License
home-2Docs
chevron-rightFrameworks
chevron-rightNitro
chevron-rightDeployment

Deployment

Deploy Runners with Nitro to various platforms

Guide to deploying Nitro applications with Runners to production.

Vercel

Setup

  1. Ensure your nitro.config.ts includes the Runners module:
import { defineConfig } from "nitro/config";

export default defineConfig({
  modules: ["runners/nitro"],
  runners: {
    region: process.env.VERCEL_REGION || "us-east-1",
  },
});
  1. Deploy:
NITRO_PRESET=vercel pnpm build
npx vercel --prebuilt

Environment Variables

Set in Vercel dashboard:

  • RUNNER_REGION - Region identifier (optional, defaults to Vercel region)

Cloudflare Pages

Setup

  1. Configure Nitro for Cloudflare:
import { defineConfig } from "nitro/config";

export default defineConfig({
  modules: ["runners/nitro"],
  preset: "cloudflare-pages",
  runners: {
    region: "us-east-1",
  },
});
  1. Deploy:
NITRO_PRESET=cloudflare-pages pnpm build

AWS Lambda

Setup

  1. Configure for AWS Lambda:
import { defineConfig } from "nitro/config";

export default defineConfig({
  modules: ["runners/nitro"],
  preset: "aws-lambda",
  runners: {
    region: process.env.AWS_REGION || "us-east-1",
  },
});
  1. Deploy:
NITRO_PRESET=aws-lambda pnpm build
# Deploy using AWS CLI or Serverless Framework

Docker

Dockerfile

FROM node:18-alpine

WORKDIR /app

# Install Playwright browsers if needed
RUN npx playwright install --with-deps chromium

COPY package*.json ./
RUN npm ci --production

COPY .output ./.output

EXPOSE 3000

CMD ["node", ".output/server/index.mjs"]

Build and Run

docker build -t runners-nitro .
docker run -p 3000:3000 -e RUNNER_REGION=us-east-1 runners-nitro

Kubernetes

Deployment YAML

apiVersion: apps/v1
kind: Deployment
metadata:
  name: runners-nitro
spec:
  replicas: 3
  selector:
    matchLabels:
      app: runners-nitro
  template:
    metadata:
      labels:
        app: runners-nitro
    spec:
      containers:
      - name: runners
        image: runners-nitro:latest
        ports:
        - containerPort: 3000
        env:
        - name: RUNNER_REGION
          value: "us-east-1"
        resources:
          requests:
            memory: "512Mi"
            cpu: "250m"
          limits:
            memory: "2Gi"
            cpu: "1000m"

Environment Variables

VariableDescriptionRequired
RUNNER_REGIONRegion identifierNo (defaults to "us-east-1")
DEBUGEnable debug loggingNo
RUNNERS_DEBUGEnable runner debug loggingNo

Next Steps

  • Learn about Configuration
  • Check Orchestration for multi-region setup
Runners brings execution, reliability, and distribution to async TypeScript. Build tests and checks that can run locally, in CI, or distributed across regions with ease.
Product
  • Documentation
  • Components
Company
  • GitHub
  • Contact
Legal
  • Privacy Policy
  • Cookie Policy
runners