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.
Use the
oci iot flow-runtime createcommand. 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.jsonOmit
--log-configif you don't want to configure logging. Omit--network-configwhen 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>.exampleUniqueIDPOST /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.iotDomainIdandcompartmentIdare required. When supplied,logConfigrequireslogGroupId;logIdis optional. OmitlogIdto create a log automatically. When supplied,networkConfigrequiressubnetId. The relativemountPathvaluehistorymakes the export available at/mnt/history. For logging prerequisites and automatic log creation policies, see Scenario: Configure Logs for an IoT Flow Runtime.What's Next
Open Flow runtime editor to start working with Node Red editor.