Instance configuration files live inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ohemilyy/universe/llms.txt
Use this file to discover all available pages before exploring further.
./configuration/<name>.json and describe a class of instances that Universe can deploy. Each file corresponds to one named configuration — for example, ./configuration/lobby.json defines how lobby instances are started, which templates they use, and which nodes they can run on. The master node loads all .json files from this directory at startup and reloads them when you run config reload.
If the
./configuration/ directory contains no valid JSON files when Universe starts, a default lobby.json is created automatically so the node has at least one configuration to work with.Example
The completedefault.json from the README:
./configuration/default.json
Field reference
The identifier for this configuration. Must match the filename without the
.json extension. Used in CLI commands (instance create <name>), REST API calls, and the %CONFIGURATION_NAME% template variable.The process runtime used to start and manage instances. Built-in options are
screen, tmux, and process. The docker runtime is available via the runtime-docker extension. See runtime options below.The shell command executed to start each instance. Runs inside the instance’s working directory (
./running/<instance-id>/). Note that template variable replacement (%PORT%, %INSTANCE_ID%, etc.) is applied to files listed in fileModifications, not to the command string itself.When
true, the instance’s working directory (./running/<instance-id>/) is not deleted after the instance stops. Use this for stateful instances that need to persist data between restarts. When false, the directory is cleaned up on shutdown.The amount of RAM in megabytes to reserve for each instance of this configuration. Universe checks the node’s
maxRamMB capacity before deploying; if the node does not have enough headroom, the instance will not start on that node.CPU units to reserve per instance. One unit represents 1% of a single core, so
100 equals one full core and 400 equals four cores. Universe checks the node’s maxCpu before deploying.Logical group labels for instances of this configuration. Groups are used for routing and discovery by external plugins or services. An instance can belong to multiple groups.
The list of node IDs that are eligible to run instances of this configuration. When a new instance is requested, Universe picks an eligible node that has sufficient capacity. Leave empty to allow any node.
The address instances of this configuration advertise to connecting clients. Used in the
%HOST_ADDRESS% template variable and stored in InstanceInfo. Set this to the node’s public or LAN IP when instances need to be reachable from outside the cluster.The port range from which Universe allocates a port for each new instance. Universe picks the lowest available port in the range.
min— Lowest port in the range (inclusive).max— Highest port in the range (inclusive).
The minimum number of instances that should be running for this configuration at all times. Universe automatically starts additional instances when the running count falls below this value. Set to
0 to disable auto-spawning.A key/value map of environment variables injected into the instance process at startup. Useful for passing secrets, JVM flags, or runtime settings without embedding them in the command string.
Controls which templates are installed into the instance’s working directory before startup. See template installation config below.
A list of file paths (relative to the instance working directory) where template variable replacement is applied after templates are installed. Any file listed here will have placeholders like
%PORT% and %INSTANCE_ID% replaced with their runtime values.An arbitrary string key/value map for custom metadata. Universe does not interpret this field internally; it is available to extensions and external plugins via the
Configuration object for custom routing, labeling, or feature flags.Template installation config
ThetemplateInstallationConfig object determines which templates are copied into the instance directory before launch.
An explicit list of templates to install. Every template in this list is always installed. Each entry requires:
name— Template name (the subdirectory name under its group).group— Template group (the top-level directory under./templates/).storage— Storage backend:"local"or a registered extension storage key (e.g.,"s3").priority— Integer priority controlling install order relative to other templates.
A list of template group names. Every template found in each group directory is installed. Templates discovered via registered storage providers are also included.
A list of templates from which exactly one is selected at random and installed. Use this when instances should receive one of several interchangeable template variants.
A list of group names. For each group, exactly one template from that group is selected at random and installed.
Controls how templates are applied when multiple templates write to the same path:
false— Higher-priority templates are pasted first and are not overwritten by lower-priority ones.true— Lower-priority templates are pasted first; higher-priority templates are pasted last and overwrite existing files.
Runtime options
Theruntime field selects how Universe starts and manages each instance process.
| Runtime | Description |
|---|---|
screen | Starts the instance inside a GNU Screen session. Supports stdin piping for in-process command execution. Requires screen on the host. |
tmux | Starts the instance inside a tmux session. Equivalent capability to screen; prefer whichever multiplexer your environment has installed. |
process | Starts the instance as a direct child process without a terminal multiplexer. Simpler but provides no persistent session if Universe restarts. |
docker | Starts the instance as a Docker container. Requires the runtime-docker extension JAR in ./extensions/. |
Auto-spawn behavior
WhenminimumServiceCount is greater than 0, Universe monitors the number of running instances for this configuration and automatically starts new instances when the count drops below the minimum. This ensures a pool of instances is always available without manual intervention.