Unisrv logoUnisrv.io
CLI ManualInstances

Managing Instances

Running, stopping, and inspecting instances.

Instances are containers running in Firecracker microVMs. See Instances for the conceptual overview.

Running an instance

unisrv instance run <image>

The CLI pulls the image, boots a microVM, and attaches to the instance logs. Press Ctrl+C to detach — the instance keeps running.

# With resource limits and a name
unisrv instance run -n my-app --vcpus 2 --memory 2G ghcr.io/org/app:latest

# With environment variables
unisrv instance run -e DB_HOST=10.0.0.5 -e SECRET=abc123 my-image

# Joined to a network
unisrv instance run --network my-network my-image

In most cases you'll use unisrv rollout instead of running instances directly — it handles the full lifecycle of provisioning instances and wiring them to a service.

Stopping an instance

unisrv instance stop <instance>

Stopping is permanent — instances are ephemeral. The default graceful shutdown timeout is 5 seconds, adjustable with -t:

unisrv instance stop <instance> -t 10000  # 10 second timeout

Logs

# Fetch current logs
unisrv instance logs <instance>

# Stream logs in real-time
unisrv instance logs <instance> -f

Exposing TCP ports

For raw TCP access (SSH, databases, etc.) you can expose a port through the edge proxy:

unisrv instance expose <instance> <port>

This assigns a public port that tunnels directly to the instance. For HTTP traffic, use a service instead.

Listing and inspecting

# List all instances
unisrv instance list

# Show details for an instance
unisrv instance show <instance>

IDs support prefix matching and names — type just enough to be unique.

On this page