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

# Installation

> Install Dokrypt on macOS, Linux, or Windows.

## Prerequisites

Dokrypt requires **Docker** (or Podman) running on your machine. All chains and services run as containers.

* [Docker Desktop](https://docs.docker.com/get-docker/) (macOS/Windows) or Docker Engine (Linux)
* Docker API version **1.41** or higher
* At least **5 GB** of free disk space

Verify Docker is running:

```bash theme={null}
docker info
```

## Install via npm (Recommended)

The simplest way to install Dokrypt. Works on macOS, Linux, and Windows.

```bash theme={null}
npm install -g dokrypt
```

This installs the correct platform-specific binary automatically. Supported platforms:

| OS      | Architecture  | Package                 |
| ------- | ------------- | ----------------------- |
| Linux   | x64           | `@dokrypt/linux-x64`    |
| Linux   | ARM64         | `@dokrypt/linux-arm64`  |
| macOS   | Intel         | `@dokrypt/darwin-x64`   |
| macOS   | Apple Silicon | `@dokrypt/darwin-arm64` |
| Windows | x64           | `@dokrypt/win32-x64`    |

Verify the installation:

```bash theme={null}
dokrypt version
```

## Install via Docker

Run Dokrypt directly as a Docker container:

```bash theme={null}
docker pull ghcr.io/dokrypt-org/dokrypt:latest
```

Run commands with:

```bash theme={null}
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
  -v $(pwd):/workspace -w /workspace \
  ghcr.io/dokrypt-org/dokrypt:latest init my-project
```

<Warning>
  The Docker method requires mounting the Docker socket (`/var/run/docker.sock`) so Dokrypt can manage containers.
</Warning>

## Install from Binary

Download pre-built binaries from [GitHub Releases](https://github.com/dokrypt-org/dokrypt/releases).

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    # Linux x64
    curl -L https://github.com/dokrypt-org/dokrypt/releases/latest/download/dokrypt_0.1.0_linux_amd64.tar.gz | tar xz
    sudo mv dokrypt /usr/local/bin/

    # macOS Apple Silicon
    curl -L https://github.com/dokrypt-org/dokrypt/releases/latest/download/dokrypt_0.1.0_darwin_arm64.tar.gz | tar xz
    sudo mv dokrypt /usr/local/bin/

    # macOS Intel
    curl -L https://github.com/dokrypt-org/dokrypt/releases/latest/download/dokrypt_0.1.0_darwin_amd64.tar.gz | tar xz
    sudo mv dokrypt /usr/local/bin/

    # Verify
    dokrypt version
    ```
  </Tab>

  <Tab title="Windows">
    1. Download `dokrypt_windows_amd64.zip` from [Releases](https://github.com/dokrypt-org/dokrypt/releases)
    2. Extract the ZIP
    3. Add the extracted folder to your system PATH
    4. Open a new terminal and run `dokrypt version`
  </Tab>
</Tabs>

## Build from Source

Requires [Go 1.24+](https://go.dev/dl/).

```bash theme={null}
git clone https://github.com/dokrypt-org/dokrypt.git
cd dokrypt
make build
```

The binary will be at `./bin/dokrypt`. Move it to your PATH:

```bash theme={null}
sudo mv ./bin/dokrypt /usr/local/bin/
```

## Verify Installation

Run the built-in diagnostics to check that everything is set up correctly:

```bash theme={null}
dokrypt doctor
```

This checks:

* Docker is installed and running
* Docker API version meets minimum requirements
* Sufficient disk space is available
* Required ports (8545, 5001, 8080, 4000, etc.) are available

Example output:

```
Dokrypt Doctor
Platform: linux/amd64

Docker installed             ok
Docker daemon running        ok
Docker API version 1.45      ok (minimum 1.41)
Disk space: 45 GB free       ok (minimum 5 GB)
Port 8545                    available
Port 5001                    available
Port 8080                    available
Port 4000                    available
Port 8000                    available
Port 6688                    available
Port 3000                    available

All checks passed!
```

## Updating

```bash theme={null}
# npm
npm update -g dokrypt

# Docker
docker pull ghcr.io/dokrypt-org/dokrypt:latest
```

## Uninstalling

```bash theme={null}
# npm
npm uninstall -g dokrypt

# Binary
sudo rm /usr/local/bin/dokrypt

# Clean up data directory
rm -rf ~/.dokrypt
```
