Skip to content

Go Modules via Athens

The /cache volume keeps the Go module cache warm on a single host. Athens is a different layer — a Go module proxy that stacks on top of the filesystem cache.

An Athens proxy is worth running when you want to:

  • Share one module cache across hosts. Every runner pulls modules through the same proxy instead of each host re-fetching from the public proxy.
  • Survive an upstream outage or a deleted module. Athens keeps a durable copy of every module version it has served.
  • Centralize private and public modules behind one endpoint.

Running Athens is your job — see the Athens docs. Once it’s reachable, point Runaway at it through custom env.

  1. Set GOPROXY in custom env. Open the scale set’s custom-env field and add:

    {
    "GOPROXY": "http://athens.lan:3000"
    }

    Replace athens.lan:3000 with your own Athens host and port.

  2. Save the scale set. New runners inherit the variable, so go build and go mod download resolve through your proxy.

Keep the Go toolchain from verifying private modules against the public checksum database:

  • GOPRIVATE — comma-separated glob list of module path prefixes to treat as private (skips the proxy and the public checksum DB for matching paths).
  • GONOSUMDB / GONOSUMCHECK — older checksum-verification knobs. On current Go, GOPRIVATE is preferred; reach for these only if your toolchain documents needing them.
  • GOFLAGS — persistent build flags (for example -mod=mod) for every go invocation in the job.

A typical private-module setup:

{
"GOPROXY": "http://athens.lan:3000",
"GOPRIVATE": "github.com/your-org/*",
"GONOSUMDB": "github.com/your-org/*"
}

Custom env is plaintext. Any token Athens needs to reach a private VCS is a secret and belongs out of custom env — see Custom environment variables.