Kinsta offers Nixpacks, an open-source project maintained by Railway, as one of the options to automatically create your application’s container image based on your repository. Nixpacks are scripts that are run when your application is deployed to install dependencies for your application and configure your environment.

We recommend using Nixpacks because they use less resources and support 20+ languages. You can choose Nixpacks when adding an application or by changing the Build environment option in application settings (Settings > Basic details > Edit details).

Supported Languages

Nixpacks supports the following languages:

  • Clojure
  • Cobol
  • Crystal
  • C#/.NET
  • Dart
  • Deno
  • Elixir
  • F#
  • Go
  • Haskell
  • Java
  • Lunatic
  • Node.js
  • PHP
  • Python
  • Rust
  • Staticfile
  • Swift
  • Scala
  • Zig

To use a different language version, set the version in your application’s files.

When using Nixpacks, there usually isn’t a need to choose or add different providers for the build because they are automatically detected. If additional providers are needed for the application, you can define those in a Nixpacks configuration file.

If you want to use a language that is not a supported Nixpacks or buildpacks language, you must use a Dockerfile. When you add your application, you can select the Use Dockerfile to set up container image option.

Configure Nixpacks

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 — Kinsta can automatically detect your web process command. You can change this if required, and you can define additional processes.

Processes in a Procfile — You may want to define your processes in a Procfile within your application’s code.

Nixpacks Binary Directories

With Nixpacks, the binary directories may differ from the default binary directories for the application language. The following table shows the binary directories used for some of the most common languages:

Language Directory
Node.js /nix/var/nix/profiles/default/bin/node
Ruby /nix/var/nix/profiles/default/bin/ruby
Python /nix/var/nix/profiles/default/bin/python
Java /nix/var/nix/profiles/default/bin/java
Scala Scala doesn’t have a specific default binary path like some other compiled languages. When you compile a Scala program, it generates bytecode that runs on the Java Virtual Machine (JVM).

The compiled Scala classes are typically stored in a directory structure that mirrors the package structure of your code. This is similar to how Java classes are organized. By default, when you compile a Scala source file, the compiled .class files will be placed in the same directory as the source code (within a subdirectory structure based on the package declarations).

If needed, you can install Scala’s runtime tools using a Dockerfile instead of using a Nixpack.

PHP /nix/var/nix/profiles/default/bin/php
Go Go doesn’t have a specific default binary path like some other compiled languages. When you compile a Go program, the resulting binary executable is typically placed in the same directory as your source code by default.

If needed, you can install Go’s runtime tools using a Dockerfile instead of using a Nixpack.

Related Documentation