Golang hosting free of charge for the services that fit in a 15 MB binary: connect the GitHub repository, and SnapDeploy builds a static binary, runs it on Alpine behind its own HTTPS address, and redeploys on every push.
Free tier: 4 containers, 512 MB each, 100 hours a month, 10 deploys a day. No credit card. Always-On from $12 a month when the service has to answer 24/7.
Last verified 5 November 2026 against the free-tier docs, the build generator and each competitor's own documentation.
Go is the easy case for container hosts: a static binary, a few megabytes of RAM, no runtime to install. The hard part is finding a free tier that still exists. This table is what each provider's own documentation said when we checked it.
| Host | Free tier for a Go server | RAM / CPU | Sleeps after | Card at sign-up | Cheapest 24/7 |
|---|---|---|---|---|---|
| SnapDeploy | 4 containers, 100 container-hours/month, 10 deploys/day; no expiry; static binary built from go.mod | 512 MB / 0.25 vCPU | 15 min idle, wakes in ~60 s | No | Always-On Small $12/month |
| Render | 750 instance-hours/month per workspace; 5 GB bandwidth on the Hobby workspace since April 2026; native Go builds | 512 MB / 0.1 CPU | 15 min idle, wakes in about a minute | No | Starter $7/month |
| Railway | $5 one-time trial credit for 30 days, then a Free plan with $1/month of credit | 1 GB / shared vCPU on the trial | Opt-in only; credit runs out instead | No for the trial | Hobby $5/month minimum usage |
| Koyeb | 1 free web service, Frankfurt or Washington only | 512 MB / 0.1 vCPU | 1 h idle, wakes in 1–5 s | Yes, $29 hold since Feb 2026 | eco-nano $1.61/month |
| Google Cloud Run | Request-based free allowance (2M requests, 180K vCPU-seconds a month) per billing account; scales to zero | Configurable per instance | Scale-to-zero between requests | Yes, billing account required | Pay per use; a min-instance costs money |
| Fly.io | No free tier since October 2024; trial of 2 machine-hours or 7 days, then apps stop | Up to 2 vCPU / 4 GB on the trial | Stops at the end of the trial | Card or $25 prepaid to keep running | shared-cpu-1x $1.94/month |
| Oracle Cloud Always Free | Arm VMs you manage yourself: 2 OCPUs and 12 GB in total since June 2026 | Up to 12 GB / 2 OCPUs | No sleep; you run the OS | Yes, card and phone | Free while the VM exists |
Isolation: every SnapDeploy container, free tier included, runs as its own AWS Fargate task with a reserved 0.25 vCPU and 512 MB, so your Go process never shares a kernel with another customer's app.
Sources: render.com/docs/free, render.com/docs/compute-plans and the 23 April 2026 plan changelog; docs.railway.com free-trial and plans pages; koyeb.com docs (reference/instances, reference/organizations) and pricing; cloud.google.com free-cloud-features and run/docs; fly.io free-trial and pricing pages; docs.oracle.com Always Free resources. Checked 26 September 2026 and re-read 5 November 2026; if a provider changes its plan, this table will be behind until the next check.
Read from the build generator, not from a brochure. Every step below runs on AWS CodeBuild for ARM64, and the image is pushed to a private registry.
go.mod at the repository root makes it a Go project. Gin and Fiber are recognised by name in go.mod; everything else is simply built.go directive in go.mod. Go 1.21 comes from the platform's own image mirror; any other version is pulled as the official golang:<version>-alpine image.go.mod and go.sum are copied first so go mod download is cached between builds, then the source is copied and compiled with CGO_ENABLED=0 go build -o main . — the main package must sit beside go.mod../main with PORT=8080 in the environment and the port exposed, on a Small container (512 MB, 0.25 vCPU) on the free tier./actuator/health, /health, /healthz, /api/health and then /, accepting any 2xx or 3xx. Once it passes, HTTPS traffic flows to <name>.containers.snapdeploy.app and the build and runtime logs are in the dashboard.Two files, the same ones in the sample repository AAR-Labs/go-on-snapdeploy, built and run on ARM64 before this page was written. Standard library only; swap in Gin, Echo, Fiber or Chi as you like.
// main.go
package main
import (
"log"
"net/http"
"os"
)
func main() {
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
mux := http.NewServeMux()
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`{"status":"ok"}`))
})
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello from Go on SnapDeploy"))
})
log.Printf("listening on 0.0.0.0:%s", port)
log.Fatal(http.ListenAndServe("0.0.0.0:"+port, mux))
}
A server bound to localhost or to a hard-coded port passes its own tests and fails every health check in the cloud. This is the most common first-deploy failure in the build logs.
module github.com/you/my-service
go 1.21
Run go mod tidy locally and commit go.sum when you have dependencies. No Dockerfile is required; if you commit one it is used as written, with a two-stage limit on Small containers. A multi-stage example is on the Docker hosting page.
Sign in with email or GitHub, choose Deploy from GitHub, pick the repository and branch, and add environment variables in the dashboard rather than in the code: a database URL, API keys, feature flags. Values whose names look like secrets are masked. A Go build usually finishes in one to two minutes.
Every push to the linked branch rebuilds and redeploys. Other branches are ignored. A failed build never replaces the running version.
A Go binary idles at a few megabytes of RAM, but the container around it still costs the host money every hour it runs, so every free tier that is still alive either sleeps the process or meters it. SnapDeploy sleeps a free container after about 15 minutes without traffic and wakes it in about 60 seconds on the next browser visit; sleeping time does not count against the 100 hours. Render sleeps after 15 minutes, Koyeb after an hour, Cloud Run scales to zero between requests.
For a portfolio service, a class project or an internal tool a few people open a few times a day, that is fine. For a service that other systems call around the clock, a webhook receiver, a Discord or Telegram bot, or anything holding a WebSocket open, it is not: those callers do not trigger the wake. That service belongs on Always-On, from $12 a month per container, which also removes the deploy limit and turns on WebSockets and custom domains.
One more thing a free container cannot do: keep files between restarts. The filesystem resets on redeploy, restart and wake, so an embedded database or an on-disk cache is for demos only. Keep state in a database add-on or an external database.
Detection is by go.mod, so most repositories deploy as they are. The best hosting for Go depends less on the framework than on whether the process must stay up, which is the free-versus-Always-On question.
All compile with the generated build. Use r.Run("0.0.0.0:" + port) in Gin, app.Listen("0.0.0.0:" + port) in Fiber, and so on.
The generated build compiles the package beside go.mod. For a cmd/server/main.go layout, commit a two-stage Dockerfile that builds ./cmd/server.
The build sets CGO_ENABLED=0. Packages that need cgo, such as the mattn SQLite driver, need a pure-Go alternative (modernc.org/sqlite) or your own Dockerfile.
Small (512 MB, 0.25 vCPU) is more than most Go services need. Medium (2 GB) and Large (4 GB) run on Always-On for in-memory caches and heavier concurrency.
Managed PostgreSQL, MySQL, MariaDB, MongoDB, Redis and RabbitMQ add-ons, each with a $1 12-hour trial; or an external database through a connection string. pgx, database/sql and GORM all work.
Both come with Always-On: your domain with a certificate issued for you, and gorilla/websocket or nhooyr connections held open.
Yes. SnapDeploy's free tier runs up to 4 containers with 100 container-hours a month and 10 deploys a day, and sign-up needs only an email address or a GitHub account. Render's free web services also need no card. Google Cloud Run and Oracle's Always Free VMs both need a card and a billing account.
No. A go.mod at the repository root is enough: the platform builds a static binary with CGO_ENABLED=0 go build -o main . on a Go 1.21 builder image and runs it on Alpine with ca-certificates, typically a 10–30 MB image. The main package must sit beside go.mod; a cmd/server layout needs your own Dockerfile or a custom start command.
Read the PORT environment variable and bind 0.0.0.0. The platform injects PORT, 8080 by default for Go, and routes HTTPS to it. A server bound to localhost or a hard-coded port fails the health check.
Go 1.21 comes from the platform's own image mirror. Any other version declared in the go directive of go.mod is pulled as the official golang image, so Go 1.22 and 1.23 build too.
Yes. Detection is by go.mod, not by framework; Gin and Fiber are recognised by name, and anything that compiles with go build runs. The build sets CGO_ENABLED=0, so packages that need cgo, such as the mattn SQLite driver, need a pure-Go alternative or your own Dockerfile.
Not on any free tier we checked. Free containers sleep after about 15 minutes without traffic and wake in about 60 seconds on the next browser visit. A Go service that other systems call around the clock needs Always-On, from $12 a month per container, which also removes the deploy limit and allows WebSockets and a custom domain.
Managed PostgreSQL, MySQL, MariaDB, MongoDB, Redis and RabbitMQ are paid add-ons wired into the container's environment, each with a $1 12-hour trial. An external database works too: put its connection string in an environment variable and read it with os.Getenv.
Not strictly. The health check tries /actuator/health, /health, /healthz, /api/health and then /, accepting any 2xx or 3xx response. A three-line /health handler makes the check unambiguous.
Free tier, no credit card, no Dockerfile needed. Always-On from $12 a month when the service must answer 24/7.
Deploy Free TodayThe first managed container PaaS to offer a one-time 24-hour Always-On pass under $5. Everything in Always-On Small for one Small (512 MB) container — runs 24/7, no daily deploy limit, WebSockets & real-time apps. No subscription, no auto-renewal.
Need a managed database too? DB Sprint Pack — $1 / 12h for Postgres, MySQL, MariaDB, Mongo, Redis, or RabbitMQ.