Skip to main content
Virtus Cloud supports Python applications natively, automatically installing your dependencies from requirements.txt or pyproject.toml before starting your app. Whether you are running a Telegram bot, a Flask or Django API, or a data-processing service, the platform gives you a clean, isolated Python environment every time you deploy. This guide covers everything you need to get your Python project running on Virtus Cloud.

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 with your application’s settings.

Config File Reference

Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
A minimal Python config file looks like this:
virtuscloud.app
MAIN=main.py
MEMORY=256
VERSION=recommended
DISPLAY_NAME=My Python 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 python MAIN, where MAIN is the file defined in your config file.
  • If START is set, the platform executes the START command directly, bypassing the default behavior.
Custom start command example
START=python -m uvicorn app.main:app --host 0.0.0.0 --port 80
Virtus Cloud installs dependencies by running pip install against your requirements.txt or pyproject.toml before executing the startup command.

Required files

Your ZIP archive must include the following files:
FilePurpose
virtuscloud.app or virtuscloud.configPlatform configuration
main.py (or your MAIN file)Application entry point
requirements.txt or pyproject.tomlDependency 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.
If you use pyproject.toml, make sure it includes a [project.dependencies] or [tool.poetry.dependencies] section that pip can resolve.

Files to exclude from your upload

Remove these files and folders before creating your ZIP:
File / FolderReason to exclude
.venv/Virtus Cloud provides an isolated environment and installs dependencies itself. Including your local virtual environment causes conflicts and inflates upload size.
ffmpeg or ffmpeg/ffmpeg is pre-installed in the Virtus Cloud runtime environment. You do not need to bundle it with your project.
poetry.lockVirtus Cloud does not currently support Poetry’s lock file. Use requirements.txt or pyproject.toml for dependency management instead.
Excluding these files keeps your upload lean and prevents conflicts with the production environment’s configuration.
Generate a clean requirements.txt from your virtual environment with:
pip freeze > requirements.txt
Review the output and remove any packages that are only needed locally (e.g., Jupyter, development linters).

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. Check that the filename and directory path are correct. If your entry point is inside a subfolder, use the relative path — for example, MAIN=src/main.py.
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. If your application crashes due to memory pressure, increase the MEMORY value in your config file. See the LACK_OF_RAM troubleshooting guide for more details.
If pip install fails during startup, check that all package names and versions in your requirements.txt are correct. Avoid using poetry.lock — convert your dependencies to requirements.txt format instead. For version pinning best practices, review your requirements.txt file.
If you continue to experience issues after reviewing this guide, contact the Virtus Cloud support team.