Go

To use our example repositories, you must create a MyKinsta account. This is an example of how to set up a Go application to deploy on Kinsta’s Application Hosting services from a Git repository.

  1. In MyKinsta, click Applications > Add application > select Git repository > Public repository, and complete as follows:
  2. Enter a Name, choose a Location, choose a pod size within Resources, and click Create & deploy.

During deployment, Kinsta automatically detects the Start command for the web process and installs dependencies defined in your go.mod file. The app is available as soon as the deployment finishes, and the Kinsta Welcome page loads at your application’s URL.

Kinsta Welcome page after successful deployment of Go.
Kinsta Welcome page after successful deployment of Go.

Prefer to watch the video version?

Web server setup

Port

Kinsta automatically sets the PORT environment variable. You do not need to define it or hard-code it into the application. Use os.Getenv("PORT") in your code when referring to the server port.

Start command

For this application, the Start command can be left blank. When you add the application, Kinsta automatically detects the required start command for the web process during the first deployment.

Was this article helpful?

© 2013 - 2025 Kinsta Inc. All rights reserved. Kinsta®, MyKinsta®, and DevKinsta® are trademarks owned by Kinsta Inc.The WordPress® trademark is the intellectual property of the WordPress Foundation, and the Woo® and WooCommerce® trademarks are the intellectual property of WooCommerce, Inc. Uses of the WordPress®, Woo®, and WooCommerce® names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation or WooCommerce, Inc. Kinsta is not endorsed or owned by, or affiliated with, the WordPress Foundation or WooCommerce, Inc. Legal information