> ## Documentation Index
> Fetch the complete documentation index at: https://second.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Barkd

Barkd has two installation methods:

* Download and install the binary release
* [Compile from source](#compile-from-source)

## Binary release

Pre-built `barkd` binaries are published on [GitLab releases](https://gitlab.com/ark-bitcoin/bark/-/releases). Pick the archive for your platform and drop the binary into your `PATH`.

<Tabs>
  <Tab title="Ubuntu/Debian">
    <Steps>
      <Step title="Download barkd">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/barkd-0.1.4-linux-x86_64 --output barkd
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x barkd
        ```
      </Step>

      <Step title="Add barkd to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp barkd /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Fedora/CentOS">
    <Steps>
      <Step title="Download barkd">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/barkd-0.1.4-linux-x86_64 --output barkd
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x barkd
        ```
      </Step>

      <Step title="Add barkd to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp barkd /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="macOS">
    <Steps>
      <Step title="Download barkd">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/barkd-0.1.4-apple-aarch64 --output barkd
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x barkd
        ```
      </Step>

      <Step title="Add barkd to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp barkd /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="macOS (Intel)">
    <Steps>
      <Step title="Download barkd">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/barkd-0.1.4-apple-x86_64 --output barkd
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x barkd
        ```
      </Step>

      <Step title="Add barkd to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp barkd /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Windows">
    Download barkd:

    ```PowerShell theme={"theme":{"light":"github-light","dark":"github-dark"}}
    wget https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/barkd-0.1.4-windows-x86_64.exe -OutFile barkd.exe
    ```

    <Note>
      When using Windows, replace `barkd` with `barkd.exe` in the rest of the commands.
    </Note>
  </Tab>
</Tabs>

## Verify installation

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
barkd --version
```

You should see: `barkd 0.1.4`

## Compile from source

<Steps>
  <Step title="Clone the repository">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    git clone https://gitlab.com/ark-bitcoin/bark
    cd bark
    ```
  </Step>

  <Step title="Install Rust">
    You need a Rust compiler. The [rustup website](https://rustup.rs) offers installation instructions for almost any platform.
  </Step>

  <Step title="Install build dependencies">
    Download additional dependencies using your package manager.

    <Tabs>
      <Tab title="Ubuntu/Debian">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        apt update
        apt install build-essential clang protobuf-compiler
        ```
      </Tab>

      <Tab title="Fedora/CentOS">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        yum install gcc make clang protobuf-compiler
        ```
      </Tab>

      <Tab title="macOS">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        brew install gcc make llvm@14 protobuf
        ```
      </Tab>

      <Tab title="Windows">
        ```PowerShell theme={"theme":{"light":"github-light","dark":"github-dark"}}
        winget install protobuf ezwinports.make LLVM.LLVM
        ```
      </Tab>

      <Tab title="Nix">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        nix develop
        ```

        Requires the `nix-command` and `flakes` experimental features.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Build barkd">
    Use `cargo build` to produce the binary in `target/`, or `cargo install` to build and add it to your `PATH` in one step.

    <Tabs>
      <Tab title="build">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        cargo build --bin barkd
        ./target/debug/barkd --version
        ```
      </Tab>

      <Tab title="build and install">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        cargo install --locked --path ./bark-cli --bin barkd
        barkd --version
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify installation">
    Run `barkd --version` to confirm the install completed successfully.
  </Step>
</Steps>
