Skip to main content
A framework preset is the set of defaults a framework needs to run well: the port it listens on, a health path, how it builds, the environment variables it will not boot without, and the paths worth keeping across deploys. The control plane detects the framework from your repository and fills these in, so a first deploy needs no manual build configuration.

How it works

When you point the create-app form at a repository, the detector reads the manifest files (package.json, go.mod, pom.xml, requirements.txt, Gemfile, composer.json) and picks a preset. The picker shows the match with a sparkle mark. You can choose a different preset at any time. If the port or health path in the form differs from the preset, the form shows Use preset settings. One click applies the port, health path and build type. Nothing is submitted until you create the app. From the command line:
--framework fills the port, build type and volumes you did not set yourself, and prints a note for any required secret such as SECRET_KEY_BASE. The API is GET /api/v1/frameworks, GET /api/v1/frameworks/{id} and GET /api/v1/frameworks/{id}/dockerfile.

Presets

Static presets have no port: the built-in web server serves the files directly and no container runs. With the CLI, declare build.type: static in app.yaml and use --file.

Deploy guides

Next.js

Next.js (App Router and Pages Router) builds with Railpack, which starts the app with npm run start. With output: 'standalone' in next.config (and no outputFileTracingRoot) the Railpack build copies .next/static and public next to the standalone server, starts node .next/standalone/server.js and binds HOSTNAME=0.0.0.0; with a custom tracing root use your own Dockerfile. The preset mounts a volume at /app/.next/cache so ISR pages and optimized images survive a redeploy. levelrail-cli build frameworks nextjs --dockerfile prints a multi-stage Dockerfile with a non-root user. Set NEXT_PUBLIC_* values as plain (non-secret) app env before the first deploy: Next.js inlines them at next build. Every framework build receives the literal, non-secret app env vars whose names start with NEXT_PUBLIC_, VITE_, PUBLIC_, REACT_APP_, NUXT_PUBLIC_, GATSBY_ or EXPO_PUBLIC_ (the list is APP_STATIC_BUILD_ENV_PREFIXES). With a Dockerfile, a value is passed only when the Dockerfile declares ARG NAME, and explicit build.args win. Secrets, from references and vault values are never passed to a build; use build.secrets for a Dockerfile build that needs one. The build log has a build env line naming the keys passed (never the values), so a missing variable is easy to spot. Changing a value needs a new build, not just a restart. sharp on arm64 ships in the standalone trace (unverified on a real arm64 host). Standalone output, sharp, health checks, and what to know before running more than one replica (Server Actions key, ISR and data cache per instance) are on Deploy a Next.js app.

Sizing a Next.js app

A Next.js build is the heaviest step on a small server. The build memory cap is set per build (see Build memory guard), and building on a 1 GB host is not recommended. Build on a builds-only node (Build node routing) or in CI, then deploy the image. How many Next.js sites one server can run depends on the idle memory of each site, which has not been measured (pending a host run). The per-site figure in Build performance is an assumption used for arithmetic, not a benchmark. Host swap is a safety margin for the platform and the running sites. It does not add build memory, because a build’s swap is limited to the same size as its cap.

Next.js static export

With output: 'export' the detector chooses the static preset. The out directory is served directly.

React / Vite

The dist directory is served as a static site. Variables prefixed VITE_ are baked in at build time. Single page apps fall back to index.html.

Astro

Static output is the default and is served directly. With output: 'server' and the @astrojs/node adapter in standalone mode, the detector chooses Astro (SSR): port 4321, started with node ./dist/server/entry.mjs. Set HOST=0.0.0.0, otherwise the server only listens on localhost.

Hugo, Jekyll and Eleventy

These generators build on the control plane as a static site: set build.command and build.publish as described in Pages. The presets fill hugo --minify with public, bundle exec jekyll build with _site, and npx @11ty/eleventy with _site. The build image needs the generator installed (Hugo binary, Ruby with the Gemfile gems, or the npm dependencies).

NestJS

Build with nest build and start with node dist/main. NestJS listens on 3000 unless app.listen is given another port, so read PORT there.

Flask

Served by gunicorn on port 5000, which is the Flask development default. Point the start command at your module:app. SECRET_KEY is required for sessions.

Rust

Rust has no standard port, so the preset uses 8080 and expects the server to bind 0.0.0.0 on PORT. Release builds are memory hungry: on a 1 GB host add swap or build the image elsewhere.

Nuxt

The Nitro server listens on 3000. Set NITRO_HOST=0.0.0.0 if the app is unreachable from the proxy.

Remix

The preset runs remix-serve ./build/server/index.js after remix vite:build. Set SESSION_SECRET before the first deploy.

SvelteKit

Use adapter-node. ORIGIN must match the public URL or form actions fail the CSRF check.

Node.js (Express)

Listen on process.env.PORT and bind 0.0.0.0. The detector reads a port from scripts.start when it finds one.

Go

The preset expects /healthz and a PORT variable. levelrail-cli build frameworks go --dockerfile prints a static build on a distroless nonroot image, a few megabytes in total.

Spring Boot

Add spring-boot-starter-actuator so /actuator/health exists. The preset allows 120 seconds for readiness because a JVM cold start can be slow, and sets -XX:MaxRAMPercentage=75 so the heap follows the container memory limit. The Dockerfile template builds a layered jar so dependency layers are cached between deploys.

Django

Set DJANGO_SECRET_KEY as a secret and add your domain to DJANGO_ALLOWED_HOSTS. A 400 response from a fresh deploy almost always means the host is missing. Uploaded files live under /app/media, which the preset persists.

FastAPI

The default /docs page doubles as a health path. Replace it with a real /health route when you have one.

Rails

SECRET_KEY_BASE is required. /up is the built-in Rails health route. Active Storage disk files live under /app/storage, which the preset persists.

Laravel

APP_KEY is required: generate it with php artisan key:generate --show. /up is the Laravel health route. Uploads and logs live under /app/storage, which the preset persists.

Test fixtures

Each preset has a minimal sample project under test/fixtures/frameworks/<id>. The detector tests run against all of them, so a change that stops one from being recognised fails the build.
Last modified on November 5, 2026