Skip to main content
Sevalla offers Railpack, an open-source project maintained by Railway and the successor to Nixpacks, to automatically create your application’s container image based on your repository. Railpack analyzes your repository and builds an optimized container image with zero configuration, powered by BuildKit.
Nixpacks remains the default build type for new applications.
If you currently use Nixpacks, Buildpacks, or a Dockerfile, you can change this to Railpack within the Build strategy option in application settings (Settings > Build strategy > Update build strategy). Railpack is also available through the public API by setting build_type to railpack.

Supported languages

Railpack detects your application’s language based on the files in your repository (for example, package.json for Node.js, go.mod for Go, or composer.json for PHP) and builds the following out of the box:
  • Node.js
  • Python
  • Go
  • PHP
  • Java
  • Ruby
  • .NET
  • Deno
  • Rust
  • Elixir
If you want to use a language that Railpack does not support, check whether it is supported by Nixpacks or Buildpacks. If it isn’t, you must use a Dockerfile. You can change this within Settings > Build strategy > Update build strategy.

Configure Railpack

Some applications require no configuration, but some require specialized commands and options to run, such as: Environment variables - You may need to set certain environment variables to run your application. Processes - Sevalla can automatically detect your web process command. You can change this if required, and you can define additional processes.

Start command

Custom start commands work the same way as with other build types: if your web process has a start command set, it overrides the one Railpack detects. You can change your web process’s start command on the Processes page.

Configure builds

By adding a railpack.json file to the root of your repository, you can customize the final image generated by Railpack. This configuration file allows you to install extra packages, define custom build steps and commands, configure caches, and override the deploy settings, giving you greater control over the build process and the resulting image. For example:
{
  "$schema": "https://schema.railpack.com",
  "steps": {
    "install": {
      "commands": ["npm install"]
    },
    "build": {
      "inputs": [{ "step": "install" }],
      "commands": ["...", "./my-custom-build.sh"]
    }
  },
  "deploy": {
    "startCommand": "node dist/index.js"
  }
}
While you can override the start command with railpack.json or the RAILPACK_START_CMD environment variable, the preferred way is to set the start command for your web process on the Processes page. A start command set there always takes precedence.
Reference the schema at https://schema.railpack.com in your railpack.json file to get autocomplete and validation in your editor. For all available options, refer to the Railpack configuration documentation.

Build configuration with environment variables

You can also customize the build with environment variables. Make sure the variables are available during the build process.
VariableDescription
RAILPACK_INSTALL_CMDOverride the command run in the install step.
RAILPACK_BUILD_CMDOverride the command run in the build step.
RAILPACK_START_CMDOverride the command run when the container starts.
RAILPACK_PACKAGESInstall additional Mise packages in the format pkg@version, separated by spaces.
RAILPACK_BUILD_APT_PACKAGESInstall additional apt packages during the build, separated by spaces.
RAILPACK_DEPLOY_APT_PACKAGESInstall additional apt packages in the final image, separated by spaces.
For the full list of options, refer to the Railpack environment variable documentation.

Set a Railpack language version

If you do not specify a version in your application’s code, Railpack uses its current default version for the language. To use a specific version, set it in your application’s files or with an environment variable. When you use an environment variable, make sure the variable is available during the build process. Railpack also reads Mise-compatible version files, such as .tool-versions and mise.toml, for most languages.

Deno

To specify your Deno version, include the version in a .deno-version file in your repository, or set the RAILPACK_DENO_VERSION environment variable.

Elixir

To specify your Elixir version, include the version in a .elixir-version file in your repository, set it in your mix.exs file, or set the RAILPACK_ELIXIR_VERSION environment variable. The Erlang/OTP version is detected automatically from the Elixir version. To override it, include the version in a .erlang-version file, or set the RAILPACK_ERLANG_VERSION environment variable.

Go

To specify your Go version, include the following in your application’s go.mod file:
go 1.23
Or, set the RAILPACK_GO_VERSION environment variable.

Java

To specify your Java version, set the RAILPACK_JDK_VERSION environment variable. If you’re using Gradle, to specify the Gradle version, set the RAILPACK_GRADLE_VERSION environment variable.

.NET

To specify your .NET version, set the TargetFramework in your project’s .csproj file, include the version in your global.json file, or set the RAILPACK_DOTNET_VERSION environment variable.

Node.js

To specify your Node.js version, do one of the following: Include the following in your application’s package.json file:
"engines": {
  "node": "22"
}
Or, include the version in a .nvmrc or .node-version file in your repository, or set the RAILPACK_NODE_VERSION environment variable. Railpack supports npm, pnpm, yarn, and Bun, detected from the packageManager field in package.json or your lock file. If you use Bun, you can specify the Bun version with the engines.bun field in package.json, a .bun-version file, or the RAILPACK_BUN_VERSION environment variable.

PHP

Railpack only supports PHP version 8.2 or higher.
To specify your PHP version, include the following in your application’s composer.json file:
{
  "require": {
    "php": "8.4"
  }
}
To install additional PHP extensions, set the RAILPACK_PHP_EXTENSIONS environment variable to a comma-separated list, for example gd,imagick,redis.

Python

To specify your Python version, do one of the following:
  • Include the version in a .python-version file in your repository: 3.13
  • Include the version in a runtime.txt file.
  • Set the RAILPACK_PYTHON_VERSION environment variable.
Railpack supports pip, poetry, pdm, uv, and pipenv, detected from your dependency files.

Ruby

To specify your Ruby version, include the version in a .ruby-version file in your repository, set it in your Gemfile (for example, ruby "3.4.6"), or set the RAILPACK_RUBY_VERSION environment variable.

Rust

To specify your Rust version, set the channel in your rust-toolchain.toml file, set rust-version in your Cargo.toml file, include the version in a .rust-version file, or set the RAILPACK_RUST_VERSION environment variable. For more details about how Railpack builds each language, refer to the Railpack documentation.