Builds

Railway uses Nixpacks to build and deploy your code with zero configuration. Currently, we support the following languages out of the box.

Build Configuration

Nixpacks has a variety of options that can be configured with environment variables. These include things like

  • Install/build/start commands
  • Nix/Apt packages to install
  • Directories to cache

For a full list of these options, please view the Nixpacks docs.

If you have a language or feature that you want us to support, please don't hesitate to reach out on Discord or on the Nixpacks GitHub repo.

Procfile

If using Nixpacks, you can override the start command with a Procfile at the root of your app. Only a single process type is supported at the moment.

HTTP servers should use the web process type. This process should listen on the PORT environment variable and will receive HTTP traffic.

Note: some buildpacks specify a default start command

Dockerfiles

We will also build using a Dockerfile if found at the project root.

Buildpacks

Railway can also use Cloudnative Buildpacks. These are now deprecated and will eventually be removed from Railway.

Heroku

Heroku buildpacks support

  • NodeJS
  • Python
  • Go
  • Ruby
  • Java

Go to Heroku buildpack documentation.

Paketo

Paketo buildpacks support

  • NodeJS
  • Go
  • PHP
  • Ruby
  • Java
  • .NET
  • NGINX
  • Python

Go to Paketo buildpack documentation

Custom Buildpacks

By default, the appropriate buildpacks are selected by inspecting the source files of a project. For more control, a project.toml file can be used to achieve a more custom setup.

Here is an example project.toml file that forces a NodeJS project to use Yarn instead of NPM.


Edit this file on GitHub