Deploy Guide

This guide walks through deploying different types of apps with burner, including tips for common frameworks.

What Gets Uploaded

When you run burner deploy, the CLI creates a tar.gz archive of your project directory. It automatically excludes:

  • .git/
  • node_modules/
  • .env and .env.* files (except .env.example)
  • Any patterns in your .gitignore

Dependencies are installed fresh on the VM via npm ci (if package-lock.json exists) or npm install.

Framework Examples

Vite (React, Vue, Svelte)

burner deploy . --command "npm run dev" --port 5173

Vite's dev server defaults to port 5173. burner automatically handles the host header so Vite's host check passes.

Next.js

burner deploy . --command "npm run dev" --port 3000

Next.js compiles pages on first request, which can spike memory. We recommend the Pro plan (2 GB RAM) for Next.js dev server previews. Production builds (npm run build && npm start) use less memory but take longer to boot.

Express / Fastify / Hono

burner deploy . --command "node server.js" --port 8080

Make sure your server binds to 0.0.0.0, not localhost or 127.0.0.1. Most frameworks do this by default.

Environment Variables

Pass secrets and configuration with the -e flag. Each variable is encrypted at rest and injected into the VM at boot time.

burner deploy . --command "node server.js" \
  -e DATABASE_URL="postgres://..." \
  -e STRIPE_KEY="sk_test_..." \
  -e NODE_ENV=production

Environment variables are never logged or exposed in the dashboard.

TTL (Time to Live)

Previews auto-destroy after their TTL expires. The default is 45 minutes. Set a custom TTL with --ttl:

# Quick 10-minute test
burner deploy . --command "npm start" --ttl 10

# Long-running demo (Pro plan, up to 4 hours)
burner deploy . --command "npm start" --ttl 240
PlanTTL Range
Free5–45 minutes
Pro5–240 minutes

API Usage

You can also create previews via the REST API. Authenticate with a Bearer token (your API key from burner login):

curl -X POST https://burner-control-plane.fly.dev/api/v1/previews \
  -H "Authorization: Bearer brn_..." \
  -H "Content-Type: application/json" \
  -d '{
    "command": "npm run dev",
    "port": 3000,
    "ttl_minutes": 30
  }'

See the full API reference in the CLI source or reach out for early access to the MCP server integration.