Deploy to a VM
Ship a container to a Linux VM instead of a Kubernetes cluster, with the same pipeline, Docker and Caddy on the host, TLS and multi-service routing handled, and optional scale to zero and live metrics.
Some workloads don’t need Kubernetes. ZopDay can ship a container straight to a Linux VM instead of a cluster. You get the same deployment catalogue, revisions, and live progress, but the target is a Docker host with Caddy in front, and you still hand over no kubeconfigs, SSH keys, or standing credentials.

Infrastructure → Provision → Virtual Machine: ZopDay sets up the VM and its network, and installs Docker and Caddy so the first deploy has a container host and TLS router ready.
Before you start
- A VM space. Provision one from Infrastructure → Provision → Virtual Machine, which installs Docker and Caddy for you (see Provisioning VMs).
- An environment bound to that VM space. See Projects and environments.
- For live metrics: a Mimir, VictoriaMetrics, or Prometheus backend you own.
How it works
When a VM is the right target
- A single service (or a handful) that doesn’t need cluster orchestration
- A cost-sensitive environment where a full cluster is overkill
- A legacy or simple app you want live with TLS in minutes
If the workload needs heavy orchestration, many services, or autoscaling, deploy to a cluster instead.
How it differs from a cluster deploy
A VM substrate is a deployment space with space_type = vm. The pipeline is identical: the same claim → build (GitHub Actions) → deploy flow. Only the final step changes. It runs a command on the VM (docker pull/run and a Caddy route update) instead of a helm release.
| Cluster substrate | VM substrate | |
|---|---|---|
| Runtime | Helm release on Kubernetes | Docker container on a Linux VM |
| Router / TLS | Ingress controller + cert-manager | Caddy (Let’s Encrypt via ACME) on the VM |
| Exec channel | kubeauth (ephemeral kubeconfig) | IAM-gated exec (SSM / IAP / Azure Run Command), no public SSH |
| Multi-tenant routing | Namespaces | Per-service Caddy site blocks on a shared host |
Baseline components
Every VM in a substrate has two idempotent components installed: Docker and Caddy. Caddy’s bootstrap config includes a :80 health responder, so the cloud load balancer reports healthy as soon as install finishes. There is no unhealthy window before the first deploy.
These make up the VM component catalogue, separate from the Helm component catalogue for clusters. On a VM that ZopDay provisions, Docker and Caddy install automatically during provisioning.
Multiple services on one VM
Several deployments can share one VM. Each deploy adds its own Caddy site block without touching co-resident services, whose routes and containers survive your deploy. Teardown works the same way: removing one service leaves the others running. If a deploy would collide on host or port, ZopDay fails it instead of silently overwriting.
No public SSH
ZopDay never opens a public SSH session to your VM. The deploy runs over the cloud’s IAM-gated exec channel: aws ssm send-command, gcloud compute ssh --tunnel-through-iap, or az vm run-command (Azure), dispatched from the GitHub Actions runner, not from a ZopDay pod. Port 22 is not publicly reachable. Interactive access goes only through that IAM-gated channel.
Private registries
For images in a private registry (GAR / ECR / ACR), ZopDay mints a short-lived registry token server-side and injects a docker login before the pull, so the VM never holds long-lived cloud credentials.
Reliability
If the build’s success callback can’t reach ZopDay, a watchdog scans the build log for the canonical “successfully pushed” marker and recovers the deploy. This covers two cases: the build succeeded but the callback failed, and the build reported failure after the push completed.
TLS and hostnames
- TLS terminates at Caddy with Let’s Encrypt certificates (HTTP-01 on :80, TLS-ALPN-01 on :443). You don’t manage certificates yourself.
- Custom domain on one service: when you attach a domain to the space, you can bind its exact hostname to one service. ZopDay adds that host to the service’s routing on attach and removes it on detach, so the DNS record and the route always match. You can’t bind a wildcard pattern to a single service, because the route needs a concrete host.
- Automatic hostname: if a deployment has no explicit expose config but its space carries wildcard domain patterns, ZopDay synthesises a stable hostname of the form
<name>-<short-id>.<space-suffix>. The short-id suffix stops two deployments with the same name from colliding. The Quick Deploy “Live at” preview shows the exact host Caddy will serve.
Scale to zero
By default, every service on a VM runs around the clock. On a shared VM, idle services then hold memory the busy ones could use. Scale to zero is an optional third component from the same component catalogue. It stops a service’s container after a period with no traffic and starts it again on the next request. While the container comes up, the visitor sees a wake page.
- Enabled per space, not per service. One install covers the services already on the VM and every service deployed to it afterwards. There are no per-service switches.
- The idle window is a space setting, 30 minutes by default.
- Private services are excluded automatically. A service with no public route has nothing to wake it, so it is left running.
Live metrics from your own metrics backend
Live metrics for services on a VM come from a metrics backend you own. ZopDay stores none of them.
Register your backend
Go to Settings → Integrations → Observability and add your Mimir, VictoriaMetrics, or Prometheus backend (write URL, read URL, tenant, and credential). ZopDay saves it only after a connection test writes a probe sample.
Attach it to a VM space
In the VM space’s settings, pick it as the Metrics backend. This installs a small metrics agent on the space’s VM, capped at 0.25 CPU and 512 MB. Every 30 seconds, the agent ships container metrics for every service, plus host metrics, to your backend.
Read them in the service drawer
The service’s Observability tab reads its numbers from your backend in well under a second and shows a green Live pill.
If no backend is attached, or yours is unreachable or stale, the tab reads the numbers on the VM itself instead (20 to 60 seconds). It then shows Checked on the VM with the time of the last read. Changing the backend rewrites the agent; detaching it removes the agent. You can’t disconnect a backend that a space still points at.
Troubleshooting
A database on the VM stopped answering after I enabled scale to zero
A datastore deployed with Network on has a public route, so scale to zero put it to sleep, and database clients don’t send the HTTP request that wakes it. Turn Network off on the database so it counts as a private service and stays running.
A deploy failed with a host or port collision
Another service on the same VM already uses that host or port. ZopDay fails the deploy rather than overwrite the other service; change the hostname or port and redeploy.
The Observability tab shows "Checked on the VM"
No metrics backend is attached, or yours is unreachable or stale, so ZopDay read the numbers on the VM (20 to 60 seconds). Attach or fix the backend under Settings → Integrations → Observability to get the Live view.
I can't disconnect a metrics backend
A VM space still points at it. Detach it from the space first; that also removes the agent.