# Windows

*Last updated: January 2026*

This guide explains how to build **Abey (`gabey`)** from source on Windows using Chocolatey and Go.

***

### Prerequisites

Before building Abey, ensure the following requirements are met:

* **Windows 10 or later**
* **Administrator access**
* **Chocolatey package manager**
* **Go 1.15 or later**

If Chocolatey is not installed, follow the instructions at:

* <https://chocolatey.org>

***

### Install Build Tools

Open an **Administrator Command Prompt** and install the required tools:

```
choco install git
choco install golang
choco install mingw
```

These installations will automatically update your `PATH` environment variable.\
After installation completes, **open a new command prompt** (non-administrator is fine).

***

### Configure Go Environment

Ensure that the installed Go version is **1.15 or newer**.

Set up the Go workspace and environment variables:

```
set "GOPATH=%USERPROFILE%"
set "Path=%USERPROFILE%\bin;%Path%"
setx GOPATH "%GOPATH%"
setx Path "%Path%"
```

**Important Note**

If you see the warning below, the `setx` command may truncate your `PATH` variable:

```
WARNING: The data being saved is truncated to 1024 characters.
```

If this occurs, **stop immediately**, clean up your `PATH`, and retry the setup to avoid breaking your environment.

***

### Clone the Repository

Create the required directory structure and clone the Abey source code:

```
mkdir src\github.com\abeyfoundation
git clone https://github.com/abeyfoundation/go-abey src\github.com\abeyfoundation\go-abey
cd src\github.com\abeyfoundation\go-abey
```

***

### Resolve Go Dependencies (if needed)

Attempt to fetch required Go dependencies:

```
go get -u -v golang.org/x/net/context
```

If the command above fails, manually install the dependency:

```
mkdir "%GOPATH%\src\golang.org\x"
cd "%GOPATH%\src\golang.org\x"
git clone https://github.com/golang/net.git net
go install net
```

***

### Build `gabey`

Compile the Abey binaries using:

```
go install -v ./cmd/...
```

This will build `gabey` and related tools into your Go `bin` directory.

***

### Running the Node

After a successful build, you can run the Abey node by executing:

```
gabey
```

Ensure `%GOPATH%\bin` is included in your `PATH`.

***

### Troubleshooting

* Verify Go is correctly installed by running `go version`
* Ensure `GOPATH` and `PATH` are set correctly
* Reopen the command prompt after installing tools
* Avoid truncating the Windows `PATH` variable


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abey.com/installation/building_abey/instructions_windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
