- Edit the
.envfile setting the docker image name, the base64-encoded license and optionally username and password
NIM_IMAGE=<NGINX_INSTANCE_MANAGER_DOCKER_IMAGE_NAME>
NIM_LICENSE=<BASE64_ENCODED_LICENSE_FILE>
NIM_USERNAME=admin
NIM_PASSWORD=nimadmin
- Start NGINX Instance Manager
docker compose -f docker-compose.yaml up -d- Stop NGINX Instance Manager
docker compose -f docker-compose.yaml downstartNIM.sh uses helper functions (set_nms_conf / set_nms_sm) to apply values
from environment variables directly into /etc/nms/nms.conf and /etc/nms/nms-sm-conf.yaml
at container startup using yq -i.
To add a new config key at runtime:
Open docker-compose/.env and add your variable with a default value:
# Example: set the license mode of operation
NIM_LICENSE_MODE_OF_OPERATION=connectedSupported values depend on the NIM config key you are targeting.
Refer to the NIM configuration reference for valid values.
Under the nim service environment: block, add:
- NIM_LICENSE_MODE_OF_OPERATION=${NIM_LICENSE_MODE_OF_OPERATION}In the # NGINX Instance Manager configuration update section, add one line:
set_nms_conf '.integrations.license.mode_of_operation' NIM_LICENSE_MODE_OF_OPERATIONThe first argument is the yq dot-notation path into nms.conf.
The second argument is the name (not value) of the environment variable.
For nms-sm-conf.yaml keys, use set_nms_sm instead:
set_nms_sm '.some.key' MY_ENV_VAR| File | What to add |
|---|---|
.env |
MY_NEW_VAR=myvalue |
docker-compose.yaml |
- MY_NEW_VAR=${MY_NEW_VAR} under nim → environment |
startNIM.sh |
set_nms_conf '.path.to.key' MY_NEW_VAR |
No image rebuild is needed — changes take effect on the next docker compose up.