Go
Detected from go.mod. The newest published toolchain compiles the app.
See Buildpacksfor how detection and version policy work.
Detects
go.mod in the base directory.
Versions
Default is Go 1.26. Published toolchains as of September 2026 include 1.25-1.27. Go on Nodion always uses the newest published toolchain. An older go line in go.mod still builds.
The requested version is read from, in this order:
.go-version- The
godirective ingo.mod
The toolchain itself is not shipped in the run image. Only your binary is.
Install and build
go mod download when go.sum exists. Then:
- Each subdirectory of
cmd/that contains.gofiles is built as its own binary. - If none,
go buildof.produces a binary namedapp.
Default CGO_ENABLED=0 and -ldflags=-s -w. Override with env CGO_ENABLED and GOFLAGS_LDFLAGS. Native libraries you need at compile time go in an Aptfile or project.toml.
Gin apps get GIN_MODE=release when that module is in go.sum.
Start command
Default web is the binary named server, api, web, or app if one of those was built, otherwise the first. Extra cmd/ binaries become extra process types. Override with a Procfile. Listen on PORT.