- A
go.modat the repo root. - A
main.go(at the root, or undercmd/<name>/main.gofor monorepos). - Your server listens on
:$PORTand0.0.0.0.
Starting from scratch
If you don’t have a Go app yet, here’s the smallest possible one:main.go:
main.go
Deploy
Open the New Frame modal
In your Nubo dashboard, open the Project and Space you want, then hit + Frame.
Pick the repo and branch
Connect your GitHub repo. The branch you pick is the one Nubo watches for pushes.
*.nubo.onl URL shown in the dashboard. To redeploy, push to your tracked branch.
Monorepos and multiple binaries
If your repo has more than one binary (cmd/api/main.go, cmd/worker/main.go), Raypacks picks the alphabetically first one by default. Pin a specific binary with nubo.toml:
nubo.toml
Things that trip people up
- Hardcoded port.
http.ListenAndServe(":8080", nil)works only if your Frame’s port is also8080. Reados.Getenv("PORT")to be safe. - Binding to
localhost. Listen on0.0.0.0(or empty host like":8080"), not127.0.0.1. Nothing outside the container can reachlocalhost. - Library repos. If your repo has no
main.goanywhere, Raypacks won’t pick it up. You need apackage mainsomewhere with amain(). - CGO. The Go pack builds with
CGO_ENABLED=0. If you depend on a C library, switch the Frame’s Builder to Paketo for now.
How the build works
This guide uses the Go pack of Raypacks, Nubo’s default builder. It produces a static binary on a scratch image. No Dockerfile, nogo.mod version pinning, no BP_* env vars.
If you need something the Go pack doesn’t support yet (ARM, custom -ldflags, CGO), switch the Frame’s Builder to Paketo in Frame Settings.