Skip to main content
Virtus Cloud supports Go applications natively, compiling and running your code directly from source using go run. The platform automatically runs go mod tidy to resolve and clean up your module dependencies before starting your app, so you do not need to vendor your modules or pre-compile your binary. This guide walks you through the full process of configuring and deploying a Go project on Virtus Cloud.

Prerequisites

Before you deploy, make sure you have the following:

Go version

Virtus Cloud provides the following Go versions:
VERSION valueGo version
recommended1.24.6
latest1.24.6
Use VERSION=recommended for all production deployments.

Create your config file

Every Virtus Cloud deployment requires a virtuscloud.app configuration file at the root of your project. Set MAIN to your Go entry-point file (typically main.go).

Config File Reference

Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
virtuscloud.app
MAIN=main.go
MEMORY=256
VERSION=recommended
DISPLAY_NAME=My Go App

Startup behavior

Virtus Cloud determines how to start your application based on whether the START field is set in your config file.
  • If START is not set, the platform runs go run MAIN, where MAIN is the file defined in your config.
  • If START is set, the platform executes the START command directly, bypassing the default behavior.
Before starting your application, Virtus Cloud automatically runs go mod tidy to synchronize your module graph and remove unused dependencies.
Custom start command example
START=go run ./cmd/server/main.go
For more information on all startup parameters, see the Config File Reference.

Required files

Your ZIP archive must include the following files:
FilePurpose
virtuscloud.app or virtuscloud.configPlatform configuration
main.go (or your MAIN file)Application entry point
go.mod or go.workModule dependency manifest
go.sum (optional)Dependency checksum file
The virtuscloud.app config file must be at the root of the ZIP archive. If it is inside a subfolder, Virtus Cloud cannot find it during deployment.
You do not need to include a vendor/ directory. Virtus Cloud resolves modules via go mod tidy at startup.

Upload your project

Once your files are ready, package them into a .zip archive and upload using your preferred method.
1

Install the CLI

If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:
curl -fsSL https://cli.virtuscloud.app/install | bash
To update an existing installation:
virtuscloud update
2

Authenticate

Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
virtuscloud login
3

Deploy

From your project directory, run:
virtuscloud upload
Or pass the path to an existing ZIP file:
virtuscloud upload my-project.zip

Troubleshooting

This error appears when the file path in your MAIN parameter does not match a file in your ZIP archive. Check that the filename is correct. If your entry point is inside a package directory, use the relative path — for example, MAIN=cmd/server/main.go.
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. Increase the MEMORY value in your config if your application is crashing due to memory pressure. See the LACK_OF_RAM troubleshooting guide for more details.
If go mod tidy fails during startup, ensure your go.mod file is correctly initialized with go mod init and that all imported packages are listed as dependencies. Run go mod tidy locally before uploading to verify that your module graph is clean.
If you continue to experience issues after reviewing this guide, contact the Virtus Cloud support team.