Deploy

Deploy Go, on a server run for you.

Ship a Go service straight from GitHub. Selfhost.dev builds your module into a lean binary and runs it on a dedicated server we provision and maintain, with auto-deploy on push, a managed database, custom domains, and SSL.

Why provision a VPS for one binary, when Selfhost.dev can run it for you?

Auto-built binary /Any router or framework /Custom domain + SSL /From ~$0.02/hr

What you get

Your Go service, in production.
On a server you control.

Go compiles to a single static binary, which makes it ideal for a server you control. Selfhost.dev detects your Go module, builds it, and runs it, whether it is a net/http service, Gin, Echo, Fiber, or a gRPC backend. Add a database and a domain and you are live, with nothing to patch.

Nixpacks (Go, auto), or your Dockerfile

Deploy in 5 steps

From zero to live.
No server to set up.

From a Go module to a live service in a few steps.

1

Create a Project

Name it and a dedicated server is provisioned for you in minutes.

2

Connect your Go repo

Connect GitHub or paste a repo URL and pick a branch. Nixpacks detects Go from your go.mod and builds the binary.

3

Set the start command and port

Point it at your built binary, set the listen port to match the project, and add any build flags you need, or bring a Dockerfile.

4

Set environment variables

Add your config and secrets, or paste a .env to import in bulk.

5

Add a database and a domain

Attach a PostgreSQL, Redis, MySQL, or MongoDB, point a custom domain, and HTTPS goes live automatically.

Environment variables

Configure it
in minutes.

Go services usually read config from the environment:

Paste a .env to import in bulk, or set keys one by one. Values are wired into every build and deploy.

Key variables

PORT The port your service listens on; match the project port.
DATABASE_URL Connection string for your project or managed database.
GIN_MODE / app flags Framework or app-specific settings, for example release mode.

Why Selfhost.dev

Go, the easy way.
On a server you control.

Any Go framework

net/http, Gin, Echo, Fiber, Chi, or gRPC. The build runs your module, so anything compiles and runs.

Lean and fast

A compiled binary uses little memory, so a small project server goes a long way.

A server you control

Live CPU, memory, and connection metrics on a dedicated server, not a shared black box.

Databases alongside

Add PostgreSQL, Redis, MySQL, or MongoDB, or a dedicated managed Postgres instance.

Auto-deploy + SSL

Push to deploy, with PR previews, rollback, a custom domain, and renewed HTTPS.

Pay only for what you run

From around $0.02/hr against prepaid credits, paused at a zero balance.

Drive it from your AI editor

Trigger deploys, stream logs, set env vars, and add domains from Claude, Cursor, or any MCP client: 150+ MCP tools.

Which one

A whole backend on one server

Run your Go API, a frontend, and a database on the same project server, billed as one server. Stop it and you pay nothing.

Frequently Asked Questions

How do I deploy a Go app on Selfhost.dev?
Connect your GitHub repo, and Nixpacks detects Go from your go.mod, builds the binary, and runs it on a server we provision. Set the port and start command, add any database and env vars, and enable auto-deploy on push.
Which Go frameworks work?
All of them. net/http, Gin, Echo, Fiber, Chi, and gRPC services all deploy, since the build runs your own module. Bring a Dockerfile for full control.
How much does it cost to deploy Go?
Pay-as-you-go from around $0.02/hr per project server (about $0.50 a day), no tiers. Signing up gets you a $1 welcome credit, roughly 48 hours of a project server, no card needed. See pricing.
Can I connect a database?
Yes. Add a one-click PostgreSQL, Redis, MySQL, or MongoDB to the project, or attach a dedicated managed PostgreSQL instance. Managed PostgreSQL.
Do I need a Dockerfile?
No. Nixpacks builds most Go modules automatically. Bring a Dockerfile only if you want full control over the build.
Can I manage my Go deployment with AI?
Yes. The Selfhost.dev MCP server ships 150+ tools across 23 modules: trigger deploys, stream build logs, set environment variables, add domains, and manage the project from Claude, Cursor, Windsurf, or any MCP client. Explore the MCP server.

Your Go service, in production.
On a server run for you.

Auto-built binary
Database included
Run a project free for ~48 hours
Deploy Go