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:
- Create an archive of your project files
- Deploy the archive via the TUI, configuring ports, start command, and setup hooks
- 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>
EOF2. 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:
| Field | Value | Notes |
|---|---|---|
| Name | nginx-site | Name for your deployed sandbox |
| Region | US or EU | Selects cloud deployment (not local) |
| Create from archive | Yes | Toggle on, then select your nginx-site archive |
| Open ports | 80 | Ports to expose (comma-separated for multiple) |
| Start command | nginx -g 'daemon off;' | Keeps NGINX running in the foreground |
| Working directory | /workspace | Directory where your archive is mounted |
| Setup hooks | apt-get update && apt-get install -y nginx && cp /workspace/index.html /var/www/html/index.html | Runs 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:
| Size | CPU | RAM |
|---|---|---|
| micro | 0.25 | 0.5 GB |
| mini | 0.5 | 1 GB |
| small | 1 | 2 GB |
| medium | 2 | 4 GB |
| large | 4 | 8 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 -t5. Create a public endpoint
After deployment, create a public HTTPS endpoint for an open port using the TUI:
- In the TUI, select your deployed sandbox
- Navigate to the Endpoints section
- 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 mediumPutting 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.