A runtime is the execution backend responsible for launching instance processes, managing their lifecycle, and routing stdin commands. When Universe creates an instance it delegates to the configured runtime to start the process, track its PID or container ID, pipe commands to stdin, and clean up when the instance is stopped. Universe ships with two built-in process runtimes (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/universeclouddev/Universe/llms.txt
Use this file to discover all available pages before exploring further.
screen and tmux) and supports two extension-based runtimes (docker and kube). The active runtime is selected per configuration — different instance configurations on the same node can use different runtimes simultaneously.
Available Runtimes
| Key | Type | Primary Use Case | Requires Extension |
|---|---|---|---|
screen | Process (GNU Screen session) | Local development, bare-metal nodes | No |
tmux | Process (tmux session) | Local development, bare-metal nodes | No |
docker | Container (Docker-out-of-Docker) | Containerized deployment, resource isolation | Yes — runtime-docker |
kube | Pod (Kubernetes) | Cloud-native, multi-node, auto-scaling | Yes — runtime-k8s |
Selecting a Runtime
Set theruntime field in any instance configuration file under ./configuration/. The value must match the runtime’s key exactly.
Runtime Cards
Screen & Tmux
Built-in process runtimes. Spawn detached sessions on the local node. No extensions required.
Docker
Containerized runtime via Docker-out-of-Docker. Requires the
runtime-docker extension JAR.Kubernetes
Pod-based runtime for local clusters and cloud providers. Requires the
runtime-k8s extension JAR.Building Extensions
Implement your own
RuntimeProvider and package it as an extension JAR.Port Allocation
Regardless of which runtime is active, every instance is assigned a unique port before it starts. Universe’sPortAllocator checks three sources in order to guarantee conflict-free allocation:
-
Local in-memory allocations — a
ConcurrentHashMap.newKeySet()-backed set of ports already assigned by this JVM instance during its current lifetime. Prevents the same wrapper from double-allocating within a burst of concurrent starts. -
Cluster-wide active instances — queries the Hazelcast
IMapfor all instances inONLINEorCREATINGstate across every node, then skips any port already reported by another instance. This prevents collisions when two wrappers share overlappingavailablePortsranges. -
OS-level availability — attempts a
ServerSocketbind on the candidate port and follows up with a short-timeout TCP connect probe tolocalhost:<port>. If either check indicates something is already listening, the port is skipped. This catches services that were started outside Universe and are not tracked in Hazelcast.
PortAllocator.release() removes the port from the in-memory set so it can be reused.