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).

Angular, Vue CLI, SolidStart and Qwik

Static single page builds. Angular publishes dist/<project>/browser: the detector fills the project name when angular.json has exactly one project, otherwise set build.publish yourself. Vue CLI publishes dist, SolidStart (with the static preset in app.config.ts) publishes .output/public, and Qwik (with the static adapter) publishes dist.

VitePress, MkDocs, Zola and Gatsby

Docs and blog generators served as static sites. VitePress publishes .vitepress/dist, MkDocs site (detected from mkdocs.yml), Zola public (detected from config.toml with base_url) and Gatsby public. The build image needs the generator installed, as for Hugo.

Phoenix

Detected from a mix.exs that lists :phoenix. The preset builds a release with mix release and starts bin/server (generate it with mix phx.gen.release) on port 4000. Set PHX_SERVER=true and SECRET_KEY_BASE (from mix phx.gen.secret), and PHX_HOST to your public host name. Phoenix has no built-in health route, so the preset checks /; add a /health route when you have one.

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.

Quarkus and Micronaut

Detection reads pom.xml, build.gradle or build.gradle.kts and checks Quarkus first, then Micronaut, then Spring Boot. Quarkus serves /q/health once quarkus-smallrye-health is a dependency and needs QUARKUS_HTTP_HOST=0.0.0.0 outside dev mode. Micronaut serves /health with the micronaut-management module and ENDPOINTS_HEALTH_ENABLED=true. Both presets print a layered Dockerfile template with --dockerfile.

ASP.NET Core

Detection reads Program.cs or Startup.cs for the web host builder, because the detector cannot list *.csproj files. The preset binds ASPNETCORE_URLS=http://0.0.0.0:8080 and expects a /healthz route (app.MapHealthChecks("/healthz")). Set the SDK version in global.json.

Bun, Deno and Fresh

Deno is detected from deno.json or deno.jsonc, and Fresh from fresh.gen.ts or a $fresh/ import; both start with deno task start on port 8000. Bun is a hint only: bun.lockb or bun.lock next to package.json selects it, and any framework preset such as Next.js still wins. Railpack reads the Node version from engines.node in package.json, not from a NODE_VERSION variable, so set it there.

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 22, 2026