Skip to main content

Miner Agent Configuration

This document describes how to configure miner-agent. The agent is configured via environment variables.

Required Variables

VariableRequiredDescription
MAIN_API_BASE_URLYesBase URL of main-api. The agent appends miner API paths.
MINER_PUBLIC_IPYesPublic IP reported during registration for inference endpoints
MINER_TARGET_MODELRecommendedExpected served Hugging Face model id
danger

The implementation defaults MINER_PUBLIC_IP to 127.0.0.1. Production deployments should set the real public IP explicitly.

Supported Variables

VariableDefaultPurpose
LOG_LEVELinfoLogging level
MAIN_API_BASE_URLemptyBase URL for main-api
MINER_TOKENemptyShared token for miner API authentication
MINER_TOKEN_HEADERX-Miner-TokenHeader name used for MINER_TOKEN
MINER_NAMEhostnameMiner display name sent during registration
MINER_PUBLIC_IP127.0.0.1Public IP reported during registration
MINER_REGIONemptyOptional region reported during registration
MINER_RUNTIME_TYPEvllmRuntime type reported during registration
MINER_VERSIONpackage versionAgent version sent to the control plane
MINER_HOME/root/.minerPersistent identity directory inside the container
MINER_HTTP_HOST127.0.0.1Bind host for local diagnostics API
MINER_HTTP_PORT8080Bind port for local diagnostics API
MINER_HEARTBEAT_INTERVAL_SECONDS30Background heartbeat interval
MINER_REQUEST_TIMEOUT_SECONDS10HTTP timeout for probes and control-plane calls
MINER_TARGET_MODELemptyExpected model id served by the runtime
MINER_VLLM_BASE_URLhttp://127.0.0.1:8000Local model runtime base URL
MINER_DCGM_METRICS_URLhttp://dcgm-exporter:9400/metricsDCGM metrics endpoint
MODELDOCK_INFERENCE_BASE_URLemptyFallback for MINER_VLLM_BASE_URL
MODELDOCK_DCGM_EXPORTER_URLemptyFallback for MINER_DCGM_METRICS_URL
MODELDOCK_DEPLOYMENT_NAMElocalDeployment name reported upstream
note

Explicit MINER_* probe URLs take precedence over MODELDOCK_* fallback URLs.

Docker Sidecar Example

Use this through the miner_client block in a miner-cli config:

miner_client:
enabled: true
image: bttinfergrid/miner-client:latest
listen_host: 127.0.0.1
listen_port: 8080
public_ip: miner.example.com
volumes:
- /data/minerhome:/root/.miner
environment:
LOG_LEVEL: info
MAIN_API_BASE_URL: https://main-api.example.com
MINER_TOKEN: replace-me
MINER_TARGET_MODEL: Qwen/Qwen2.5-72B-Instruct
MINER_HOME: /root/.miner

The host side of volumes should be a stable operator-managed directory such as /data/minerhome, not /root. The container side can remain /root/.miner because that is the default MINER_HOME inside the image.

tip

When related sidecars are enabled, miner-cli automatically injects runtime-local defaults such as MINER_VLLM_BASE_URL and MINER_DCGM_METRICS_URL.

Authentication Header

When MINER_TOKEN is set, the agent sends it on every control-plane request:

X-Miner-Token: <MINER_TOKEN>

Change the header name with MINER_TOKEN_HEADER if your control plane expects a different token header.