Installing Garden
This page details the different installation methods for Garden.
Please follow the guide for your operating system:
If you'd like to run Kubernetes locally, please see our local Kubernetes guide for installation and usage information.
You need the following dependencies on your local machine to use Garden:
- Git (v2.14 or newer)
- [Windows only] rsync (v3.1.0 or newer)
And if you'd like to build and run services locally, you need a local installation of Kubernetes. Garden is committed to supporting the latest six stable versions (i.e. if the latest stable version is v1.23.x, Garden supports v1.18.x and newer).
For Mac, we recommend the following steps to install Garden. You can also follow the manual installation steps below if you prefer.
You can easily install Garden using Homebrew or using our installation script. You may also manually download Garden from the releases page on GitHub.
brew tap garden-io/garden
brew install garden-cli
To later upgrade to the newest version, simply run
brew update
and then brew upgrade garden-cli
.First make sure the requirements listed above are installed. Then run our automated installation script:
curl -sL https://get.garden.io/install.sh | bash
To later upgrade to the latest version, simply run the script again.
If you prefer, you can perform the installation manually, as follows:
- 1.
- 2.
- 3.Next create a
~/.garden/bin
directory, and extract the archive to that directory. Make sure to include the whole contents of the archive. - 4.Lastly, either add the
~/.garden/bin
directory to your PATH, or add a symlink from your/usr/local/bin/garden
to the binary at~/.garden/bin/garden
.
To install Docker, Kubernetes and kubectl, we recommend Docker for Mac.
Please refer to their installation guide for how to download and install it (which is a pretty simple process).
If you'd like to use a local Kubernetes cluster, please refer to the Local Kubernetes guide for further information. For remote clusters, take a look at the Remote Kubernetes guide.
You can run Garden on Windows 10 Home, Pro or Enterprise editions.
Note: The Home edition doesn't support virtualization, but you can still use Garden if you're working with remote Kubernetes and in-cluster building.
To install the Garden CLI and its dependencies, please use our installation script. To run the script, open PowerShell as an administrator and run:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/garden-io/garden/main/support/install.ps1'))
The things the script will check for are the following:
- git and rsync . The script will install or upgrade those via Chocolatey.
To later upgrade to the newest version, simply re-run the above script.
We also recommend adding an exclusion folder for the
.garden
directory in your repository root to Windows Defender:Add-MpPreference -ExclusionPath "C:\Path\To\Your\Repo\.garden"
This will significantly speed up the first Garden build of large projects on Windows machines.
Note that you must run Powershell with elevated permissions when you execute this command.
Use your preferred method or package manager to install
git
and rsync
. On Ubuntu, that's sudo apt install git rsync
, on Alpine apk add --no-cache git rsync
The Alpine linux distribution also requires
gcc
to be installed: apk add --no-cache gcc
.You can use our installation script to install Garden automatically:
curl -sL https://get.garden.io/install.sh | bash
To later upgrade to the latest version, simply run the script again.
If you prefer, you can perform the installation manually, as follows:
- 1.
- 2.Next create a
~/.garden/bin
directory, and extract the archive to that directory. Make sure to include the whole contents of the archive. - 3.Lastly, either add the
~/.garden/bin
directory to your PATH, or add a symlink from your/usr/local/bin/garden
to the binary at~/.garden/bin/garden
.
If you'd like to use a local Kubernetes cluster, please refer to the local Kubernetes guide for installation and usage information.
If you're running Garden behind a firewall, you may need to use a proxy to route external requests. To do this, you need to set the
HTTP_PROXY
, HTTPS_PROXY
and NO_PROXY
environment variables. For example:export HTTP_PROXY=http://localhost:9999 # <- Replace with your proxy address.
export HTTPS_PROXY=$HTTP_PROXY # <- Replace if you use a separate proxy for HTTPS.
export NO_PROXY=local.demo.garden,localhost,127.0.0.1 # <- This is important! See below.
The
NO_PROXY
variable should include any other hostnames you might use for local development, since you likely don't want to route local traffic through the proxy.