SAGE Installation
SAGE ships as one static binary (sagegw, built without CGO) and as a multi-arch container image. Each tagged release publishes both.
Option 1: Release Binary
Each release carries binaries for linux and darwin on amd64 and arm64, with a checksums.txt:
VERSION=v0.1.0
curl -fsSLO "https://github.com/pokt-network/sage/releases/download/${VERSION}/sagegw-linux-amd64"
curl -fsSLO "https://github.com/pokt-network/sage/releases/download/${VERSION}/checksums.txt"
sha256sum --ignore-missing -c checksums.txt
chmod +x sagegw-linux-amd64
./sagegw-linux-amd64 -config config.yamlOption 2: Container Image
docker run --rm -p 3069:3069 \
-v "$PWD/config.yaml:/etc/sage/config.yaml:ro" \
ghcr.io/pokt-network/sage:v0.1.0 -config /etc/sage/config.yamlThe image runs as a non-root user. :latest points to the newest release that is not a pre-release; pin a version tag in production.
Option 3: Build from Source
git clone https://github.com/pokt-network/sage.git
cd sage
make sage_build # → bin/sagegw, CGO disabled
./bin/sagegw -config config.yamlThe Go version is whatever the go directive in go.mod names. make docker_build builds the image locally.
Supplying the Config
The config comes from one of two places:
| Source | Use |
|---|---|
-config <path> | A file. Preferred: SIGHUP and POST /admin/reload re-read it without a restart. |
GATEWAY_CONFIG | The YAML content (not a path), for a config delivered as a secret. |
A config value may be ${VAR}, expanded from the environment, which keeps keys out of the file itself.
Verifying the Installation
curl -s http://localhost:3069/health # 200 while the process serves
curl -s http://localhost:3069/ready # 200 once sessions and reputation are warm
curl -s http://localhost:9090/metrics | head # Prometheus, scrape-onlyThe startup log line SAGE gateway initialized carries the version and commit. Include it in any bug report.
Running Without a Network
bench/mock-config.yaml in the repository runs the full middleware chain against an in-process mock backend: no full node, no Redis, no suppliers, no relays spent. Use it to try SAGE and to load-test the gateway itself.
./bin/sagegw -config bench/mock-config.yamlDevelopment Commands
| Command | What it does |
|---|---|
make test_unit | Unit tests, -short -race (the canonical run) |
make go_lint | golangci-lint, then a dead-code check |
make docs | Regenerates the config, metrics and admin API reference from source |
make e2e_test | End-to-end tests against a running gateway at SAGE_URL |