Skip to main content
Virtus Cloud supports Elixir applications through the Mix build tool. When you deploy your project, the platform automatically installs the hex package manager and rebar, fetches your dependencies with mix deps.get, and starts your application with mix run --no-halt. Whether you are building a Phoenix web application, a GenServer-based bot, or a background processing service, Virtus Cloud handles the runtime setup so you can focus on your application code. This guide covers the complete deployment process.

Prerequisites

Before you deploy, make sure you have the following:

Elixir version

Virtus Cloud provides the following Elixir versions:
VERSION valueElixir version
recommended1.18.4
latest1.18.4
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 Elixir entry-point file (typically main.ex or your application’s primary .ex file).

Config File Reference

Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
virtuscloud.app
MAIN=main.ex
MEMORY=256
VERSION=recommended
DISPLAY_NAME=My Elixir 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 mix run --no-halt to start your project and keep the VM alive.
  • If START is set, the platform executes the START command directly, bypassing the default Mix command.
Before starting your application, Virtus Cloud automatically:
  1. Installs hex and rebar locally for the project environment.
  2. Runs mix deps.get to fetch all declared dependencies.
Custom start command for Phoenix
START=mix phx.server
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.ex (or your primary .ex file)Application entry point
mix.exsMix project manifest and dependency list
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 _build/ or deps/ directory. Virtus Cloud installs dependencies fresh via mix deps.get on every deployment.

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 lib/ subdirectory, use the relative path — for example, MAIN=lib/my_app.ex.
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. The BEAM virtual machine can be memory-intensive for larger applications. Increase the MEMORY value in your config file if you see out-of-memory errors. See the LACK_OF_RAM troubleshooting guide for details.
If dependency fetching fails during startup, check that all packages listed in your mix.exs file are available on Hex.pm and that version constraints are valid. Run mix deps.get locally to verify your dependency tree resolves correctly before uploading.
If you continue to experience issues after reviewing this guide, contact the Virtus Cloud support team.