Deployed Sandbox Workflow

This guide walks through deploying a sandbox to the Heyo cloud using NGINX as an example. You'll create an archive of your project, deploy it with a start command, open a port, and get a shell session.

Prerequisites

  • heyvm installed (Quickstart)
  • A Heyo cloud account (sign up at heyo.computer)
  • Logged in via the TUI (heyvm → Login)

Overview

Deployed sandboxes run on Heyo's cloud infrastructure in the US or EU region. The deployment flow is:

  1. Create an archive of your project files
  2. Deploy the archive via the TUI, configuring ports, start command, and setup hooks
  3. Manage the running sandbox — open a shell, add endpoints, etc.

1. Prepare your project

For this example, create a simple NGINX site. Start with a directory containing your site files:

mkdir my-nginx-site && cd my-nginx-site

cat > index.html <<'EOF'
<!DOCTYPE html>
<html>
<head><title>Hello from Heyo</title></head>
<body><h1>Hello from a deployed sandbox!</h1></body>
</html>
EOF

2. Create an archive

Archive the directory so it can be deployed to the cloud:

heyvm archive-dir . --name "nginx-site"

You'll see output like:

Archive: 1 files, 0.01 MB uncompressed -> 0.01 MB compressed
Archive created successfully:
  ID: a1b2c3d4
  Size: 1024
  Created: 2026-03-22T10:00:00Z

Note the archive ID — you'll select this archive during deployment.

3. Deploy via the TUI

Launch the TUI:

heyvm

Press c to open the Create form, then configure the following fields:

FieldValueNotes
Namenginx-siteName for your deployed sandbox
RegionUS or EUSelects cloud deployment (not local)
Create from archiveYesToggle on, then select your nginx-site archive
Open ports80Ports to expose (comma-separated for multiple)
Start commandnginx -g 'daemon off;'Keeps NGINX running in the foreground
Working directory/workspaceDirectory where your archive is mounted
Setup hooksapt-get update && apt-get install -y nginx && cp /workspace/index.html /var/www/html/index.htmlRuns after the archive is mounted

What each field does

Start command is the long-running process that keeps the sandbox alive. For NGINX, nginx -g 'daemon off;' runs it in the foreground so the sandbox doesn't exit.

Working directory sets the working directory for the start command. Archives are mounted at /workspace by default.

Open ports tells the cloud to forward traffic to these ports inside the sandbox. After deployment, you can create public endpoints for each open port.

Setup hooks are shell commands that run after the sandbox is created and the archive is mounted. They also re-run if you later update the sandbox's mount with a new archive. Use them for installing packages, copying config files, or any one-time setup. You can add multiple hooks — each one runs in order.

Size class controls the sandbox's resources:

SizeCPURAM
micro0.250.5 GB
mini0.51 GB
small12 GB
medium24 GB
large48 GB

Submit the form and wait for the deployment to complete.

4. Open a shell session

Once your sandbox is deployed, shell into it from any machine:

heyvm sh nginx-site

This opens an interactive terminal in the deployed sandbox through the cloud API. You can inspect the running NGINX process, check logs, or make live changes:

$ heyvm sh nginx-site
root@nginx-site:/workspace# nginx -t
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@nginx-site:/workspace# cat /var/www/html/index.html
<!DOCTYPE html>
...

To run a single command without entering an interactive session:

heyvm exec nginx-site -- nginx -t

5. Create a public endpoint

After deployment, create a public HTTPS endpoint for an open port using the TUI:

  1. In the TUI, select your deployed sandbox
  2. Navigate to the Endpoints section
  3. Add an endpoint for port 80

The cloud assigns a subdomain like abc123.heyo.app that proxies HTTPS traffic to port 80 inside your sandbox.

6. Update a deployed sandbox

To push new files to a running sandbox, create a new archive and update the mount:

# Edit your files locally
echo "<h1>Updated!</h1>" > index.html

# Create a new archive
heyvm archive-dir . --name "nginx-site-v2"

# Update the deployed sandbox with the new archive
heyvm update nginx-site --archive <new-archive-id>

The update replaces the mount contents and re-runs any setup hooks, so your NGINX config gets refreshed automatically.

7. Resize a deployed sandbox

If your sandbox needs more resources:

heyvm resize nginx-site --size-class medium

Putting it all together

The full workflow for deploying an NGINX site:

# Prepare your site
mkdir my-site && cd my-site
echo "<h1>Hello!</h1>" > index.html

# Archive it
heyvm archive-dir . --name "my-site"

# Deploy via TUI (heyvm → Create → set region, archive, ports, etc.)
heyvm

# After deployment, verify it's running
heyvm exec nginx-site -- curl -s localhost

# Shell in for debugging
heyvm sh nginx-site

# Push updates
echo "<h1>v2</h1>" > index.html
heyvm archive-dir . --name "my-site-v2"
heyvm update nginx-site --archive <archive-id>

For the full list of commands, see the CLI reference.