Skip to content

MMPM Environment Variables

Brandon Marlowe edited this page Aug 16, 2026 · 20 revisions

Viewing and Editing Settings

  • View Current Settings: Run mmpm env (add --describe to include a description of each variable)
  • Edit Settings: Use mmpm open env, or the Config Editor in the UI.

Configuration File

  • The settings are stored in ~/.config/mmpm/mmpm-env.json. Changes are picked up immediately — no restart required. Any missing keys are filled in with their defaults the next time MMPM runs.

Environment Variables

  1. MMPM_MAGICMIRROR_ROOT:

    • Purpose: Root directory of the MagicMirror installation. MMPM uses this to locate modules, the config file, and other MagicMirror paths.
    • Default: ~/MagicMirror
    • Example: /home/pi/MagicMirror
  2. MMPM_MAGICMIRROR_URI:

    • Purpose: URI of the MagicMirror web server.
    • Default: http://localhost:8080
    • Note: If you access the MMPM UI from other devices on your network, use the host's LAN address (e.g. http://192.168.0.15:8080) instead of localhost.
  3. MMPM_MAGICMIRROR_PM2_PROCESS_NAME:

    • Purpose: Name of the MagicMirror process in pm2. Allows MMPM to start/stop/restart MagicMirror.
    • Default: Leave blank if not using pm2.
  4. MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE:

    • Purpose: Path to the docker-compose.yml for a Docker-managed MagicMirror.
    • Default: Leave blank if not using Docker with docker-compose.
  5. MMPM_IS_DOCKER_IMAGE:

    • Purpose: Indicates if MMPM itself is running inside a Docker container. Adjusts internal path handling.
    • Options: true for Docker, false otherwise.
    • Note: If true, leave MMPM_MAGICMIRROR_PM2_PROCESS_NAME and MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE blank.
  6. MMPM_LOG_LEVEL:

    • Purpose: Logging verbosity for MMPM.
    • Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
    • Default: INFO
  7. MMPM_UI_API_BASE_URL:

    • Purpose: Override the base URL the web UI uses to reach the MMPM REST API. Set this when the UI is served behind a reverse proxy at a custom path.
    • Default: Leave blank unless using a reverse proxy.
  8. MMPM_UI_SOCKET_URL:

    • Purpose: Override the WebSocket URL the web UI uses to connect to the MMPM API. Required when a reverse proxy handles WebSocket connections on a non-default path.
    • Default: Leave blank unless using a reverse proxy.

Example Configurations

  • Example Configuration Using docker-compose for Managing MagicMirror
{
  "MMPM_MAGICMIRROR_ROOT": "/home/pi/MagicMirror",
  "MMPM_MAGICMIRROR_URI": "http://192.168.0.15:8080",
  "MMPM_MAGICMIRROR_PM2_PROCESS_NAME": "",
  "MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE": "/home/pi/docker/magicmirror/docker-compose.yml",
  "MMPM_IS_DOCKER_IMAGE": false,
  "MMPM_LOG_LEVEL": "INFO",
  "MMPM_UI_API_BASE_URL": "",
  "MMPM_UI_SOCKET_URL": ""
}
  • Example Configuration Using PM2 for Managing MagicMirror
{
  "MMPM_MAGICMIRROR_ROOT": "/home/pi/MagicMirror",
  "MMPM_MAGICMIRROR_URI": "http://192.168.0.15:8080",
  "MMPM_MAGICMIRROR_PM2_PROCESS_NAME": "MagicMirror",
  "MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE": "",
  "MMPM_IS_DOCKER_IMAGE": false,
  "MMPM_LOG_LEVEL": "INFO",
  "MMPM_UI_API_BASE_URL": "",
  "MMPM_UI_SOCKET_URL": ""
}
  • Example Configuration Using NPM for Managing MagicMirror
{
  "MMPM_MAGICMIRROR_ROOT": "/home/pi/MagicMirror",
  "MMPM_MAGICMIRROR_URI": "http://192.168.0.15:8080",
  "MMPM_MAGICMIRROR_PM2_PROCESS_NAME": "",
  "MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE": "",
  "MMPM_IS_DOCKER_IMAGE": false,
  "MMPM_LOG_LEVEL": "INFO",
  "MMPM_UI_API_BASE_URL": "",
  "MMPM_UI_SOCKET_URL": ""
}
  • Example Configuration Using the MMPM Docker Image
{
  "MMPM_MAGICMIRROR_ROOT": "/home/pi/MagicMirror",
  "MMPM_MAGICMIRROR_URI": "http://192.168.0.15:8080",
  "MMPM_MAGICMIRROR_PM2_PROCESS_NAME": "",
  "MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE": "",
  "MMPM_IS_DOCKER_IMAGE": true,
  "MMPM_LOG_LEVEL": "INFO",
  "MMPM_UI_API_BASE_URL": "",
  "MMPM_UI_SOCKET_URL": ""
}

Clone this wiki locally