Persistent Configuration
4 min
by default, configuration saved through the web ui (api keys, litmus edge instances, model preferences, nats / influxdb / lem settings) is written to /app/ env inside the container it is lost when the container is removed to retain configuration across container restarts and replacements, mount a host file over /app/ env one time setup mkdir p /opt/litmus mcp touch /opt/litmus mcp/ env the host side file must be created with touch before running the container if it does not exist, docker creates a directory at that path and the application fails to write configuration run with the volume mount docker run d name litmus mcp server \\ p 8000 8000 p 9000 9000 \\ v /opt/litmus mcp/ env /app/ env \\ ghcr io/litmusautomation/litmus mcp server\ latest any configuration you save in the ui is written to /opt/litmus mcp/ env on the host a new container started with the same v flag picks it up automatically on startup docker compose equivalent services litmus mcp server image ghcr io/litmusautomation/litmus mcp server\ latest ports \ "8000 8000" \ "9000 9000" volumes \ /opt/litmus mcp/ env /app/ env what gets persisted the mounted env ends up holding anthropic api key , openai api key , gemini api key (whichever you set) preferred model , preferred model id active edge instance , plus edge instance {i} entries for each registered litmus edge canonical edge url , edge api client id , edge api client secret (mirror of the active instance) nats source , nats port , nats user , nats password , nats tls influx host , influx port , influx db name , influx username , influx password lem headers if configured you can also seed the file before first start by writing values directly the web ui will read what is already there