Skip to main content

Deploy Go Apps

Go is a popular programming language for backend development. Go is served as a compiled language, which means you need to compile your code before running it. This is different from interpreted languages like PHP, Python, and Ruby.

Popular Go recipes include Gin and Echo. Please read our Runner's Guide first if you haven't.



source: clear
- go latest
root: public_html/public
enabled: on
app_start_command: env PORT=$PORT ./app
- go mod init app
- go get
- filename: app.go
content: |
package main

import ""

func main() {
app := gin.Default()
app.GET("/", func(c *gin.Context) {
c.String(200, "Hello, World!")
- go build -o app

A simple Go website with Gin for development.

Go Environment

You can specify the Go version in the features section. For example, go 1.16.5 will install Go 1.16.5. You can also use go latest to install the latest version of Go.

- go latest

There are no builtin Go compiler in system files. You need to install Go first before using it.