Skip to content

Go Modules via Athens

The /cache volume keeps the Go module cache warm on a single host. Athens is a Go module proxy that sits on top of that filesystem cache, not a replacement for it. Run one when you want to:

  • Share one module cache across hosts, so each host stops re-fetching from the public proxy.
  • Keep serving a module after an upstream outage or a deletion. Athens holds a durable copy of every version it has served.
  • Put private and public modules behind a single 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 runner profile’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 runner profile. 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 with these variables:

| Variable | What it does | |---|---| | 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. Current Go prefers GOPRIVATE; 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.