Deploy a Go app on OrbixPanel
A Go web service deploys as a managed binary behind a reverse proxy.
What OrbixPanel runs
Because your repo has a go.mod, it’s detected as Go and built with:
go build -o app .then started as ./app. So your main package must be at the repo root (or
adjust your build accordingly).
The one rule: listen on $PORT
OrbixPanel sets a PORT environment variable and forwards traffic to it. Read it:
package main
import ( "net/http" "os")
func main() { port := os.Getenv("PORT") if port == "" { port = "8080" // local fallback } http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello from OrbixPanel")) }) http.ListenAndServe("0.0.0.0:"+port, nil)}A health check waits for the app to listen — if you hard-code a port, it’ll fail.
Deploy
Apps → Deploy from Git → repo + branch → Deploy → add domain + SSL. Background: how deploys work.
Tips
- Vendoring / modules: the build runs
go buildwith modules enabled; commit a validgo.mod/go.sum. - Config via env: read database URLs and secrets from environment variables.
- Static assets: embed them (
embed.FS) or serve from a folder your binary knows about.
Troubleshooting
- Build fails → run
go build ./...locally first; the deploy log shows the compiler error. - Won’t go live → you’re not reading
os.Getenv("PORT").
Running OrbixPanel? Go services build and deploy straight from Git. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.