---
id: install
slug: /install
displayed_sidebar: "0.2"
---

# Install Dagger

The first step to get started is to install dagger on your local machine.
Once installed, we recommend [following our tutorial](/1200/local-dev) (or trying a template.)

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import BrowserOnly from "@docusaurus/BrowserOnly";

import CodeBlock from "@theme/CodeBlock";
import styles from "@site/src/css/install.module.scss";
import TutorialCard from "@site/src/components/molecules/tutorialCard.js";
import Button from "@site/src/components/atoms/button.js";

<BrowserOnly>
{() =>
<Tabs defaultValue={
 window.navigator.userAgent.indexOf('Linux') != -1 ? 'linux':
 window.navigator.userAgent.indexOf('Win') != -1 ? 'windows':
 'macos'}
groupId="os"
values={[
{label: 'macOS', value: 'macos'}, {label: 'Linux', value: 'linux'}, {label: 'Windows', value: 'windows'},
]}>

<TabItem value="macos">

We assume that you have [Homebrew](https://brew.sh/) installed.
If you do, you can install `dagger` with a single command:

```shell
brew install dagger
```

This installs `dagger` in:

```shell
type dagger
# macOS ARM:
dagger is /opt/homebrew/bin/dagger
# macOS Intel:
dagger is /usr/local/bin/dagger
```

If you do not have Homebrew installed, or you want to install a specific version of `dagger`, you can run:

```shell
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.2.19 sh

./bin/dagger version
dagger 0.2.19 (GIT_SHA) darwin/arm64
```

</TabItem>

<TabItem value="linux">

The quickest way of installing `dagger` on Linux is to run the following command:

```shell
cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | sh
```

This installs `dagger` in `/usr/local/bin`:

```shell
type dagger
dagger is /usr/local/bin/dagger
```

If you want to install dagger to a different location, `cd` where you want `./bin/dagger` in.

If you want to install a specific version of `dagger`, you can run:

```shell
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.2.19 sh

./bin/dagger version
dagger 0.2.19 (GIT_SHA) linux/amd64
```

</TabItem>

<TabItem value="windows">

`dagger` can be installed in Windows via an installation powershell script, [Chocolatey](https://community.chocolatey.org/packages/dagger) or [Scoop](https://scoop.sh/#/apps?q=dagger).

If you want to use the installation script, powershell 7.0 or newer is required. From powershell, run:

```Powershell
Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 | Invoke-Expression
```

If you want to install dagger to a different location, pass in a location to the script with the `-InstallPath` parameter.

```Powershell
$script = Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1
$params = "-InstallPath C:\temp"
"$script $params" | Invoke-Expression
```

If you want to install a specific version of `dagger`, pass in a version number with the `-DaggerVersion` parameter.

```Powershell
$script = Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1
$params = "-DaggerVersion 0.2.28"
"$script $params" | Invoke-Expression
```

Without passing in the `-InstallPath`, We'll save everything under `<your home folder>\dagger`

Check that `dagger` is installed correctly by opening a `Command Prompt` terminal and run:

```shell
where dagger
C:\<your home folder>\dagger\dagger.exe
```

If you have Chocolatey installed, just open a terminal and run:

```shell
choco install dagger
```

If you have Scoop installed, just open a terminal and run:

```shell
scoop bucket add main # If you don't have the main bucket added yet
scoop install dagger
```

</TabItem>

</Tabs>
}

</BrowserOnly>

## ⚡ What's next?

After installing Dagger, we recommend following our tutorial, especially if you want a hands-on experience setting up a local pipeline (5 minutes) and then reproducing it live in your CI environment (10-30 minutes), or grab a template below to see Dagger working instantly.

If you are not sure if Dagger fits your pipeline, browse or search for topics related to your use case, or [feel free to ask our engineers and community through Discord](https://discord.gg/ufnyBtc8uY).

### Follow Our Tutorial

<TutorialCard
  img="/img/dagger-planning_astronaute.png"
  title="✨ Tutorial: Test your CI locally ✨"
  description="In this quick tutorial you'll learn how to build, test and deploy your pipeline locally and then integrate it in your own CI environment."
  buttonLabel="Let's Build!"
  url="1200/local-dev"
/>

### Explore Our Templates

Our templates are a great way to quickly see Dagger in action with a particular stack like Node.js or Go. After installing Dagger, you can check out the code and run templates right away. For more depth, try out the tutorial!

<div className={styles.templates}>
   {data.templates.map((x, index) => (
     <div className={styles.templateCard}>
       <div className={styles.templateInfo}>
         <img className="not-zoom" src={`/img/getting-started/install-dagger/${x.imgFilename}`} />
         <a href={x.url}>{x.label}</a>
       </div>
       <CodeBlock>
         git clone -b v0.2.x {x.url}
         {`\n`}
         cd {x.dir}
         {`\n`}
         {x.cmd}
       </CodeBlock>
     </div>
   ))}
 </div>

---

## 📖 Want To Go Deeper?

If you want to dig into the details of how Dagger works, we recommend you read our Concepts section.

<Button label="How It Works" docPath="f44rm/how-it-works" />

export const data = {
  templates: [
    {
      label: "Node.js with Yarn",
      imgFilename: "node.svg",
      dir: "examples/templates/nodejs/yarn/universe",
      url: "https://github.com/dagger/examples",
      cmd: "dagger do build",
    },
    {
      label: "Node.js with npm",
      imgFilename: "node.svg",
      dir: "examples/templates/nodejs/npm/bash",
      url: "https://github.com/dagger/examples",
      cmd: "dagger do build",
    },
    {
      label: "Java with Gradle",
      imgFilename: "gradle.svg",
      dir: "examples/templates/java/gradle",
      url: "https://github.com/dagger/examples",
      cmd: "dagger do build",
    },
    {
      label: "Go build",
      imgFilename: "go.svg",
      dir: "examples/templates/go/universe",
      url: "https://github.com/dagger/examples",
      cmd: "dagger do build",
    },
  ],
};
