- 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
1
Open the New Frame modal
In your Nubo dashboard, open the Project and Space you want, then hit + Frame.
2
Pick the repo and branch
Connect your GitHub repo. The branch you pick is the one Nubo watches for pushes.
3
Confirm the port
Should match the port your app actually listens on (
8080 for the example above).4
Deploy
Hit deploy. The first build takes 30 to 60 seconds. You can follow it in the Logs tab.
*.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. You can point the build at a specific one with a root nubo.toml:
nubo.toml
entrypoint applies to every Frame built from that repo: a single committed nubo.toml can’t hand two Frames two different binaries. To deploy several binaries as separate Frames, set each Frame’s build Source directory to that binary’s package (cmd/api, cmd/worker) under Frame Settings instead. Each Frame keeps its own URL, env vars, and deploy history.
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. - Go version. The Go pack builds on a fixed Go version. It doesn’t read the
godirective from yourgo.mod, so bumpinggo 1.XXthere won’t change the toolchain the build uses.
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.