# nanovm: Limits https://nma.sh/llms.txt is the whole guide. ## Limits - Max apps per account: 2 at a time unverified, 5 with a verified email, 10 with Pro (delete one and its room is freed at once). Separately, every app an account creates takes a lifetime app number, deleted apps included, on every tier: never reused, 16 at most - Max secret value length: 1024 bytes - App name syntax: [a-z0-9-]{1,31} - Secret name syntax: [A-Z0-9_]{1,32} - db and kv, an account's share: db: 10,000 keys and 40 MiB of values an account, as 5,000 keys and 20 MiB in each group (a key's group is its hash); kv: 600 keys an account of 3,072 shared slots; keys are at most 512 bytes, values 64 KiB - Request body to an app: at most 64 KiB; a larger one is a 413 ("the request was refused"). - Request headers: at most 8 KiB; a larger block is a 431. - Set-Cookie is host-only: a Set-Cookie with a Domain attribute is dropped, so an app cannot set cookies for other apps or nma.sh; on a Pro custom domain, Domain= that domain's own host is kept. - fetch(): 10 a second per app (burst 20), 4 at once per app, 8 per account; 1.5 s each, redirects included (a request has 2 s in all); response body 256 KiB, request body 48 KiB, URL and headers 16 KiB. Past each: TypeError saying which. One log line each. - Inbound: 8 requests in flight per account (64 on Pro), and VM time 0.1 core a second with a 30 s bank; a burst waits up to 250 ms (64 queued, 256 on Pro), then slow_down (429) with retry_after_s (also Retry-After). Nothing built in stops form spam or limits one visitor: do it in your handler, keyed on req.headers["x-real-ip"] in kv or db. - Path and query string: at most 255 bytes; a longer one is a 414. - Source per deploy: about 6 MB (the CLI itself sends at most 32 MiB) - Response: 1 MiB, headers included (past it a 502 that says so); an answer over 16,128 bytes arrives whole too (the edge then ends its own connection; on nma.sh yours stays alive) - Logs: a VM's log stops at 1 MiB; the last 16 stopped VMs' logs are kept. Max concurrent log readers: 4 per tenant - A handler that never returns is stopped: a request's handler has 2 s of CPU in all (DP_WP_LEASE_MS); past it the app's instance is stopped, the request gets a 504 naming this limit (the outcome is unknown), and the handler's console output before the stop is kept in `logs`. An unverified account's apps nobody uses (no real request and no deploy) may be deleted after 30 days; a verified or Pro account's are kept. Framework projects (prebuilt, deployed as a directory) ---------------------------------------------------------- Install nanovm-framework beside the CLI (~/.nanovm/nanovm-framework); run npm ci in that directory once. Local preparation requires Node >=22.12 and locked esbuild 0.25.12; framework builds keep their own Node requirements and standard target configuration. Missing Node prints "framework bundling requires Node >=22.12 on PATH" before upload. Build with the framework's own command (below), then from the project directory nanovm pack . | ssh nma.sh deploy APP --json (nanovm deploy APP . needs --url, the operator's own network); no nanovm config, bundle flags, custom adapter or runtime polyfill. nanovm dev . previews that tree; rerun after rebuilding. Deploy prints detection on stderr (the prints: text below), then the normal build/first-request/live URL result (or --json). Hono (Cloudflare Workers starter): npx wrangler deploy --dry-run --outdir dist prints: nanovm: framework hono; dist/index.js Astro (official @astrojs/cloudflare, output: 'server'): npm run build prints: nanovm: framework astro; dist/server/entry.mjs SvelteKit (official @sveltejs/adapter-cloudflare): npm run build prints: nanovm: framework sveltekit; .svelte-kit/cloudflare/_worker.js React Router (Web server target): npm remove @react-router/node @react-router/serve && npm run build prints: nanovm: framework react-router; build/server/index.js Nuxt (Nitro Cloudflare module target): NITRO_PRESET=cloudflare-module npm run build prints: nanovm: framework nuxt; .output/server/index.mjs SolidStart (Nitro Cloudflare module target): NITRO_PRESET=cloudflare-module npm run build prints: nanovm: framework solidstart; .output/server/index.mjs Analog (Nitro Cloudflare module target; disable prerendering for dynamic routes): NITRO_PRESET=cloudflare-module npm run build prints: nanovm: framework analog; dist/analog/server/index.mjs TanStack Start (Nitro Cloudflare module target): NITRO_PRESET=cloudflare-module npm run build prints: nanovm: framework tanstack-start; .output/server/index.mjs Qwik (official cloudflare-pages integration): npm run build prints: nanovm: framework qwik; server/entry.cloudflare-pages.js Vike (production build, Vike's vike/fetch handler; deprecated upstream in the tested release): npm run build prints: nanovm: framework vike; dist/server/entry.mjs Remix v2 (official Cloudflare template): npm run build prints: nanovm: framework remix; build/server/index.js Next.js (App Router, Node runtime, through OpenNext; needs @opennextjs/cloudflare): npx opennextjs-cloudflare build prints: nanovm: framework next; .open-next/worker.js Works: server-rendered and static pages, route handlers, Server Actions, cookies(), streaming, client navigation. Set cacheComponents: false in next.config (create-next-app turns it on; its pages never answer here, and deploy refuses it). next/image: set images: { unoptimized: true }; /_next/image answers 404. fetch() is the platform's (above). The edge runtime is not supported. A Next project without OpenNext is refused with the build command above. A Next app's server code takes most of an app's memory: the fixture loads in 49 MB of about 64 MiB, so a much larger app may not load. These targets use Request/Response handlers. Node listening servers, non-HTTPS outbound, Cloudflare services (R2, D1, service bindings) and arbitrary filesystem access are unsupported. Static assets go in public/ and serve from the edge without a VM. nanovm pack . > app.tar emits the same tree for SSH stdin, POST /v1/apps/APP/deploy-tree, and MCP directory deploys. Bundle errors stop before upload; fix framework build errors before deploying. A bundle that throws while loading: deploy's build lines print the error, the first request answers 503 (exit 3), and the version it replaced serves again. The tree's limits are checked before upload, with the number: 1000 files, 5 MiB a file (app.js included), 25 MiB in all. deploy takes a JavaScript file, a directory with app.js and an optional public/, a static site (index.html and no app.js), or a built framework project above. ctx.waitUntil(promise): the answer is sent once every waitUntil promise has settled, those registered while others ran too (within the request's time limit). To the framework, request bodies are strings: text, JSON and forms work; binary uploads do not yet. In a framework build, _headers, _redirects and _routes.json at the top of the assets are not applied (stderr names each one); source maps of scripts and styles (.js.map, .mjs.map, .css.map) are not deployed. Workers targets get local ASSETS.fetch and VM-local caches.open/default with match/put/delete (8 MiB charged storage, 128 responses, 32 names; old entries may evict). Copies respect Vary and freshness; private/no-store and Set-Cookie responses are skipped. No cross-VM persistence, network add/addAll, CacheStorage enumeration/deletion, or conditional/range cache support. Direct static requests still bypass the VM at the edge.