Skip to main content
A Dart web server runs on Sevalla as an application: Sevalla builds an image from the Dockerfile in your Git repository, which compiles your server ahead of time (AOT) into one native executable on the official dart image, and runs that executable as processes. The executable needs no Dart SDK, so the final image is Debian slim with the executable in it.

Framework guides

Dart Frog

Deploy a Dart Frog server, compiled with dart compile exe, that stops cleanly on SIGTERM.

How Dart applications run on Sevalla

Every process (web, worker, cron job and job) runs from the same image, each with its own start command. See Processes.

Pin the Dart version

The Dockerfile’s FROM line sets the Dart version: dart:3.13 compiles with the newest Dart 3.13 release. A line tag such as 3.13 moves to each 3.13 patch release and to Debian’s security fixes, so every new build picks them up. A full version, such as 3.13.7, stays on that release. The environment: sdk constraint in pubspec.yaml, such as ^3.11.0, is the range of Dart versions the package accepts, and must include the image’s version.

Build with a Dockerfile

A Dockerfile for a Dart server builds in one stage and runs in another. The build stage uses the official dart image, copies pubspec.yaml and pubspec.lock first and installs the packages in their own layer, then copies the code and compiles the entry point with dart compile exe. The final stage starts from debian:trixie-slim, which has /bin/sh for the web terminal and custom start commands, copies only the executable, owned by root, and runs it as user 1000:1000 with an exec-form CMD. Dart’s own image documentation copies the executable into an empty scratch image instead, which has no shell. The Dart Frog guide has a tested Dockerfile.