# PostgreSQL connection string DATABASE_URL=postgres://mmapp:mmapp@127.0.0.1:5432/mmapp # Optional operator-approved request and CA for runtime PostgreSQL TLS and SQL identity checks. # DATABASE_RUNTIME_REQUEST_FILE=/run/config/mmapp/approved-request.json # DATABASE_RUNTIME_REQUEST_SHA256= # DATABASE_RUNTIME_CA_FILE=/run/config/mmapp/postgresql-ca.pem # Optional live operator activation directory (mount the directory read-only). # DATABASE_RUNTIME_ACTIVATION_DIRECTORY=/var/lib/mmapp/source-activation # DATABASE_RUNTIME_ACTIVATION_SHA256= # Optional operator-approved logical schema SHA-256 from db:inspect-schema. # DATABASE_RUNTIME_SCHEMA_SHA256= # Restore-aware signed writer profile. Requires source activation, schema pin and restore checkpoint. # DATABASE_RUNTIME_WRITER_APPROVAL_FILE=/run/config/mmapp/writer-approval.json # DATABASE_RUNTIME_WRITER_APPROVAL_SHA256= # Protected exports use the approved capture role and require this private password file. # The PostgreSQL TLS peer must present the approved self-signed non-CA leaf. # DATABASE_ARCHIVE_PASSWORD_FILE=/run/secrets/mmapp_database_archive_password # Optional owner connection URI file for restore and its schema migrations. # DATABASE_RESTORE_URL_FILE=/run/secrets/mmapp_database_restore_url # Opt in on every backend/CLI after provisioning the restore quarantine in mmapp_control. # DATABASE_RESTORE_QUARANTINE=true # Optional operator-approved pair for verifying one archive's restored data. # Requires DATABASE_RESTORE_QUARANTINE and DATABASE_RESTORE_URL_FILE. # DATABASE_RESTORE_ARCHIVE_SHA256= # DATABASE_RESTORE_DATA_SHA256= # Optional checkpoint in an operator-managed directory outside the PostgreSQL and MCP state backups. # Mount the whole directory read-only. Restore requires a staged pending checkpoint. # DATABASE_RESTORE_CHECKPOINT_FILE=/run/config/mmapp-restore/database-restore-checkpoint.json # Local socket served by the operator-side db:serve-restore-claims process. # DATABASE_RESTORE_CHECKPOINT_CLAIM_SOCKET=/run/mmapp-restore/claims.sock # SQLite file used only for one-shot boot ETL (empty PG + existing mikrotik.db) DATABASE_PATH=./mikrotik.db # SQLITE_IMPORT_FULL_HISTORY=true # Port for the Fastify server PORT=8000 # Allowed CORS origin (Next.js frontend) CORS_ORIGIN=http://localhost:3000 # Portal SSO (false = open API for local/dev) AUTH_REQUIRED=false # Same HS256 secret as auth-portal JWT_SECRET when AUTH_REQUIRED=true AUTH_JWT_SECRET=dev-secret-change-me AUTH_ISSUER=https://auth.shnt.top AUTH_PORTAL_URL=http://localhost:5175 # Optional portal -> MCP revocation webhook. Separate random secret, at least 32 characters. # Portal must send signed events to /_internal/mcp/portal/revocations; see docs/mcp.md. # MCP_PORTAL_WEBHOOK_SECRET= # MCP_PUBLIC_URL=https://manager.example/mcp # MCP_STATE_DIR=/var/lib/mikrotik-manager/mcp-state # Optional separate, externally provisioned bandwidth control source. No automatic # schema/key/identity creation. See docs/mcp-bandwidth-control-source.md. # Use the restricted control runtime role, never the owner/application role. # MMAPP_BANDWIDTH_CONTROL_URL=postgresql://bandwidth_runtime:change-me@control-db:5432/bandwidth_control # MMAPP_BANDWIDTH_CONTROL_ATTESTATION_FILE=/etc/mmapp/control/source.json # MMAPP_BANDWIDTH_CONTROL_TRUST_KEY_FILE=/etc/mmapp/control/issuer-public.pem # SHA256 of the Ed25519 public SPKI DER, pinned outside the attestation itself. # MMAPP_BANDWIDTH_CONTROL_TRUST_KEY_SHA256= # MMAPP_BANDWIDTH_CONTROL_EVENT_KEY_FILE=/etc/mmapp/control/event.key # Separate persistent registry issuer key (raw 32 bytes, different from event.key) # and operator bootstrap signed by the pinned control-source Ed25519 issuer. # These inputs grant no actor/network permissions and create no registry rows. # MMAPP_BANDWIDTH_NODE_ISSUER_KEY_FILE=/etc/mmapp/control/node-issuer.key # MMAPP_BANDWIDTH_NODE_ISSUER_KEY_SHA256= # MMAPP_BANDWIDTH_NODE_BOOTSTRAP_FILE=/etc/mmapp/control/node-bootstrap.json # Optional: enabled by the NetFlow agent Compose installer. Linux Unix socket only. # FLOW_AGENT_SOCKET=/run/mm-netflow-host/agent.sock # Optional UDP NetFlow v9/IPFIX template lifetime in milliseconds (restart required). # Collector policy defaults to 90 minutes, not a RouterOS default. Set at least # 3 times the longest configured exporter template refresh interval; data does # not refresh templates. Missing/expired templates refuse decoding, not zero traffic. # FLOW_TEMPLATE_LIFETIME_MS=5400000 # Optional NetFlow read admission: standard (default) or constrained. # Constrained admits two responses (UI + AI), limits SQL sources to 2 MiB, # cumulative sources to 4 MiB and encoded responses to 2 MiB; large reads refuse. # This is not a complete installation memory limit. See docs/mcp-2gb-resource-acceptance.md. # MM_FLOW_READ_RESOURCE_PROFILE=standard