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 installed locally. Download it from the official Go website.
- A Virtus Cloud account — sign up at virtuscloud.app/login using your email or Discord.
- An active paid plan on your account. Browse plans at virtuscloud.app/plans.
Go version
Virtus Cloud provides the following Go versions:VERSION value | Go version |
|---|---|
recommended | 1.24.6 |
latest | 1.24.6 |
Create your config file
Every Virtus Cloud deployment requires avirtuscloud.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
Startup behavior
Virtus Cloud determines how to start your application based on whether theSTART field is set in your config file.
- If
STARTis not set, the platform runsgo run MAIN, whereMAINis the file defined in your config. - If
STARTis set, the platform executes theSTARTcommand directly, bypassing the default behavior.
go mod tidy to synchronize your module graph and remove unused dependencies.
Custom start command example
For more information on all startup parameters, see the Config File Reference.
Required files
Your ZIP archive must include the following files:| File | Purpose |
|---|---|
virtuscloud.app or virtuscloud.config | Platform configuration |
main.go (or your MAIN file) | Application entry point |
go.mod or go.work | Module dependency manifest |
go.sum (optional) | Dependency checksum file |
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.
- CLI upload
- Dashboard upload
Install the CLI
If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:To update an existing installation:
Authenticate
Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
Troubleshooting
The main file is invalid or corrupted
The main file is invalid or corrupted
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.Bad Memory
Bad Memory
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.Module resolution errors
Module resolution errors
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.