Skip to content


nix is a cross-platform package-manager. nix runs on top of most Linux distributions (Debian, Ubuntu, Redhat, etc) as well as MacOS. Nix packages are stored in a separate folder (/nix), and you can safely run multiple versions of any package.

nix is used by the CI test-infrastructure for civicrm-core.

Major features

These instructions will install the following packages in /nix:

  • Interpreters: PHP-CLI, NodeJS
  • Servers: Apache HTTPD, MySQL, PHP-FPM, MailHog, Redis

Additionally, they will install buildkit in $HOME/buildkit.

  • Pro: nix runs locally on Linux and MacOS at full/native speed. Configuration is packaged, editable, and disposable. Can be combined with desktop tools (IDEs/debuggers). Packages don't interfere with host.
  • Con: No Windows support. Customization requires learning an obscure language.


  • Linux or MacOS (Note: Generally, you'll get the best results with an OS release that is 3-24 months old -- something recent but not brand new.)
  • x86 or arm64
  • git
  • Sudo privileges


## Download the configuration
git clone ~/buildkit

## Download and install the binaries
cd ~/buildkit

The "" script will download a few gigabytes worth of data.
It may compile some packages from source.

For further discussion about these commands and their variations, see nix/doc/


## Open a subshell
use-bknix dfl -s

## Start the services - HTTPD, MySQL, etc
cd ~/buildkit
loco run

The "loco run" command will start HTTPD, MySQL, etc on alternative ports.
This allows them to coexist with any other services you have.

For further discussion about these commands and their variations, see nix/doc/

Next steps

Finally, once you are able to work with use-bknix and loco, you can move on to using civibuild.