Skip to main content
Virtus Cloud provides first-class support for Node.js, covering both JavaScript and TypeScript projects. Whether you are deploying a Discord bot, a REST API, or a full-stack web application, the platform handles dependency installation automatically and supports native TypeScript execution without a pre-compilation step. This guide walks you through everything you need to prepare and deploy your Node.js project.

Prerequisites

Before you deploy, make sure you have the following:

Create your config file

Every Virtus Cloud deployment requires a virtuscloud.app configuration file at the root of your project. Create this file and populate it with your application’s settings.

Config File Reference

Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
A minimal Node.js config file looks like this:
virtuscloud.app
MAIN=index.js
MEMORY=256
VERSION=recommended
DISPLAY_NAME=My Node 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, Virtus Cloud runs node with performance optimizations and the file specified in MAIN.If START is set, the platform executes the START command directly, bypassing the default behavior.
Using a custom start command
START=npm run start
If your project does not include a node_modules folder, Virtus Cloud automatically runs npm install --no-package-lock --no-audit --no-fund and clears the .npm cache before starting your application.

Required files

Your ZIP archive must include these three files:
FilePurpose
virtuscloud.app or virtuscloud.configPlatform configuration
index.js / index.ts (or your MAIN file)Application entry point
package.jsonDependency manifest
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.

Files to exclude from your upload

Remove these files and folders before creating your ZIP:
File / FolderReason to exclude
node_modules/Virtus Cloud installs dependencies fresh from package.json, ensuring a clean, reproducible build.
package-lock.jsonNot used by the production installer. Removing it also reduces upload size.
Excluding these files makes your upload smaller and faster, and guarantees that the production environment is free from local system artifacts.
Keep your package.json up to date with all runtime dependencies. Virtus Cloud uses it as the sole source of truth for dependency installation.

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 an actual file in your project. Double-check that the filename and path are correct. If your entry point is inside a subfolder, use the relative path — for example, MAIN=src/index.js.
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. If your application is crashing due to memory pressure, increase the MEMORY value in your config file. See the LACK_OF_RAM troubleshooting guide for more details.
If your application logs show Cannot find module errors, a dependency is missing from your package.json. Add it under dependencies (not devDependencies) and re-upload your project. See the MODULE_NOT_FOUND guide for further help.
If you continue to experience issues after reviewing this guide, contact the Virtus Cloud support team.