Building from Source

This page explains how you can build aergo from source.

If you are only interested in running the aergo tools, it is easier to use pre-built binaries or Docker images instead, as explained in Quickstart.


  1. Install dependencies

    apk update
    apk add git glide build-base go libgcc
  2. Install aergo

    go get -d
    cd ${GOPATH}/src/
    git submodule init && git submodule update


  1. If you haven’t already, install homebrew.

  2. Install dependencies

    brew install go
    brew install glide
    brew install cmake  # optional
    brew install protobuf  # optional
  3. Install aergo

    go get -d
    cd `go env GOPATH`/src/
    git submodule init
    git submodule update
  4. Run server



Building on Windows is currently not supported.

Generating protobuf files

If you changed the protobuf files, you need to re-compile the type definitions.

  1. Install protoc-gen-go

    GIT_TAG="v1.1.0" # set version of protoc-gen-go to 1.1.0, on which aergo v0.8.x depends.
    go get -u
    git -C "$(go env GOPATH)"/src/ checkout $GIT_TAG
    go install
  2. Generate type definitions from protobuf files

    make protoc