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, aDockerfileand 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.
Commands
| Command | What it does |
|---|---|
servr | Detect, recommend a host, ask which one, show the plan, then ask before writing. |
servr detect | Only 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 status | Is it up? --url u checks a deploy's health path and reports status code and response time. --json for scripts. |
servr deploy | Runs 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 undo | Take out everything SERVR added. --dry-run lists what it would do; --yes skips the question. See Safety + undo. |
servr prompt | Print 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.
Where it can run
| Host | Runs | Files it writes | Deploy |
|---|---|---|---|
| Netlify | Static, single-page, server-rendered (Netlify adds the adapter) | netlify.toml | netlify deploy, then netlify deploy --prod |
| Vercel | Static, single-page, server-rendered | vercel.json | vercel, then vercel --prod |
| Cloudflare | Static, single-page | wrangler.toml + _headers | wrangler versions upload, then wrangler versions deploy |
| Render | Everything, including Node and Python servers | render.yaml | A Blueprint from your Git repo |
| Fly.io | Everything | fly.toml + Dockerfile + .dockerignore | fly deploy |
| Railway | Everything | railway.json + Dockerfile | railway up |
| Docker (any VPS) | Everything | Dockerfile + .dockerignore + compose.yaml + Caddyfile | docker compose up -d --build |
| Your own drive | Static, single-page, server-rendered, Node servers | A 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.
What it gets right for you
- A health check at
/healthz. Hosts andservr statususe 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 || 3000andprocess.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.examplewith 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.
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:sqlitefor 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 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.shdownloads 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 nonekeeps it local. - Autostart is opt-in.
--autostartwrites 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 + 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-newand 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.
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.
Exit codes
| Code | Meaning |
|---|---|
0 | Done (or the plan was shown). |
1 | Something failed, or the app can't run on that host. |
3 | Needs a choice: there's no terminal to ask in and no --to. It lists the --to commands to pick from. |