Creating an IoT Flow Runtime

Create an IoT Flow Runtime in an IoT domain.

Create a managed Node-RED flow runtime and optionally define its scale, service log, network configuration, and File Storage mounts.

Logging for a flow runtime is optional. Before configuring logging, your administrator must create the applicable Flow Runtime Logging policies. An existing log requires read log-groups and use log-content. If you provide only a log group so that OCI IoT creates the log automatically, then grant manage log-groups and use log-content.

Before configuring a File Storage mount, complete the export and network prerequisites in Configuring File Storage Access for an IoT Flow Runtime.

    1. On the IoT domains list page, select the domain where you want to create the flow runtime, and then select Flow runtimes. If you need help finding the IoT domains list page, see Listing IoT Domains.
    2. Select Create flow runtime.
    3. Enter a name, optionally enter a description, and select a compartment. Avoid entering confidential information.
    4. Select a scale. You can change the scale later.
    5. Optionally, turn on Configure logging using either option:
      • Use an existing log: Select or enter the log group and the existing log.
      • Create a log automatically: Select or enter only the log group. Each active Flow Runtime writes to a new log.
    6. Turn on Configure Network Access to select a subnet and up to five network security groups.
    7. Optionally, turn on Configure file storage mounts. Select the File system export compartment and File system export. For Mount path, enter a relative path without a leading or trailing slash or path traversal segments. Select Add file storage mount to configure another export, up to a limit of five.

      The Console displays /mnt/ as a fixed, non-editable prefix. For example, enter my-share to make the export available at /mnt/my-share.

    8. Select Create.
  • Use the oci iot flow-runtime create command. The IoT domain and compartment OCIDs are required.

    To use an existing log, save the following content as log-config.json:

    {
      "logGroupId": "<log-group-OCID>",
      "logId": "<log-OCID>"
    }

    To create a log automatically, omit logId:

    {
      "logGroupId": "<log-group-OCID>"
    }

    When you use --log-config, the log group OCID is required and the log OCID is optional.

    oci iot flow-runtime create \
      --iot-domain-id <iot-domain-OCID> \
      --compartment-id <compartment-OCID> \
      --display-name <display-name> \
      --scale MEDIUM \
      --log-config file://log-config.json \
      --network-config file://network-config.json

    Omit --log-config if you don't want to configure logging. Omit --network-config when the runtime doesn't require a customer VCN attachment. You can also provide a description, free-form tags, and defined tags. For logging prerequisites and automatic log creation policies, see Scenario: Configure Logs for an IoT Flow Runtime.

    For all options, see CLI Command Reference.

  • Run the CreateIotFlowRuntime operation to create an IoT Flow Runtime.

    The IoT Flow Runtime OCID uses this format:

    ocid1.iotflowruntime.oc1.<region>.exampleUniqueID
    POST /20250531/iotFlowRuntimes
    {
      "compartmentId": "ocid1.compartment.oc1..exampleuniqueID",
      "iotDomainId": "ocid1.iotdomain.oc1..exampleuniqueID",
      "displayName": "Sample Flow Runtime",
      "scale": "MEDIUM",
      "logConfig": {
        "logGroupId": "ocid1.loggroup.oc1..exampleuniqueID",
        "logId": "ocid1.log.oc1..exampleuniqueID"
      },
      "networkConfig": {
        "subnetId": "ocid1.subnet.oc1..exampleuniqueID",
        "networkSecurityGroupIds": ["ocid1.networksecuritygroup.oc1..exampleuniqueID"],
        "fileStorageMounts": [{
          "mountPath": "history",
          "mountTargetId": "ocid1.mounttarget.oc1..exampleuniqueID",
          "exportId": "ocid1.export.oc1..exampleuniqueID"
        }]
      }
    }

    The request uses CreateIotFlowRuntimeDetails. iotDomainId and compartmentId are required. When supplied, logConfig requires logGroupId; logId is optional. Omit logId to create a log automatically. When supplied, networkConfig requires subnetId. The relative mountPath value history makes the export available at /mnt/history. For logging prerequisites and automatic log creation policies, see Scenario: Configure Logs for an IoT Flow Runtime.