> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sevalla.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These are the docs for Sevalla, a platform for deploying applications, databases, static sites, object storage and load balancers. The dashboard is at https://app.sevalla.com.
> Bold text in steps is an exact dashboard label.
> To act on a Sevalla account, prefer the Sevalla MCP server (https://mcp.sevalla.com/mcp, see https://docs.sevalla.com/ai-agents/overview.md), then the Sevalla CLI (https://docs.sevalla.com/developer-tools/cli.md), then the REST API (https://api-docs.sevalla.com, OpenAPI spec at https://api.sevalla.com/v3/openapi.json).
> Every page index is at https://docs.sevalla.com/llms.txt.

# Railpack

> Build an application with Railpack, the beta successor to Nixpacks: supported languages, language versions, railpack.json, RAILPACK_ variables and the start command.

Railpack is the open-source successor to Nixpacks from Railway: it detects your application's language and framework from the repository and builds a container image with BuildKit, with no configuration. On Sevalla, Railpack is in beta (the dashboard labels it **Beta**) and builds with Railpack 0.30.0. New applications still default to [Nixpacks](/applications/builds/nixpacks).

## How Railpack builds your application

Railpack reads the files in the [build path](/applications/builds/overview#build-settings) to detect the language, installs the language versions it needs with [Mise](https://mise.jdx.dev/), and builds in steps (install, build) before setting the start command. Sevalla doesn't let you pick a Railpack version: every application uses the one Sevalla runs.

If the web process has a start command on the [Processes](/applications/processes) tab, Sevalla passes it to Railpack as `RAILPACK_START_CMD` and runs it instead of the detected one.

## Supported languages

Railpack detects Node.js (with npm, Yarn, pnpm or Bun), Python, Go, PHP, Java, Ruby, .NET, Deno, Rust and Elixir, among others. The [Railpack documentation](https://railpack.com/) describes each language. For anything it doesn't detect, use a [Dockerfile](/applications/builds/dockerfile).

## Use Railpack

<Steps>
  <Step title="Open the build strategy">
    In the sidebar, click **Applications**, then click the application. On the **Settings** tab, in the **Build strategy** section, click **Update build strategy**.
  </Step>

  <Step title="Choose Railpack">
    Click **Railpack**. Set the **Build path** if the application isn't at the repository root.
  </Step>

  <Step title="Save and deploy">
    Click **Update build strategy**, then deploy the application.
  </Step>
</Steps>

The **Builder** in the **Build strategy** section shows **Railpack** with the **Beta** label, and the next deployment's build log shows Railpack's build plan.

## Set the language version

Without a version in your repository, Railpack uses its own default for the language. Railpack reads Mise version files (`.tool-versions`, `mise.toml`) for most languages, and the files in this table. Environment variables must be marked **Available during buildtime**.

| Language | Set the version with |
| - | - |
| Node.js | `RAILPACK_NODE_VERSION`, `engines.node` in `package.json`, an `.nvmrc` or `.node-version` file. For Bun: `engines.bun` in `package.json`. |
| Python | `RAILPACK_PYTHON_VERSION`, a `.python-version` file, a `runtime.txt` file, or the `Pipfile` |
| PHP | `require.php` in `composer.json`. PHP 8.2 or later. |
| Go | The `go` directive in `go.mod`, or `RAILPACK_GO_VERSION` |
| Ruby | A `.ruby-version` file, the `ruby` line in the `Gemfile`, or `RAILPACK_RUBY_VERSION` |
| Java | `RAILPACK_JDK_VERSION`, and `RAILPACK_GRADLE_VERSION` for Gradle |
| .NET | `TargetFramework` in the `.csproj` file, `global.json`, or `RAILPACK_DOTNET_VERSION` |
| Rust | `rust-toolchain.toml`, `rust-version` in `Cargo.toml`, or `RAILPACK_RUST_VERSION` |
| Elixir | `.elixir-version`, `mix.exs`, or `RAILPACK_ELIXIR_VERSION` |

Railpack detects the Node.js package manager from the `packageManager` field in `package.json`, then from the lock file, and falls back to npm. For Python it supports pip, Poetry, PDM, uv and Pipenv. For PHP extensions, set `RAILPACK_PHP_EXTENSIONS` (for example `gd,imagick,redis`) or require them in `composer.json`.

## Configure the build

Most applications build with no configuration. To change a step, add a `railpack.json` file to the build path:

```json railpack.json theme={null}
{
  "$schema": "https://schema.railpack.com",
  "steps": {
    "install": {
      "commands": ["npm ci"]
    },
    "build": {
      "inputs": [{ "step": "install" }],
      "commands": ["...", "npm run build:server"]
    }
  },
  "deploy": {
    "startCommand": "node dist/server.js"
  }
}
```

The `$schema` line gives you autocomplete and validation in your editor. The [Railpack configuration reference](https://railpack.com/config/file) lists every key.

Environment variables marked **Available during buildtime** change the build too:

| Variable | What it does |
| - | - |
| `RAILPACK_INSTALL_CMD` | Replaces the install step's command |
| `RAILPACK_BUILD_CMD` | Replaces the build step's command |
| `RAILPACK_START_CMD` | Replaces the start command (Sevalla sets it from the web process's start command when there is one) |
| `RAILPACK_PACKAGES` | Adds Mise packages, as `pkg@version`, separated by spaces |
| `RAILPACK_BUILD_APT_PACKAGES` | Adds apt packages during the build |
| `RAILPACK_DEPLOY_APT_PACKAGES` | Adds apt packages to the final image |
| `RAILPACK_DISABLE_CACHES` | Turns off Railpack's cache mounts (`*` for all) |

Sevalla passes build-time variables to Railpack's build as BuildKit secrets. A start command set on the web process wins over `railpack.json` and `RAILPACK_START_CMD`.

Railpack also takes the start command from a `Procfile`: its `web` entry, or else its `worker` entry. It doesn't run a `release` entry, and Sevalla doesn't create processes from the other entries. For release tasks such as database migrations, create a [job](/applications/processes#jobs) with the start policy **Before deployment**.

## Move from Nixpacks to Railpack

Railpack builds from the same repository with no changes for most applications. Before you switch a production application:

1. Pin your language version in the repository (Railpack's defaults can differ from Nixpacks'), for example with `engines.node` or `.python-version`.
2. Translate any `nixpacks.toml` or `NIXPACKS_*` variables to `railpack.json` or `RAILPACK_*` variables. Railpack ignores Nixpacks' configuration.
3. Switch a staging copy first, or watch the first deployment's build log. If it fails, switch back to **Nixpacks** and deploy again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.