Variable Description
NOMAD_ALLOC_DIR The path to the shared alloc/ directory. See [here](/docs/runtime/environment.html#task-directories) for more information.
NOMAD_TASK_DIR The path to the task local/ directory. See [here](/docs/runtime/environment.html#task-directories) for more information.
NOMAD_SECRETS_DIR Path to the task's secrets directory. See [here](/docs/runtime/environment.html#task-directories) for more information.
NOMAD_MEMORY_LIMIT Memory limit in MB for the task
NOMAD_CPU_LIMIT CPU limit in MHz for the task
NOMAD_ALLOC_ID Allocation ID of the task
NOMAD_ALLOC_NAME Allocation name of the task
NOMAD_ALLOC_INDEX Allocation index; useful to distinguish instances of task groups. From 0 to (count - 1).
NOMAD_TASK_NAME Task's name
NOMAD_JOB_NAME Job's name
NOMAD_DC Datacenter in which the allocation is running
NOMAD_REGION Region in which the allocation is running
NOMAD_META_<key> The metadata value given by key on the task's metadata
VAULT_TOKEN The task's Vault token. See [Vault Integration](/docs/vault-integration/index.html) for more details
Network-related Variables
NOMAD_IP_<label> IP for the given port label. Driver-specified IP when available, otherwise the host's IP. See [here](/docs/job-specification/network.html) for more information.
NOMAD_PORT_<label> Port for the given port label. Driver-specified port when a port map is used, otherwise the host's static or dynamic port allocation. See [here](/docs/job-specification/network.html) for more information.
NOMAD_ADDR_<label> *Deprecated:* The ip:port pair for the given port label. For backward compatibility it always uses the host's IP but will use the drvier's port if a port map is used. Use the corresponding `HOST` or `DRIVER` variables instead as they have explicit predictable values.
NOMAD_HOST_IP_<label> IP of the host for the port label. See [here](/docs/job-specification/network.html#mapped_ports) for more information.
NOMAD_HOST_PORT_<label> Port on the host for the port label. See [here](/docs/job-specification/network.html#mapped_ports) for more information.
NOMAD_HOST_ADDR_<label> The host's ip:port pair for the given port label. See [here](/docs/job-specification/network.html#mapped_ports) for more information.
NOMAD_DRIVER_IP_<label> IP from the driver for the port label if the driver configured an IP. Not available until after the task is started. See [here](/docs/job-specification/network.html#mapped_ports) for more information.
NOMAD_DRIVER_PORT_<label> Port in the driver for the port label if a port map is configured. See [here](/docs/job-specification/network.html#mapped_ports) for more information.
NOMAD_DRIVER_ADDR_<label> The driver's ip:port pair for the given port label if the driver configured an IP and port. See [here](/docs/job-specification/network.html#mapped_ports) for more information.