Installation

# Installing Nitro

# macOS and Linux

You’ll need to install prereleases manually by downloading the appropriate Nitro binary and telling your system to use it.

macOS users can optionally install Nitro using Brew.

# Manual Installation

If you run into issues with the shell script installer, you can manually install Nitro:

  • Visit Nitro’s GitHub Releases (opens new window) page and download the archive for your system.
  • Extract the release archive and make the nitro executable with chmod +x ./nitro.
  • Move the binary into your path with sudo mv ./nitro /usr/local/bin.

Once the nitro executable is in place:

  • In your terminal, run nitro, choose Cancel for the security prompt, and visit System PreferencesSecurity and PrivacyGeneral to choose Allow Anyway next to the warning about nitro being blocked.
    • Alternatively, you can strip the automatic quarantine flag:
    xattr -dr com.apple.quarantine /usr/local/bin/nitro
    
  • Run nitro init and follow the prompts to create your machine.

# macOS via Brew

Using the Homebrew (opens new window) package manager:

  • Install Docker Desktop:
    brew install docker --cask
    
  • Install Nitro:
    brew tap craftcms/nitro
    brew install nitro
    nitro init
    

# Windows

Nitro 2 runs on Windows 10 Home or Pro and requires build 19042 or higher with WSL2.

  • Install Docker Desktop (opens new window) 3.0.0 or higher.
  • Install WSL2 (opens new window).
  • Install the WSL2 Linux kernel update package (opens new window).
  • Set default WSL to version 2 using wsl --set-default-version 2.
  • Install a WSL2 compatible distro from the Microsoft Store. We recommend Ubuntu 20 (opens new window).
  • In Docker Desktop, go to SettingsGeneral and make sure Use the WSL 2 based engine is checked.
  • In Docker Desktop, go to SettingsResourcesWSL Integration and make sure WSL is enabled for the distro you installed.
  • Open the WSL2 terminal. If you installed Ubuntu, for example, it will be listed as “Ubuntu” in the Start Menu.
  • Verify Docker is running inside the distro by running docker ps.
  • From the terminal, run bash <(curl -sLS http://installer.getnitro.sh).

If you run into issues with the shell script installer, you can manually install Nitro:

# Manual Installation

  • Visit Nitro’s GitHub Releases (opens new window) page and use the nitro_linux_x86_64.tar.gz inside your WSL2 instance.
  • Extract the release archive and make the nitro executable with chmod +x ./nitro.
  • Move the binary into your path with sudo mv ./nitro /usr/local/bin.

# Uninstalling Nitro

To completely remove Nitro, first destroy your machine:

nitro destroy

# macOS and Linux

Then remove your nitro command:

sudo rm /usr/local/bin/nitro

You can optionally remove your Nitro config as well:

rm -rf ~/.nitro

# macOS via Brew

If you installed Nitro with brew:

brew uninstall nitro

# Windows

Follow the uninstallation instructions for Linux inside your WSL2 box.