SERVR

Put your app on a real server. SERVR reads what your app is, plans every file before writing one, and prints each host's own commands. Nothing locked in.

Preview Ops Free Product page
Overview

Run it

Run it in your project root. SERVR tells you what your app is, recommends a host, asks where it should run, and shows the plan. Nothing is written until you say yes.

Prefer your AI to drive it? Paste the prompt from /servr/prompt.md (or run servr prompt). It runs the same steps and asks you before every change.

What it detects

  • What the app is: a static site, a single-page app (Vite, Create React App, Parcel), a server-rendered framework (Next.js, Remix, SvelteKit, Astro, Nuxt), a Node server (Express, Fastify, Hono, node:http) or a Python server (Flask, FastAPI, Django).
  • How it builds and starts: package manager, lockfile, install, build, output folder, start command, entry file, port, and whether it listens on localhost only.
  • The settings it reads: names only (never values), split into secret, public (ends up in the browser) and plain settings.
  • Where it keeps data: local files, SQLite, browser localStorage, or a hosted database.
  • Host config it already has: netlify.toml, vercel.json, a Dockerfile and so on.

Every answer comes with the file and line it came from. If SERVR can't tell what the app is, it says why and stops: it never guesses a host.

CLI

Commands

CommandWhat it does
servrDetect, recommend a host, ask which one, show the plan, then ask before writing.
servr detectOnly the detection: what the app is, with evidence. --json prints the servr-app/1 object.
servr --to <host>Plan for one host. --dry-run shows the plan and writes nothing. --yes writes it without asking. --edit also applies the suggested edits to your own files (each backed up). --storage adds the data API. --domain d adds your domain to the config and the steps.
servr drive <folder>Write a drive folder that runs the app on your computer. --tunnel cloudflare|tailscale|none (default: Cloudflare), --autostart, --port n, and --build to run your build first.
servr statusIs it up? --url u checks a deploy's health path and reports status code and response time. --json for scripts.
servr deployRuns the host's own preview deploy (production with --prod), after asking. --yes skips the question. You stay logged in with the host, not with us.
servr undoTake out everything SERVR added. --dry-run lists what it would do; --yes skips the question. See Safety + undo.
servr promptPrint the AI prompt (the same text as /servr/prompt.md).

Every command runs through the pinned CLI. For example, the plan for Netlify:

Host names also take the obvious other spellings: cf, fly.io, vps, usb.

Hosts

Where it can run

HostRunsFiles it writesDeploy
NetlifyStatic, single-page, server-rendered (Netlify adds the adapter)netlify.tomlnetlify deploy, then netlify deploy --prod
VercelStatic, single-page, server-renderedvercel.jsonvercel, then vercel --prod
CloudflareStatic, single-pagewrangler.toml + _headerswrangler versions upload, then wrangler versions deploy
RenderEverything, including Node and Python serversrender.yamlA Blueprint from your Git repo
Fly.ioEverythingfly.toml + Dockerfile + .dockerignorefly deploy
RailwayEverythingrailway.json + Dockerfilerailway up
Docker (any VPS)EverythingDockerfile + .dockerignore + compose.yaml + Caddyfiledocker compose up -d --build
Your own driveStatic, single-page, server-rendered, Node serversA folder with start and stop scripts./start.sh --tunnel

Every plan also writes SERVR.md: your runbook with the files it added, the settings to set, how to deploy, check, roll back and undo. If a host can't run your app (Express on Netlify, Python on Cloudflare), SERVR says why and lists the hosts that can.

Server-ready

What it gets right for you

  • A health check at /healthz. Hosts and servr status use it to tell the app is up. For Next.js it's a new route file; for Express, Fastify and Hono it's a suggested one-line edit. Static sites behind Caddy get it from Caddy.
  • PORT and HOST from the environment. Hosts pick the port. A fixed port or a localhost-only listen becomes process.env.PORT || 3000 and process.env.HOST, with your old value kept as the default for your laptop.
  • Cache headers. Hashed build assets are cached for a year, so repeat visits are fast. Basic safety headers (nosniff, a referrer policy) too.
  • .env.example with names only. The settings your code reads, never their values. Secrets are set with the host.
  • Suggested edits only with --edit. Changes to your own files are listed in the plan and applied only when you pass --edit. Each file is backed up first.
Data

Moving data to the server

Apps that keep data only in the browser (localStorage) or in local files can keep doing that. To keep it on the server instead, add --storage:

  • An owner-only data API at /api/servr-data/<key> (GET, PUT, DELETE, up to 256 KB of JSON per key).
  • Protected by SERVR_DATA_KEY. Requests must send it; no key set means the API is off. It fails closed.
  • Where it lives: a Netlify Blobs function on Netlify, SQLite through node:sqlite for Node servers (Node 22.5+, nothing to install), and built into the drive server.
  • A one-time move of the browser's localStorage data to the server. The old copy is kept, untouched.

servr/STORAGE.md explains the wiring in plain steps.

Drive

Drive server

Runs your app from a folder on a drive you own, on your own computer, with a public HTTPS link through a free tunnel.

/Volumes/MyDrive/my-app/
  app/              your site or app (a copy of the build; never your .env or .git)
  data/             your data, on the drive (never removed by servr undo)
  start.sh stop.sh status.sh     macOS + Linux
  start.ps1 stop.ps1 status.ps1  Windows (start.cmd: double-click)
  bin/get-node.sh   pinned Node.js download, SHA-256 checked
  tunnel/           Cloudflare Tunnel / Tailscale Funnel config + exact commands
  autostart/        only with --autostart
  SERVR-DRIVE.md    your runbook
  • Node is pinned. bin/get-node.sh downloads one exact Node.js version and checks its SHA-256 against the value SERVR ships with. A mismatch stops it.
  • Tunnels. Cloudflare Tunnel by default: a quick link with no account, or a named hostname on your domain after cloudflared tunnel login. Or Tailscale Funnel with --tunnel tailscale. --tunnel none keeps it local.
  • Autostart is opt-in. --autostart writes launchd, systemd or Task Scheduler files and tells you how to turn them on. Nothing is turned on for you.
  • Limits. Your computer has to be on and awake with the drive plugged in. Home upload speed is the ceiling: fine for you, friends and a small team. Python servers aren't supported on the drive yet.
Safety

Safety + undo

  • Tracked. Every file SERVR writes and every edit it makes is recorded in .servr/manifest.json, including drive folders.
  • Never overwrites. If a file already exists, SERVR writes its version beside it as <file>.servr-new and shows the difference.
  • Undo is careful. It removes only files you haven't changed since; files you changed are kept and listed. Edited files are restored from their backup.
  • data/ on a drive is never deleted.
Status

Is it up?

After a deploy, check it answers. SERVR requests the health path and reports the status code and how long it took. Without --url it shows what SERVR set up in this project and checks any drive server it started.

CI

Exit codes

CodeMeaning
0Done (or the plan was shown).
1Something failed, or the app can't run on that host.
3Needs a choice: there's no terminal to ask in and no --to. It lists the --to commands to pick from.