{
  "$id": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json",
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "title": "RoadRunner Main Configuration File",
  "description": "This is your main RoadRunner configuration file. It should contain all the plugins you want to load and their configuration.",
  "type": "object",
  "required": [
    "version"
  ],
  "properties": {
    "version": {
      "description": "RoadRunner configuration file version.",
      "type": "string",
      "default": "3",
      "enum": [
        "3"
      ]
    },
    "amqp": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/amqp/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "definitions": {
        "pipeline": {
          "type": "object",
          "required": [
            "driver"
          ],
          "additionalProperties": false,
          "properties": {
            "driver": {
              "type": "string",
              "enum": [
                "amqp"
              ]
            },
            "config": {
              "type": "object",
              "additionalProperties": false,
              "description": "Configuration options for the AMQP pipeline.",
              "properties": {
                "priority": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
                },
                "prefetch": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
                },
                "delete_queue_on_stop": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to delete the queue when stopping the pipeline."
                },
                "queue": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/queue"
                },
                "exchange": {
                  "description": "The name of the exchange.",
                  "type": "string",
                  "default": "amqp.default"
                },
                "redial_timeout": {
                  "description": "Redial timeout (in seconds). How long to try to reconnect to the AMQP server. Default or zero means 60.",
                  "type": "integer",
                  "default": 60
                },
                "exchange_durable": {
                  "description": "Whether the exchange is durable. See https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges",
                  "type": "boolean",
                  "default": false
                },
                "durable": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the queue is durable."
                },
                "consumer_id": {
                  "description": "The unique identifier for the consumer amongst all consumers on this channel.",
                  "type": "string",
                  "default": "roadrunner-<uuid>"
                },
                "exchange_auto_delete": {
                  "description": "Whether to auto-delete the exchange when the last queue is unbound from it. See https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges",
                  "type": "boolean",
                  "default": false
                },
                "queue_auto_delete": {
                  "description": "Whether to auto-delete queues that have had at least one consumer when the last consumer unsubscribes.",
                  "type": "boolean",
                  "default": false
                },
                "exchange_type": {
                  "description": "The type of exchange.",
                  "type": "string",
                  "default": "direct"
                },
                "routing_key": {
                  "description": "Routing key for the queue.",
                  "type": "string"
                },
                "exclusive": {
                  "description": "Declare a queue exclusive at the exchange.",
                  "type": "boolean",
                  "default": false
                },
                "multiple_ack": {
                  "description": "When multiple ACK is enabled, this delivery and all prior unacknowledged deliveries on the same channel will be acknowledged. This is useful for batch processing of deliveries.",
                  "type": "boolean",
                  "default": false
                },
                "requeue_on_fail": {
                  "description": "Whether to use RabbitMQ mechanisms to requeue the job on failure.",
                  "type": "boolean",
                  "default": false
                },
                "queue_headers": {
                  "description": "Queue declare args.",
                  "type": "object",
                  "minProperties": 1,
                  "additionalProperties": false,
                  "patternProperties": {
                    "^[a-zA-Z0-9._-]+$": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "driver": {
          "type": "object",
          "additionalProperties": false,
          "description": "Configuration options for the AMQP driver.",
          "properties": {
            "addr": {
              "title": "AMQP Server URI",
              "description": "AMQP URI to connect to the rabbitmq server. See https://www.rabbitmq.com/uri-spec.html",
              "type": "string",
              "default": "amqp://guest:guest@127.0.0.1:5672",
              "minLength": 1
            },
            "tls": {
              "title": "TLS Configuration",
              "type": "object",
              "description": "TLS configuration options for AMQP.",
              "properties": {
                "key": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
                },
                "cert": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
                },
                "root_ca": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/root_ca"
                },
                "client_auth_type": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/ClientAuthType"
                }
              },
              "required": [
                "key",
                "cert"
              ]
            }
          }
        }
      },
      "allOf": [
        {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/amqp/refs/heads/master/schema.json#/definitions/driver"
        }
      ]
    },
    "beanstalk": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/beanstalk/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "definitions": {
        "pipeline": {
          "type": "object",
          "required": [
            "driver"
          ],
          "additionalProperties": false,
          "properties": {
            "driver": {
              "type": "string",
              "enum": [
                "beanstalk"
              ]
            },
            "config": {
              "type": "object",
              "description": "Configuration options for the Beanstalk pipeline.",
              "additionalProperties": false,
              "properties": {
                "priority": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
                },
                "prefetch": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
                },
                "tube_priority": {
                  "description": "Beanstalk internal tube priority",
                  "type": "integer",
                  "default": 1
                },
                "tube": {
                  "description": "Tube name",
                  "type": "string",
                  "default": "default"
                },
                "reserve_timeout": {
                  "description": "If no job is available before this timeout has passed, Reserve returns a ConnError recording ErrTimeout",
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration",
                  "default": "5s"
                }
              }
            }
          }
        },
        "driver": {
          "type": "object",
          "additionalProperties": false,
          "description": "Configuration options for the Beanstalk driver.",
          "properties": {
            "addr": {
              "title": "Beanstalk Server Address",
              "description": "The address of the Beanstalk server.",
              "type": "string",
              "default": "tcp://127.0.0.1:11300"
            },
            "timeout": {
              "title": "Connection Timeout",
              "description": "Connection timeout for the Beanstalk server.",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration",
              "default": "30s"
            }
          }
        }
      },
      "allOf": [
        {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/beanstalk/refs/heads/master/schema.json#/definitions/driver"
        }
      ]
    },
    "boltdb": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "definitions": {
        "permissions": {
          "description": "Permissions for the BoltDB database file, if created by RR.",
          "type": "integer",
          "default": 755,
          "minimum": 0,
          "maximum": 777
        },
        "file": {
          "description": "BoltDB database file to create or use.",
          "type": "string",
          "default": "rr.db"
        },
        "pipeline": {
          "type": "object",
          "required": [
            "driver"
          ],
          "additionalProperties": false,
          "properties": {
            "driver": {
              "type": "string",
              "enum": [
                "boltdb"
              ]
            },
            "config": {
              "type": "object",
              "description": "Configuration for the BoltDB pipeline.",
              "additionalProperties": false,
              "properties": {
                "priority": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
                },
                "prefetch": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
                },
                "permissions": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json#/definitions/permissions"
                },
                "file": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json#/definitions/file"
                }
              }
            }
          }
        },
        "driver": {
          "type": "object",
          "additionalProperties": false,
          "description": "Configuration options for the BoltDB driver.",
          "properties": {
            "file": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json#/definitions/file"
            },
            "permissions": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json#/definitions/permissions"
            },
            "interval": {
              "description": "TTL keys check interval in seconds. It's safe to use 1 second here, but can be a little costly to performance. If you set this to zero, 60 will be used.",
              "type": "integer",
              "minimum": 1,
              "default": 60
            }
          }
        }
      },
      "allOf": [
        {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json#/definitions/driver"
        }
      ]
    },
    "centrifuge": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/centrifuge/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Centrifugo plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-centrifuge",
      "additionalProperties": false,
      "properties": {
        "proxy_address": {
          "description": "The address of the Centrifugo proxy server.",
          "type": "string",
          "default": "tcp://127.0.0.1:30000",
          "minLength": 1
        },
        "grpc_api_address": {
          "description": "The address/port of the gRPC server API.",
          "type": "string",
          "default": "tcp://127.0.0.1:10000",
          "minLength": 1
        },
        "use_compressor": {
          "description": "Whether to use gRPC gzip compressor.",
          "type": "boolean",
          "default": false
        },
        "version": {
          "description": "Your application version.",
          "type": "string",
          "default": "v1.0.0",
          "minLength": 1
        },
        "name": {
          "description": "Your application name.",
          "type": "string",
          "default": "roadrunner",
          "minLength": 1
        },
        "pool": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
        },
        "tls": {
          "description": "TLS settings",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "cert": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
            },
            "key": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
            }
          },
          "required": [
            "cert",
            "key"
          ]
        }
      }
    },
    "fileserver": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/fileserver/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the FileServer plugin for RoadRunner.",
      "type": "object",
      "additionalProperties": false,
      "title": "roadrunner-fileserver",
      "required": [
        "address",
        "serve"
      ],
      "properties": {
        "address": {
          "description": "The address to listen on.",
          "type": "string",
          "minLength": 1,
          "examples": [
            "127.0.0.1:10101"
          ]
        },
        "calculate_etag": {
          "description": "Whether to calculate ETag for the file and add the ETag header. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag",
          "type": "boolean",
          "default": false
        },
        "weak": {
          "description": "Whether to use only the filename when calculating the ETag value. If `false`, the entire file content is used.",
          "default": false
        },
        "stream_request_body": {
          "type": "boolean",
          "description": "Whether to stream files larger than 4KB.",
          "default": false
        },
        "serve": {
          "description": "The URL prefixes to serve as static files. At least one entry is required.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "prefix": {
                "description": "Files matching this prefix will be served with this configuration. Prefixes must begin with a forward slash.",
                "type": "string",
                "minLength": 1,
                "examples": [
                  "/img",
                  "/assets"
                ]
              },
              "root": {
                "description": "Directory to serve these files from. This can be an absolute path or a path relative to the RR application directory. Defaults to the root of the RR application directory.",
                "default": ".",
                "type": "string",
                "examples": [
                  "./public",
                  "/var/www/html/public"
                ]
              },
              "compress": {
                "description": "When set to true, the server attempts to minimize CPU usage by caching compressed files.",
                "type": "boolean",
                "default": false
              },
              "cache_duration": {
                "description": "Expiration duration for inactive file handlers, given in seconds. Use any negative number (e.g. `-1`) to disable.",
                "type": "integer",
                "default": 10
              },
              "max_age": {
                "description": "The value for the Cache-Control HTTP-header, given in seconds. The header is not sent if this value is zero or undefined.",
                "type": "integer",
                "default": 0
              },
              "bytes_range": {
                "description": "Enable range requests. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests",
                "type": "boolean",
                "default": false
              }
            },
            "required": [
              "prefix"
            ]
          }
        }
      }
    },
    "grpc": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/grpc/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the gRPC plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-grpc",
      "additionalProperties": false,
      "required": [
        "proto",
        "listen"
      ],
      "properties": {
        "listen": {
          "description": "gRPC address to listen on. Supports both TCP and Unix sockets.",
          "type": "string",
          "minLength": 1,
          "examples": [
            "tcp://127.0.0.1:443",
            "${TCP:-tcp://127.0.0.1:443}",
            "tcp://127.0.0.1:${TCP_PORT}"
          ]
        },
        "proto": {
          "type": "array",
          "minItems": 1,
          "description": "Proto file(s) to use. Multiple files are supported. Wildcards are allowed in the proto field.",
          "items": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "*.proto",
              "first.proto",
              "second.proto"
            ]
          }
        },
        "tls": {
          "description": "GRPC TLS configuration",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "key": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
            },
            "cert": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
            },
            "root_ca": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/root_ca"
            },
            "client_auth_type": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/ClientAuthType"
            }
          },
          "required": [
            "key",
            "cert"
          ]
        },
        "max_send_msg_size": {
          "type": "integer",
          "description": "Maximum send message size in MB.",
          "default": 50
        },
        "max_recv_msg_size": {
          "type": "integer",
          "description": "Maximum receive message size in MB.",
          "default": 50
        },
        "max_connection_idle": {
          "description": " MaxConnectionIdle is a duration for the amount of time after which an idle connection would be closed by sending a GoAway. Idle duration is defined by the most recent time the number of outstanding RPCs became zero or since the connection was established. Defaults to infinite.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/grpc/refs/heads/master/schema.json#/$defs/duration"
        },
        "max_connection_age": {
          "description": "The maximum duration a connection may exist before it will be closed by sending a GoAway. A random jitter of +/-10% will be added to MaxConnectionAge to spread out connection storms. Defaults to infinite.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/grpc/refs/heads/master/schema.json#/$defs/duration"
        },
        "max_connection_age_grace": {
          "description": "The duration after MaxConnectionAge after which the connection will be forcibly closed. Defaults to infinite.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/grpc/refs/heads/master/schema.json#/$defs/duration"
        },
        "max_concurrent_streams": {
          "description": "The maximum number of concurrent streams. Empty or 0 defaults to 10.",
          "type": "integer",
          "default": 10
        },
        "ping_time": {
          "description": "Duration of no activity after which the server pings the client to see if the transport is still alive. If set below 1s, a minimum value of 1s will be used instead.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/grpc/refs/heads/master/schema.json#/$defs/duration",
          "default": "2h"
        },
        "timeout": {
          "description": "The duration to wait for a response to a keepalive check, after which the connection is closed.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/grpc/refs/heads/master/schema.json#/$defs/duration",
          "default": "20s"
        },
        "pool": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
        }
      },
      "$defs": {
        "duration": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration"
        }
      }
    },
    "http": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the http plugin for RoadRunner.",
      "title": "roadrunner-http",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "address": {
          "description": "Host and/or port to listen on for HTTP traffic. If omitted, RoadRunner will not listen for HTTP requests.",
          "type": "string",
          "minLength": 1,
          "examples": [
            "127.0.0.1:8080",
            ":8080"
          ]
        },
        "internal_error_code": {
          "description": "HTTP status code to use for internal RoadRunner errors. Defaults to 500 if omitted.",
          "type": "integer",
          "default": 500,
          "minimum": 100,
          "maximum": 599
        },
        "max_request_size": {
          "description": "Maximum request size in MB. Defaults to 1 GB if zero or omitted.",
          "type": "integer",
          "minimum": 0,
          "default": 1000
        },
        "raw_body": {
          "description": "Whether to send the raw, encoded body for `application/x-www-form-urlencoded` content. Defaults to sending decoded content to PHP workers.",
          "type": "boolean",
          "default": false
        },
        "access_logs": {
          "description": "Whether to enable HTTP access logs.",
          "type": "boolean",
          "default": false
        },
        "middleware": {
          "description": "List of middleware to load for the HTTP plugin, executed in the specified order.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "headers",
              "gzip",
              "static",
              "sendfile",
              "http_metrics",
              "cache",
              "proxy_ip_parser",
              "otel"
            ]
          }
        },
        "trusted_subnets": {
          "description": "List of subnets from which incoming requests are allowed. Defaults to typical private network ranges (192.168.*, 10.0.*, and 172.16.*) and local/loopback interfaces (127.*).",
          "type": "array",
          "items": {
            "type": "string",
            "examples": [
              "10.0.0.0/8",
              "127.0.0.0/8"
            ]
          },
          "default": [
            "10.0.0.0/8",
            "127.0.0.0/8",
            "172.16.0.0/12",
            "192.168.0.0/16",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ]
        },
        "uploads": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/Uploads"
        },
        "headers": {
          "description": "HTTP header configuration.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "cors": {
              "description": "Controls which CORS headers are returned. Additional headers `Vary: Origin`, `Vary: Access-Control-Request-Method` and `Vary: Access-Control-Request-Headers` will be added to responses. Omit this section to disable CORS headers.",
              "type": "object",
              "properties": {
                "allowed_origin": {
                  "description": "Controls the value of 'Access-Control-Allow-Origin'.",
                  "type": "string",
                  "examples": [
                    "*"
                  ]
                },
                "allowed_origin_regex": {
                  "description": "Controls the value of 'Access-Control-Allow-Origin' header value, but evaluated as regex.",
                  "type": "string",
                  "examples": [
                    "^https://foo"
                  ]
                },
                "allowed_headers": {
                  "description": "Controls the value of 'Access-Control-Allow-Headers'.",
                  "type": "string",
                  "examples": [
                    "*"
                  ]
                },
                "allowed_methods": {
                  "description": "Controls the value of 'Access-Control-Allow-Methods'. Provide a comma-separated string of HTTP verbs.",
                  "type": "string",
                  "examples": [
                    "GET,POST,PUT,DELETE"
                  ]
                },
                "allow_credentials": {
                  "description": "Controls the value of 'Access-Control-Allow-Credentials'.",
                  "type": "boolean",
                  "default": false
                },
                "exposed_headers": {
                  "description": "Controls the value of 'Access-Control-Expose-Headers'. Provide a comma-separated list of HTTP headers.",
                  "type": "string",
                  "examples": [
                    "Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma"
                  ]
                },
                "max_age": {
                  "description": "Controls the value of 'Access-Control-Max-Age' (in seconds).",
                  "type": "integer",
                  "examples": [
                    600
                  ],
                  "default": 0
                }
              }
            },
            "request": {
              "description": "Custom HTTP headers to add to every request passed to PHP.",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/Headers"
            },
            "response": {
              "description": "Custom HTTP headers to add to every response from PHP.",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/Headers"
            }
          }
        },
        "static": {
          "description": "Configuration options for serving static files.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "dir": {
              "description": "Path to the directory with static assets. Defaults to the current working directory. Empty/undefined and `.` are equal and are both treated as current directory.",
              "type": "string",
              "examples": [
                ".",
                "/var/www/html"
              ]
            },
            "forbid": {
              "description": "File extensions of files that must not be served. Empty/undefined disallows no files. If files are specified in both `forbid` and `allow`, they will be disallowed. Defaults to an empty array, disallowing no files.",
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "examples": [
                  ".php",
                  ".htaccess",
                  ".sh"
                ]
              }
            },
            "allow": {
              "description": "File extensions of files that may be served. Empty/undefined allows all files, except files specified in `forbid`.",
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "examples": [
                  ".jpg",
                  ".png",
                  ".css",
                  ".js"
                ]
              }
            },
            "calculate_etag": {
              "description": "Whether to enable ETag computation for static files.",
              "type": "boolean",
              "default": false
            },
            "weak": {
              "description": "Whether to use a weak generator (/W), which uses only the filename to generate a CRC32 sum for et ETag. Disable to use the file contents.",
              "type": "boolean",
              "default": false
            },
            "request": {
              "description": "Custom HTTP headers to add to every request for static files.",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/Headers"
            },
            "response": {
              "description": "Custom HTTP headers to add to every response from static files.",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/Headers"
            }
          }
        },
        "pool": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
        },
        "ssl": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL"
        },
        "fcgi": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/FCGI"
        },
        "http2": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/HTTP2"
        },
        "http3": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/HTTP3"
        }
      },
      "$defs": {
        "Uploads": {
          "type": "object",
          "additionalProperties": false,
          "description": "File upload configuration.",
          "properties": {
            "dir": {
              "description": "Directory for file uploads. Empty/undefined value means the OS default temporary directory ($TEMP) will be used, i.e. `/tmp`.",
              "type": "string",
              "examples": [
                "/tmp"
              ]
            },
            "forbid": {
              "description": "Disallow upload of files with the provided extensions.",
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "examples": [
                  ".php",
                  ".sh",
                  ".go"
                ]
              }
            },
            "allow": {
              "description": "Allow only upload of files with the provided extensions. Empty/undefined value means all files except explicitly disallowed (`forbid`) files are allowed.",
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "examples": [
                  ".html",
                  ".go"
                ]
              },
              "default": []
            }
          }
        },
        "SSL": {
          "title": "SSL/TLS (HTTPS) Configuration",
          "description": "Settings required to set up manual or automatic HTTPS for your server. Either `key` and `cert` *or* `acme` is required, but not both.",
          "type": "object",
          "additionalProperties": false,
          "dependentRequired": {
            "key": [
              "cert"
            ],
            "cert": [
              "key"
            ]
          },
          "properties": {
            "address": {
              "description": "Host address/or port to bind to. Defaults to 127.0.0.1:443.",
              "type": "string",
              "default": "127.0.0.1:443",
              "examples": [
                "127.0.0.1:443",
                ":8443"
              ]
            },
            "acme": {
              "description": "ACME certificates provider (Let's encrypt). Do not provide this parameter if you use `key` and `cert`.",
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "cache_dir": {
                  "description": "Directory to use for certificates, private keys, Let's Encrypt configuration etc.",
                  "type": "string",
                  "default": "rr_cache_dir"
                },
                "email": {
                  "description": "User email used to create a Let's Encrypt account. This is required.",
                  "type": "string",
                  "examples": [
                    "user@domain.com"
                  ]
                },
                "alt_http_port": {
                  "description": "Alternate port for the HTTP challenge. Challenge traffic should be redirected to this port if overridden. See https://letsencrypt.org/docs/challenge-types/#http-01-challenge",
                  "type": "integer",
                  "default": 80
                },
                "alt_tlsalpn_port": {
                  "description": "Alternate port for the TLS-ALPN-01 challenge. Challenge traffic should be redirected to this port if overridden. See https://letsencrypt.org/docs/challenge-types/#tls-alpn-01",
                  "type": "integer",
                  "default": 443
                },
                "challenge_type": {
                  "type": "string",
                  "enum": [
                    "http-01",
                    "tlsalpn-01"
                  ],
                  "description": "Challenge types",
                  "default": "http-01"
                },
                "use_production_endpoint": {
                  "description": "Whether to use the production endpoint. We recommend you use the staging endpoint to make sure everything works correctly before you deploy your certificate.",
                  "type": "boolean",
                  "default": false
                },
                "domains": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "string",
                    "examples": [
                      "example.com"
                    ]
                  },
                  "description": "List of domains to obtain certificates for. At least one domain is required."
                }
              },
              "required": [
                "domains",
                "email"
              ]
            },
            "redirect": {
              "description": "Whether to automatically redirect from HTTP to HTTPS.",
              "type": "boolean",
              "default": false
            },
            "key": {
              "description": "Path to the private key for the certificate. Must not be provided if `acme` is set.",
              "type": "string",
              "minLength": 1,
              "examples": [
                "/ssl/server/key.pem"
              ]
            },
            "cert": {
              "description": "Path to the public certificate file. Must not be provided if `acme` is set.",
              "type": "string",
              "minLength": 1,
              "examples": [
                "/ssl/server/cert.crt"
              ]
            },
            "root_ca": {
              "description": "Path to the CA certificate, if required. Always required for mTLS. Omit this option if unused. Must not be provided if `acme` is set.",
              "type": "string",
              "minLength": 1,
              "examples": [
                "/ssl/server/ca.crt"
              ]
            },
            "client_auth_type": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/ClientAuthType"
            }
          }
        },
        "ClientAuthType": {
          "description": "Authorization method for mTLS.",
          "type": "string",
          "default": "no_client_certs",
          "enum": [
            "request_client_cert",
            "require_any_client_cert",
            "verify_client_cert_if_given",
            "no_client_certs",
            "require_and_verify_client_cert"
          ]
        },
        "FCGI": {
          "description": "Enables FastCGI support. If omitted, RoadRunner will not listen for FCGI requests.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "address": {
              "description": "Host and/or port to listen on for FCGI requests.",
              "type": "string",
              "minLength": 1,
              "examples": [
                "0.0.0.0:9000",
                "127.0.0.1:9000",
                "localhost:9000",
                "unix:/path/to/socket.sock"
              ]
            }
          },
          "required": [
            "address"
          ]
        },
        "HTTP2": {
          "description": "HTTP/2 settings.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "h2c": {
              "description": "Use HTTP/2 over non-encrypted TCP connection using H2C",
              "type": "boolean",
              "default": false
            },
            "max_concurrent_streams": {
              "description": "Maximum number of concurrent streams. Defaults to 128 if omitted or zero.",
              "type": "integer",
              "default": 128,
              "minimum": 0
            }
          }
        },
        "HTTP3": {
          "description": "HTTP/3 settings. **Experimental**: Requires that RoadRunner has experimental features enabled. Unless you configured `acme`, you must provide a `key` and `cert` here.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "address"
          ],
          "dependentRequired": {
            "cert": [
              "key"
            ],
            "key": [
              "cert"
            ]
          },
          "properties": {
            "address": {
              "description": "Host and/or port to listen on for HTTP/3.",
              "type": "string",
              "minLength": 1,
              "examples": [
                "127.0.0.1:8080",
                ":8080"
              ]
            },
            "cert": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
            },
            "key": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
            }
          }
        },
        "Headers": {
          "type": "object",
          "minProperties": 1,
          "patternProperties": {
            "^[a-zA-Z0-9._-]+$": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        }
      }
    },
    "jobs": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the jobs plugin for RoadRunner.",
      "title": "roadrunner-jobs",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "num_pollers": {
          "description": "Number of threads which will try to obtain jobs from the priority queue. Default is the number of workers in the pool +1. **Deprecated:** This will be removed in a future version.",
          "type": "integer",
          "minimum": 1,
          "examples": [
            10,
            32
          ],
          "deprecated": true
        },
        "timeout": {
          "description": "Request timeout (in seconds) when attempting to send jobs to the queue. If zero or omitted, this defaults to 60 seconds.",
          "type": "integer",
          "default": 60
        },
        "pipeline_size": {
          "description": "Size of the internal priority queue. If the internal priority queue is full, you cannot send (push) additional jobs to the queue. If you set this value to zero or omit it, it defaults to 1 million.",
          "type": "integer",
          "default": 1000000,
          "minimum": 0
        },
        "consume": {
          "description": "A list of pipelines to be consumed by the server automatically when starting. You can omit this list if you want to start consuming manually. Each item in this list must be defined as a key under `pipelines`.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9._-]+$"
          }
        },
        "pool": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
        },
        "pipelines": {
          "description": "List of broker pipelines associated with the configured drivers. This option is not required since you can declare pipelines at runtime. The selected pipeline `driver` must be configured in the root of your configuration file.",
          "type": "object",
          "patternProperties": {
            "additionalProperties": false,
            "^[a-zA-Z0-9._-]+$": {
              "oneOf": [
                {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/amqp/refs/heads/master/schema.json#/definitions/pipeline"
                },
                {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/beanstalk/refs/heads/master/schema.json#/definitions/pipeline"
                },
                {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json#/definitions/pipeline"
                },
                {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json#/definitions/pipeline"
                },
                {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/memory/refs/heads/master/schema.json#/definitions/pipeline"
                },
                {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/nats/refs/heads/master/schema.json#/definitions/pipeline"
                },
                {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/sqs/refs/heads/master/schema.json#/definitions/pipeline"
                }
              ]
            }
          }
        }
      },
      "definitions": {
        "PipelineProperties": {
          "description": "Common configuration options for queues/pipelines.",
          "priority": {
            "description": "Pipeline priority. If the job pushed to the pipeline has priority set to 0, it will inherit the pipeline's priority.",
            "type": "integer",
            "minimum": 0,
            "default": 10
          },
          "prefetch": {
            "description": "Number of jobs to prefetch from the driver. Please consult the driver for the maximum and default values. For instance, SQS allows only 10.",
            "type": "integer",
            "minimum": 0
          },
          "queue": {
            "type": "string",
            "description": "The name of the queue.",
            "default": "default"
          }
        }
      }
    },
    "kafka": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "definitions": {
        "pipeline": {
          "type": "object",
          "required": [
            "driver"
          ],
          "additionalProperties": false,
          "properties": {
            "driver": {
              "type": "string",
              "enum": [
                "kafka"
              ]
            },
            "config": {
              "type": "object",
              "description": "Configuration for the Kafka pipeline.",
              "additionalProperties": false,
              "properties": {
                "priority": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
                },
                "auto_create_topics_enable": {
                  "description": "Auto create topic for the consumer/producer",
                  "type": "boolean",
                  "default": false
                },
                "producer_options": {
                  "description": "Kafka producer options.",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "disable_idempotent": {
                      "description": "Disables idempotent produce requests, opting out of Kafka server-side deduplication in the face of reissued requests due to transient network problems. Idempotent production is strictly a win, but does require the IDEMPOTENT_WRITE permission on CLUSTER (pre Kafka 3.0), and not all clients can have that permission.",
                      "type": "boolean",
                      "default": false
                    },
                    "partitioning_strategy": {
                      "description": "The partitioning strategy to use for produced records.",
                      "type": "string",
                      "enum": [
                        "Manual",
                        "Uniform",
                        "RoundRobin",
                        "LeastBackup",
                        "Sticky"
                      ],
                      "default": "Uniform"
                    },
                    "required_acks": {
                      "description": "Sets the required acks for produced records",
                      "type": "string",
                      "default": "AllISRAck",
                      "enum": [
                        "NoAck",
                        "LeaderAck",
                        "AllISRAck"
                      ]
                    },
                    "max_message_bytes": {
                      "type": "integer",
                      "default": 1000012,
                      "minimum": 0
                    },
                    "request_timeout": {
                      "description": "The maximum duration in seconds the broker will wait the receipt of the number of required_acks.",
                      "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration",
                      "default": "10s"
                    },
                    "compression_codec": {
                      "description": "The compression codec to use, if any.",
                      "type": "string",
                      "enum": [
                        "gzip",
                        "snappy",
                        "lz4",
                        "zstd"
                      ]
                    },
                    "delivery_timeout": {
                      "description": "A rough duration of how long a record can sit around in a batch before timing out, overriding the unlimited default.",
                      "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration"
                    },
                    "transaction_timeout": {
                      "description": "The allowed duration for a transaction. It is a good idea to keep this less than a group's session timeout.",
                      "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration",
                      "default": "40s"
                    }
                  }
                },
                "group_options": {
                  "type": "object",
                  "required": [
                    "group_id"
                  ],
                  "description": "group_options sets the consumer group for the client to join and consume in. This option is required if using any other group options.",
                  "additionalProperties": false,
                  "properties": {
                    "instance_id": {
                      "description": "InstanceID sets the group consumer's instance ID, switching the group member from 'dynamic' to 'static'.",
                      "type": "string",
                      "minLength": 1
                    },
                    "group_id": {
                      "description": "Kafka Group ID",
                      "type": "string",
                      "minLength": 1
                    },
                    "block_rebalance_on_poll": {
                      "description": "Switches the client to block rebalances whenever you poll.",
                      "type": "boolean",
                      "default": false
                    }
                  }
                },
                "consumer_options": {
                  "description": "Kafka consumer options",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "topics": {
                      "description": "List of the topics to consume. Regex also supported. At least a `topic` or a partition in `consume_partitions` should be provided.",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "consume_regexp": {
                      "description": "Sets the client to parse all topics passed to `topics` as regular expressions. When consuming via regex, every metadata request loads *all* topics, so that all topics can be passed to any regular expressions. Every topic is evaluated only once ever across all regular expressions; either it permanently is known to match, or is permanently known to not match.",
                      "type": "boolean",
                      "default": false
                    },
                    "max_fetch_message_size": {
                      "type": "integer",
                      "default": 50000
                    },
                    "min_fetch_message_size": {
                      "type": "integer",
                      "default": 1
                    },
                    "consumer_offset": {
                      "$ref": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json#/definitions/Offset"
                    },
                    "consume_partitions": {
                      "type": "object",
                      "minProperties": 1,
                      "additionalProperties": false,
                      "patternProperties": {
                        "^[a-zA-Z0-9._-]+$": {
                          "description": "Topic to consume.",
                          "type": "object",
                          "minProperties": 1,
                          "additionalProperties": false,
                          "patternProperties": {
                            "^[0-9]+$": {
                              "$ref": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json#/definitions/Offset"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "sasl_options": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json#/definitions/SASL"
                }
              }
            }
          }
        },
        "driver": {
          "type": "object",
          "additionalProperties": false,
          "description": "Configuration options for the Kafka driver.",
          "properties": {
            "brokers": {
              "description": "Kafka broker addresses.",
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "string",
                "minLength": 1,
                "examples": [
                  "127.0.0.1:9092",
                  "127.0.0.1:9002"
                ]
              }
            },
            "tls": {
              "title": "TLS Configuration",
              "description": "TLS configuration for TLS for Kafka.",
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "timeout": {
                  "description": "Timeout of TLS connections.",
                  "default": "10s",
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration"
                },
                "key": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
                },
                "cert": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
                },
                "root_ca": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/root_ca"
                },
                "client_auth_type": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/ClientAuthType"
                }
              },
              "anyOf": [
                {
                  "required": [
                    "key",
                    "cert"
                  ]
                },
                {
                  "required": [
                    "root_ca"
                  ]
                }
              ]
            },
            "sasl": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json#/definitions/SASL"
            },
            "ping": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json#/definitions/Ping"
            }
          }
        },
        "Offset": {
          "type": "object",
          "description": "Sets the offset to start consuming from, or if OffsetOutOfRange is seen while fetching, to restart consuming from.",
          "required": [
            "type"
          ],
          "additionalProperties": false,
          "properties": {
            "type": {
              "description": "Partition offset type.",
              "type": "string",
              "enum": [
                "AtEnd",
                "At",
                "AfterMilli",
                "AtStart",
                "Relative",
                "WithEpoch"
              ]
            },
            "value": {
              "description": "Value for the: At, AfterMilli, Relative and WithEpoch offsets.",
              "type": "integer",
              "default": 0
            }
          }
        },
        "SASL": {
          "title": "SASL Authentication",
          "type": "object",
          "description": "SASL configuration for Kafka.",
          "additionalProperties": false,
          "properties": {
            "mechanism": {
              "description": "Mechanism used for the authentication.",
              "type": "string",
              "enum": [
                "aws_msk_iam",
                "plain",
                "SCRAM-SHA-256",
                "SCRAM-SHA-512"
              ]
            },
            "username": {
              "description": "Username for authentication.",
              "type": "string"
            },
            "password": {
              "description": "Password for authentication.",
              "type": "string"
            },
            "nonce": {
              "description": "Optional for the SHA auth types. Empty by default.",
              "type": "string"
            },
            "is_token": {
              "description": "If true, suffixes the tokenauth=true extra attribute to the initial authentication message. Set this to true if the user and pass are from a delegation token. Optional for the SHA auth types. Defaults to false.",
              "type": "boolean",
              "default": false
            },
            "zid": {
              "description": "Zid is an optional authorization ID to use in authentication.",
              "type": "string"
            },
            "access_key": {
              "description": "AWS Access Key ID",
              "type": "string"
            },
            "secret_key": {
              "description": "AWS Access Key Secret",
              "type": "string"
            },
            "session_token": {
              "description": "SessionToken, if non-empty, is a session / security token to use for authentication. See the following link for more details: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html",
              "type": "string"
            },
            "user_agent": {
              "description": "UserAgent is the user agent to for the client to use when connecting to Kafka, overriding the default franz-go/<runtime.Version()>/<hostname>. Setting a UserAgent allows authorizing based on the aws:UserAgent condition key; see the following link for more details: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-useragent",
              "type": "string"
            }
          }
        },
        "Ping": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "timeout": {
              "description": "Timeout when pinging Kafka.",
              "default": "10s",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration"
            }
          }
        }
      },
      "allOf": [
        {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/kafka/refs/heads/master/schema.json#/definitions/driver"
        }
      ]
    },
    "logs": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Logger plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-logger",
      "minProperties": 1,
      "additionalProperties": false,
      "properties": {
        "mode": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogMode"
        },
        "level": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogLevel"
        },
        "line_ending": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogLineEnding"
        },
        "encoding": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogEncoding"
        },
        "output": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogOutput"
        },
        "err_output": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogOutput"
        },
        "file_logger_options": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/FileLoggerOptions"
        },
        "channels": {
          "description": "You can configure logging for each plugin individually. The key is the plugin name and the value is logging options in same format as the parent.",
          "type": "object",
          "additionalProperties": false,
          "minProperties": 1,
          "patternProperties": {
            "^[a-zA-Z0-9._-]+$": {
              "description": "Custom logging options for the plugin specified as this object's key.",
              "type": "object",
              "additionalProperties": false,
              "minProperties": 1,
              "properties": {
                "mode": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogMode"
                },
                "level": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogLevel"
                },
                "line_ending": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogLineEnding"
                },
                "encoding": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogEncoding"
                },
                "output": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogOutput"
                },
                "err_output": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/LogOutput"
                },
                "file_logger_options": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/logger/refs/heads/master/schema.json#/$defs/FileLoggerOptions"
                }
              }
            }
          }
        }
      },
      "$defs": {
        "FileLoggerOptions": {
          "description": "File logger options.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "log_output": {
              "type": "string",
              "description": "Path to the log file. Uses <processname>-lumberjack.log and the OS temp (i.e. `/tmp`) directory if empty."
            },
            "max_size": {
              "type": "integer",
              "description": "Maximum file size in MB.",
              "minimum": 0,
              "default": 100
            },
            "max_age": {
              "type": "integer",
              "description": "The maximum number of days to retain old log files based on the timestamp encoded in their filename. Empty or zero defaults to 24 days.",
              "minimum": 0,
              "default": 24
            },
            "max_backups": {
              "type": "integer",
              "description": "The maximum number of old log files to retain. Empty or zero defaults to 10.",
              "minimum": 0,
              "default": 10
            },
            "compress": {
              "type": "boolean",
              "description": "Whether to compress log files.",
              "default": false
            }
          }
        },
        "LogMode": {
          "description": "Logging mode",
          "type": "string",
          "default": "development",
          "enum": [
            "none",
            "off",
            "production",
            "development",
            "raw"
          ]
        },
        "LogLevel": {
          "description": "Logging level",
          "type": "string",
          "default": "debug",
          "enum": [
            "debug",
            "info",
            "warn",
            "error",
            "panic"
          ]
        },
        "LogEncoding": {
          "description": "Encoding format. Default depends on logging mode. For production, `json` is the default, else `console`. Also supports any third-party encodings registered via RegisterEncoder.",
          "type": "string",
          "enum": [
            "console",
            "json"
          ]
        },
        "LogOutput": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "stdout",
              "stderr",
              "/var/log/rr_errors.log"
            ]
          }
        },
        "LogLineEnding": {
          "description": "Line-ending to use for logging.",
          "type": "string",
          "default": "\n"
        }
      }
    },
    "memcached": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/memcached/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Memcached plugin for RoadRunner.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "addr": {
          "description": "Addresses of the memcached node(s).",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "localhost:11211"
            ]
          },
          "default": [
            "localhost:11211"
          ]
        }
      }
    },
    "metrics": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/metrics/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Prometheus Metrics plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-metrics",
      "additionalProperties": false,
      "properties": {
        "address": {
          "description": "Prometheus client address (path /metrics is appended automatically).",
          "type": "string",
          "default": "127.0.0.1:2112",
          "minLength": 1
        },
        "collect": {
          "description": "Application-specific metrics (published using an RPC connection to the server).",
          "type": "object",
          "additionalProperties": false,
          "minProperties": 1,
          "patternProperties": {
            "^[a-zA-Z_:][a-zA-Z0-9_:]*$": {
              "type": "object",
              "description": "The metrics to set up in Prometheus. See https://prometheus.io/docs/guides/go-application/ for details.",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "description": "The metric type to collect.",
                  "type": "string",
                  "enum": [
                    "histogram",
                    "gauge",
                    "counter",
                    "summary"
                  ]
                },
                "namespace": {
                  "type": "string",
                  "description": "The collector's namespace."
                },
                "subsystem": {
                  "type": "string",
                  "description": "The collector's subsystem."
                },
                "help": {
                  "type": "string",
                  "description": "The collector's help message."
                },
                "labels": {
                  "description": "The collector's metrics labels. These must be in the format supported by Prometheus. See https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels",
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "string",
                    "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                  }
                },
                "buckets": {
                  "description": "The collector's buckets for the histogram type. Values must be in increasing order. The +Inf bucket is added implicitly at the end. If this array is undefined or empty, the default buckets are used.",
                  "type": "array",
                  "uniqueItems": true,
                  "items": {
                    "minimum": 0,
                    "type": "number"
                  },
                  "default": [
                    0.005,
                    0.01,
                    0.025,
                    0.05,
                    0.1,
                    0.25,
                    0.5,
                    1,
                    2.5,
                    5,
                    10
                  ]
                },
                "objectives": {
                  "description": "The collector's objectives for the summary type. Keys in this map must be a number between 0 and 1. The default value is an empty map, resulting in a summary without quantiles.",
                  "type": "object",
                  "additionalProperties": false,
                  "patternProperties": {
                    "^(0(\\.[0-9]+)?|1(\\.0+)?)$": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "nats": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/nats/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "definitions": {
        "pipeline": {
          "type": "object",
          "required": [
            "driver"
          ],
          "additionalProperties": false,
          "properties": {
            "driver": {
              "type": "string",
              "enum": [
                "nats"
              ]
            },
            "config": {
              "type": "object",
              "description": "Configuration for the NATS driver.",
              "additionalProperties": false,
              "properties": {
                "priority": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
                },
                "prefetch": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
                },
                "subject": {
                  "description": "NATS subject",
                  "type": "string",
                  "default": "default"
                },
                "stream": {
                  "description": "NATS stream",
                  "type": "string",
                  "default": "default-stream"
                },
                "deliver_new": {
                  "description": "Whether to only receive messages that were created after the consumer was created.",
                  "type": "boolean",
                  "default": false
                },
                "rate_limit": {
                  "description": "Consumer rate-limiter in bytes. See https://docs.nats.io/jetstream/concepts/consumers#ratelimit",
                  "type": "integer",
                  "default": 1000,
                  "minimum": 0
                },
                "delete_stream_on_stop": {
                  "description": "Whether to delete the stream after the pipeline is stopped.",
                  "type": "boolean",
                  "default": false
                },
                "delete_after_ack": {
                  "description": "Whether to delete messages from the stream after successful acknowledgement.",
                  "type": "boolean",
                  "default": false
                }
              }
            }
          }
        },
        "driver": {
          "type": "object",
          "additionalProperties": false,
          "description": "Configuration options for the NATS driver.",
          "properties": {
            "addr": {
              "description": "NATS server address.",
              "type": "string",
              "default": "nats://127.0.0.1:4222"
            }
          }
        }
      },
      "allOf": [
        {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/nats/refs/heads/master/schema.json#/definitions/driver"
        }
      ]
    },
    "otel": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/otel/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the OpenTelemetry plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-otel",
      "additionalProperties": false,
      "required": [
        "resource"
      ],
      "properties": {
        "resource": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "service_name": {
              "description": "The name of the service.",
              "type": "string",
              "default": "RoadRunner",
              "minLength": 1
            },
            "service_version": {
              "type": "string",
              "description": "The version of the service.",
              "default": "1.0.0",
              "minLength": 1
            },
            "service_namespace": {
              "type": "string",
              "description": "The namespace of the service.",
              "default": "<service_name>-<uuid>",
              "minLength": 1
            },
            "service_instance_id": {
              "type": "string",
              "description": "The service instance ID. If not provided or empty, a UUID is generated.",
              "minLength": 1,
              "default": "<uuid>"
            }
          }
        },
        "insecure": {
          "description": "Use insecure endpoint",
          "type": "boolean",
          "default": false
        },
        "compress": {
          "description": "Whether to use gzip compressor.",
          "type": "boolean",
          "default": false
        },
        "exporter": {
          "description": "Provides functionality to emit telemetry to consumers.",
          "type": "string",
          "default": "otlp",
          "enum": [
            "zipkin",
            "stdout",
            "stderr",
            "otlp",
            "jaeger",
            "jaeger_agent"
          ]
        },
        "custom_url": {
          "description": "Overrides the default URL of the HTTP client, if provided.",
          "type": "string",
          "minLength": 1
        },
        "endpoint": {
          "description": "The endpoint of the consumer. Uses the OTEL default if not provided.",
          "type": "string",
          "default": "127.0.0.1:4318",
          "minLength": 1
        },
        "client": {
          "description": "Client to send the spans. Defaults to http if invalid or empty.",
          "type": "string",
          "enum": [
            "http",
            "grpc"
          ]
        },
        "service_name": {
          "description": "User's service name. **Deprecated**: Use resource.service_name instead.",
          "type": "string",
          "default": "RoadRunner",
          "deprecated": true
        },
        "service_version": {
          "description": "User's service version. **Deprecated**: Use resource.service_version instead.",
          "type": "string",
          "default": "1.0.0",
          "deprecated": true
        },
        "headers": {
          "description": "User defined headers for the OTLP protocol.",
          "type": "object",
          "minProperties": 1,
          "additionalProperties": false,
          "patternProperties": {
            "^[a-zA-Z0-9._-]+$": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      }
    },
    "redis": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Redis plugin for RoadRunner.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "addrs": {
          "title": "Redis Endpoint",
          "description": "The addresses or hostnames of the Redis server/cluster to connect to. If the number of addresses is 1 and master_name is empty, a single-node Redis Client will be returned, otherwise a ClusterClient or FailoverClient will be returned, depending on whether `master_name` is provided.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          },
          "default": [
            "localhost:6379"
          ]
        },
        "master_name": {
          "title": "Redis Master Node Name",
          "description": "The name of the master Redis node. A Sentinel-backed FailoverClient will be returned if this value is provided.",
          "type": "string"
        },
        "username": {
          "title": "Redis AUTH username.",
          "description": "The username to provide for Redis authentication.",
          "type": "string",
          "examples": [
            "my_username"
          ]
        },
        "password": {
          "title": "Redis AUTH password.",
          "description": "The password to provide for Redis authentication.",
          "type": "string",
          "examples": [
            "super-secret-password"
          ]
        },
        "db": {
          "title": "Redis DB Index",
          "description": "The Redis DB index to select when connecting.",
          "type": "integer",
          "default": 0,
          "maximum": 10
        },
        "sentinel_password": {
          "title": "Sentinel Password",
          "description": "The password for Redis Sentinel.",
          "type": "string",
          "examples": [
            "super-secret-password"
          ]
        },
        "route_by_latency": {
          "title": "Route by Latency",
          "description": "Whether to route traffic to Redis nodes based on latency.",
          "type": "boolean",
          "default": false
        },
        "route_randomly": {
          "title": "Route Randomly",
          "description": "Whether to randomly route traffic to Redis nodes.",
          "type": "boolean",
          "default": false
        },
        "dial_timeout": {
          "title": "Dial Timeout",
          "description": "The timeout when attempting to connect to Redis. Default or zero means 5s.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": 0
        },
        "max_retries": {
          "title": "Maximum Retries",
          "description": "The maximum number of retry attempts when connecting to Redis. Default or zero means 3.",
          "type": "integer",
          "default": 0
        },
        "min_retry_backoff": {
          "title": "Minimum Retry Backoff",
          "description": "The minimum backoff duration when retrying connection attempts. Default or zero means 8s.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": 0
        },
        "max_retry_backoff": {
          "title": "Maximum Retry Backoff",
          "description": "The maximum backoff duration when retrying connection attempts. Default or zero means 512s.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": 0
        },
        "pool_size": {
          "title": "Connection Pool Size",
          "description": "The number of connections to keep in the Redis connection pool. Default or zero means 10 per logical CPU.",
          "type": "integer",
          "default": 0
        },
        "min_idle_conns": {
          "title": "Minimum Idle Connections",
          "description": "The minimum number of connections to keep in the pool. Defaults to 0, which means no idle connection pool.",
          "type": "integer",
          "default": 0
        },
        "max_conn_age": {
          "title": "Maximum Connection Age",
          "description": "The maximum age of open Redis connections. Default or zero means no limit.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": "0s"
        },
        "read_timeout": {
          "title": "Read Timeout",
          "description": "The timeout when reading from a Redis node. Default or zero means 3s.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": "0s"
        },
        "write_timeout": {
          "title": "Write Timeout",
          "description": "The timeout when writing to a Redis node. Default or zero means equivalent to `read_timeout`.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": "0s"
        },
        "pool_timeout": {
          "title": "Pool Timeout",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration"
        },
        "idle_timeout": {
          "title": "Idle Timeout",
          "description": "The timeout of idle connections to Redis. Default or zero means 5m.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": "0s"
        },
        "idle_check_freq": {
          "title": "Idle Check Frequency",
          "description": "The time between checks for idle connections to Redis. Default or zero means 1m.",
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json#/$defs/duration",
          "default": "0s"
        },
        "read_only": {
          "title": "Read-only",
          "description": "Whether the Redis connection is in read-only mode. See https://redis.io/docs/latest/commands/readonly.",
          "type": "boolean",
          "default": false
        },
        "tls": {
          "description": "GRPC TLS configuration",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "key": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
            },
            "cert": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
            },
            "root_ca": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/root_ca"
            },
            "client_auth_type": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/ClientAuthType"
            }
          },
          "required": [
            "root_ca"
          ]
        }
      },
      "$defs": {
        "duration": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration"
        }
      }
    },
    "temporal": {
      "$id": "https://raw.githubusercontent.com/temporalio/roadrunner-temporal/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Temporal plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-temporal",
      "additionalProperties": false,
      "properties": {
        "address": {
          "description": "Address of the Temporal server. Defaults to localhost:7233 if not provided.",
          "type": "string",
          "default": "localhost:7233",
          "minLength": 1
        },
        "cache_size": {
          "description": "Sticky cache size. Sticky workflow execution is the affinity between workflow tasks of a specific workflow execution to a specific worker. The benefit of sticky execution is that the workflow does not have to reconstruct state by replaying history from the beginning. The cache is shared between workers running within same process. This must be called before any worker is started. If not called, the default size of 10K (which may change) will be used.",
          "type": "integer",
          "default": 10000
        },
        "namespace": {
          "description": "Namespace for this client to work with.",
          "type": "string",
          "default": "default"
        },
        "metrics": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "driver": {
                  "description": "The Prometheus driver.",
                  "type": "string",
                  "enum": [
                    "prometheus"
                  ]
                },
                "prometheus": {
                  "$ref": "https://raw.githubusercontent.com/temporalio/roadrunner-temporal/refs/heads/master/schema.json#/$defs/Prometheus"
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "driver": {
                  "description": "The Statsd driver.",
                  "type": "string",
                  "enum": [
                    "statsd"
                  ]
                },
                "statsd": {
                  "$ref": "https://raw.githubusercontent.com/temporalio/roadrunner-temporal/refs/heads/master/schema.json#/$defs/Statsd"
                }
              }
            }
          ]
        },
        "activities": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
        },
        "tls": {
          "description": "Temporal TLS configuration.",
          "type": "object",
          "required": [
            "key",
            "cert"
          ],
          "properties": {
            "key": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
            },
            "cert": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
            },
            "root_ca": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/root_ca"
            },
            "client_auth_type": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/ClientAuthType"
            },
            "server_name": {
              "description": "ServerName is used to verify the hostname on the returned certificates unless InsecureSkipVerify is given. It is also included in the client's handshake to support virtual hosting unless it is an IP address.",
              "type": "string"
            }
          }
        }
      },
      "$defs": {
        "Statsd": {
          "type": "object",
          "description": "Properties for Temporal Statsd integration.",
          "additionalProperties": false,
          "properties": {
            "host_port": {
              "description": "The host and port of the statsd server.",
              "type": "string",
              "default": "127.0.0.1:8125",
              "minLength": 1
            },
            "prefix": {
              "description": "The prefix to use in reporting to statsd.",
              "type": "string"
            },
            "flush_interval": {
              "description": "The maximum interval between sending packets.",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration",
              "default": "1s"
            },
            "flush_bytes": {
              "description": "The maximum UDP packet size you wish to send. Defaults to 1432 bytes if zero or undefined, which is considered safe for local traffic.",
              "type": "integer",
              "default": 1432
            },
            "tags": {
              "description": "A map of tags consisting of keys and values.",
              "type": "object",
              "minProperties": 1,
              "additionalProperties": false,
              "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "tag_prefix": {
              "description": "Prefix for the tags.",
              "type": "string"
            },
            "tag_separator": {
              "description": "The tag separator allows tags to be appended with a separator. If not specified, tag keys and values are embedded in the stat name directly.",
              "type": "string"
            }
          }
        },
        "Prometheus": {
          "type": "object",
          "description": "Properties for Temporal Prometheus integration.",
          "additionalProperties": false,
          "properties": {
            "address": {
              "description": "Server metrics address.",
              "type": "string",
              "default": "127.0.0.1:9091",
              "minLength": 1
            },
            "type": {
              "type": "string",
              "description": "Metrics type to use. Defaults to `summary`.",
              "enum": [
                "summary",
                "histogram"
              ],
              "default": "summary"
            },
            "prefix": {
              "description": "Temporal metrics prefix.",
              "type": "string"
            }
          }
        }
      }
    },
    "rpc": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/rpc/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the RPC plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-rpc",
      "additionalProperties": false,
      "properties": {
        "listen": {
          "description": "The address and port for the RPC server to bind to. Should contain protocol definition (i.e. `tcp://` or `unix://`).",
          "type": "string",
          "default": "tcp://127.0.0.1:6001",
          "minLength": 1,
          "examples": [
            "tcp://127.0.0.1:6001"
          ]
        }
      }
    },
    "server": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/server/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Server plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-server",
      "additionalProperties": false,
      "required": [
        "command"
      ],
      "properties": {
        "on_init": {
          "description": "Arbitrary command to execute before RR starts allocating workers.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "command"
          ],
          "properties": {
            "command": {
              "description": "Command to execute. It can be any script or binary that RoadRunner has access to.",
              "type": "string",
              "minLength": 1,
              "examples": [
                "php not-worker.php",
                "sh script.sh",
                "start script.bat"
              ]
            },
            "exec_timeout": {
              "description": "Script execution timeout. Zero or empty defaults to 60s.",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration",
              "default": "60s"
            },
            "exit_on_error": {
              "description": "Exit RR if the `on_init` command fails.",
              "type": "boolean",
              "default": "false"
            },
            "user": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/server/refs/heads/master/schema.json#/$defs/User"
            },
            "env": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/server/refs/heads/master/schema.json#/$defs/EnvironmentVariables"
            }
          }
        },
        "command": {
          "description": "The command used to start workers, including any required arguments. Any plugins that implement a worker pool will inherit this command if they do not specify an override.",
          "type": "string",
          "minLength": 1,
          "examples": [
            "php psr-worker.php"
          ]
        },
        "user": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/server/refs/heads/master/schema.json#/$defs/User"
        },
        "group": {
          "description": "Group name (not GID) for the worker processes. The RR process user group will be used if not provided. The RoadRunner process must be run as root for this to work.",
          "type": "string",
          "minLength": 1,
          "examples": [
            "www-data"
          ]
        },
        "env": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/server/refs/heads/master/schema.json#/$defs/EnvironmentVariables"
        },
        "relay": {
          "description": "Worker relay method. Can be 'pipes', a TCP address (e.g. tcp://127.0.0.1:6002) or a socket (e.g. unix:///var/run/rr.sock).",
          "type": "string",
          "default": "pipes",
          "minLength": 1,
          "examples": [
            "pipes",
            "tcp://127.0.0.1:6002",
            "unix:///var/run/rr.sock"
          ]
        }
      },
      "$defs": {
        "EnvironmentVariables": {
          "description": "Environment variables for the process or command.",
          "type": "object",
          "minProperties": 1,
          "additionalProperties": false,
          "patternProperties": {
            "^[a-zA-Z0-9._-]+$": {
              "type": "string"
            }
          }
        },
        "User": {
          "description": "Username (not UID) of the user from whom the command or process is executed. The RoadRunner process user will be used if not provided. The RoadRunner process must be run as root in order to specify a different user.",
          "type": "string",
          "minLength": 1,
          "examples": [
            "www-data"
          ]
        }
      }
    },
    "sqs": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/sqs/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "definitions": {
        "pipeline": {
          "type": "object",
          "required": [
            "driver"
          ],
          "additionalProperties": false,
          "properties": {
            "driver": {
              "type": "string",
              "enum": [
                "sqs"
              ]
            },
            "config": {
              "type": "object",
              "description": "Configuration options for the SQS pipeline.",
              "additionalProperties": false,
              "properties": {
                "priority": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
                },
                "prefetch": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
                },
                "skip_queue_declaration": {
                  "description": "Whether to skip creation of the SQS queue. If you set to this to `true`, the queue must already exist.",
                  "type": "boolean",
                  "default": false
                },
                "max_messages_in_flight": {
                  "description": "Maximum number of messages that can be in-flight at any given time. This is useful to limit the number of messages that are being processed concurrently. Default is the same value as `prefetch`.",
                  "type": "integer",
                  "default": 10
                },
                "visibility_timeout": {
                  "type": "integer",
                  "description": "The duration (in seconds) that a message received from a queue (by one consumer) will not be visible to the other message consumers. The visibility timeout begins when Amazon SQS returns a message. If the consumer fails to process and delete the message before the visibility timeout expires, the message becomes visible to other consumers. If a message must be received only once, your consumer must delete it within the duration of the visibility timeout.",
                  "default": 0
                },
                "error_visibility_timeout": {
                  "type": "integer",
                  "description": "The visibility timeout to set for jobs that fail (NACK). If you set this, you must also set `retain_failed_jobs` to `true`.",
                  "default": 0
                },
                "retain_failed_jobs": {
                  "type": "boolean",
                  "description": "Whether to keep failed (NACK'ed) jobs on the queue. By default, RR will delete and requeue failed jobs immediately. If you set this to `true`, RR does nothing to NACK'ed jobs on the queue and they will be consumed again after `visibility_timeout` or (`error_visibility_timeout`, if > 0) has passed. Jobs that are consumed multiple times will increment their receive count, which can be used to configure SQS to automatically move the jobs to a dead-letter queue.",
                  "default": false
                },
                "wait_time_seconds": {
                  "description": "The duration (in seconds) the call waits for a message to arrive in the queue before returning. If a message is available, the call returns immediately. If no messages are available and the wait time expires, the call returns with an empty list of messages",
                  "type": "integer",
                  "default": 0,
                  "maximum": 20
                },
                "queue": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/queue"
                },
                "message_group_id": {
                  "description": "Message Group ID. See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageGroupId",
                  "type": "string",
                  "default": null
                },
                "attributes": {
                  "title": "AWS queue attributes. Attributes are only applied to the queue if RR creates it. Existing queues will not be modified. Must be any of the attributes listed here: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html.",
                  "type": "object",
                  "properties": {
                    "DelaySeconds": {
                      "description": "The length of time, in seconds, for which the delivery of all messages in the queue is delayed.",
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 900,
                      "default": 0
                    },
                    "MaximumMessageSize": {
                      "description": "The limit of how many bytes a message can contain before Amazon SQS rejects it.",
                      "type": "integer",
                      "minimum": 1024,
                      "maximum": 262144,
                      "default": 262144
                    },
                    "MessageRetentionPeriod": {
                      "description": "The length of time, in seconds, for which Amazon SQS retains a message. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the Amazon SQS system. Changes made to the `MessageRetentionPeriod` attribute can take up to 15 minutes and will impact existing messages in the queue potentially causing them to be expired and deleted if the `MessageRetentionPeriod` is reduced below the age of existing messages.",
                      "type": "integer",
                      "minimum": 60,
                      "maximum": 1209600,
                      "default": 345600
                    },
                    "Policy": {
                      "description": "A valid AWS policy. See https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html for reference of this object structure."
                    },
                    "ReceiveMessageWaitTimeSeconds": {
                      "description": "The length of time, in seconds, for which a [`ReceiveMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html) action waits for a message to arrive.",
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 20,
                      "default": 0
                    },
                    "VisibilityTimeout": {
                      "description": "The visibility timeout for the queue, in seconds. For more information about the visibility timeout, see [Visibility Timeout](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) in the Amazon SQS Developer Guide.",
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 43200,
                      "default": 30
                    },
                    "RedrivePolicy": {
                      "description": "**Dead-letter queues only.** The parameters for the dead-letter queue functionality of the source queue as a JSON object.",
                      "type": "object",
                      "properties": {
                        "deadLetterTargetArn": {
                          "type": "string",
                          "description": "The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of `maxReceiveCount` is exceeded.",
                          "examples": [
                            "arn:aws:sqs:us-east-2:123456789012:my_queue"
                          ]
                        },
                        "maxReceiveCount": {
                          "type": "integer",
                          "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue. When the `ReceiveCount` for a message exceeds the `maxReceiveCount` for a queue, Amazon SQS moves the message to the dead-letter-queue.",
                          "minimum": 1,
                          "default": 10
                        }
                      }
                    },
                    "RedriveAllowPolicy": {
                      "description": "**Dead-letter queues only.** The parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues.",
                      "type": "object",
                      "properties": {
                        "redrivePermission": {
                          "description": "The permission type that defines which source queues can specify the current queue as the dead-letter queue.",
                          "type": "string",
                          "enum": [
                            "allowAll",
                            "denyAll",
                            "byQueue"
                          ]
                        },
                        "sourceQueueArns": {
                          "description": "The Amazon Resource Names (ARN)s of the source queues that can specify this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the `redrivePermission` parameter is set to `byQueue`. You can specify up to 10 source queue ARNs. To allow more than 10 source queues to specify dead-letter queues, set the `redrivePermission` parameter to `allowAll`.",
                          "type": "array",
                          "items": {
                            "type": "string",
                            "examples": [
                              "arn:aws:sqs:us-east-2:123456789012:my_queue",
                              "arn:aws:sqs:us-east-2:123456789012:my_queue2"
                            ]
                          }
                        }
                      }
                    },
                    "ContentBasedDeduplication": {
                      "description": "**FIFO queues only.** Enables content-based deduplication. For more information, see [Exactly-once processing](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html) in the Amazon SQS Developer Guide.",
                      "type": "boolean",
                      "default": false
                    },
                    "DeduplicationScope": {
                      "description": "**High-throughput FIFO queues only.** Specifies whether message deduplication occurs at the message group or queue level.",
                      "type": "string",
                      "enum": [
                        "messageGroup",
                        "queue"
                      ]
                    },
                    "FifoThroughputLimit": {
                      "description": "**High-throughput FIFO queues only.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. The `perMessageGroupId` value is allowed only when the value for `DeduplicationScope` is `messageGroup`.",
                      "type": "string",
                      "enum": [
                        "perQueue",
                        "perMessageGroupId"
                      ]
                    },
                    "KmsMasterKeyId": {
                      "description": "**Applies only to server-side-encryption.** The ID of an AWS managed customer master key (CMK) for Amazon SQS or a custom CMK. While the alias of the AWS-managed CMK for Amazon SQS is always `alias/aws/sqs`, the alias of a custom CMK can, for example, be `alias/MyAlias`.",
                      "type": "string"
                    },
                    "KmsDataKeyReusePeriodSeconds": {
                      "description": "**Applies only to server-side-encryption.** The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours).",
                      "type": "integer",
                      "minimum": 60,
                      "maximum": 86400,
                      "default": 300
                    },
                    "SqsManagedSseEnabled": {
                      "type": "boolean",
                      "default": false,
                      "description": "**Applies only to server-side-encryption.** Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue."
                    }
                  }
                },
                "tags": {
                  "title": "Tags to associate with the queue. Please see https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html.",
                  "type": "object",
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "driver": {
          "type": "object",
          "additionalProperties": false,
          "description": "Configuration options for the SQS driver.",
          "properties": {
            "key": {
              "title": "AWS Access Key ID",
              "description": "This is required unless your environment variables provide AWS credentials.",
              "type": "string",
              "examples": [
                "ASIAIOSFODNN7EXAMPLE"
              ]
            },
            "secret": {
              "title": "AWS Access Key Secret",
              "description": "This is required unless your environment variables provide AWS credentials.",
              "type": "string",
              "examples": [
                "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
              ]
            },
            "region": {
              "title": "AWS Region",
              "description": "The region to connect to. Must be one of the [supported regions](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions). This is required unless your environment variables provide an AWS region or you use a self-hosted queue.",
              "type": "string",
              "examples": [
                "eu-central-1",
                "us-west-1",
                "ca-central-1",
                "ap-northeast-1"
              ]
            },
            "session_token": {
              "title": "AWS Session Token",
              "description": "The short-lived session token to use. This should not be provided for production and has a maximum duration of 12 hours. In most cases, you don't need to provide this value.",
              "type": "string"
            },
            "endpoint": {
              "title": "Queue Endpoint",
              "description": "The endpoint of your queue. You only need to provide this value if you use a self-hosted queue, as the endpoint will be resolved from the provided AWS Region and queue name otherwise.",
              "type": "string",
              "examples": [
                "http://127.0.0.1:9324"
              ]
            }
          },
          "dependentRequired": {
            "key": [
              "secret"
            ],
            "secret": [
              "key"
            ]
          }
        }
      },
      "allOf": [
        {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/sqs/refs/heads/master/schema.json#/definitions/driver"
        }
      ]
    },
    "status": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/status/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Health Check (Status) plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-status",
      "additionalProperties": false,
      "required": [
        "address"
      ],
      "properties": {
        "address": {
          "description": "Host and port to listen on (eg.: `127.0.0.1:2114`). To query a plugin, pass its name as a query parameter called `plugin`, e.g. to check the `http` plugin, request `GET http://127.0.0.1:2114/health?plugin=http`. You can query multiple plugins by appending multiple instances of the `plugin` parameter, e.g. `GET http://127.0.0.1:2114/health?plugin=http&plugin=rpc`.",
          "type": "string",
          "minLength": 1,
          "examples": [
            "127.0.0.1:2114"
          ]
        },
        "unavailable_status_code": {
          "description": "Response HTTP status code if a requested plugin is not ready to handle requests. Valid for both /health and /ready endpoints. Defaults to 503 if undefined or zero.",
          "type": "integer",
          "minimum": 100,
          "maximum": 599,
          "default": 503
        },
        "check_timeout": {
          "description": "The maximum duration to wait for a complete response from the queried plugin(s), in seconds. Defaults to 60.",
          "type": "integer",
          "minimum": 1,
          "default": 60
        }
      }
    },
    "tcp": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/tcp/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the TCP plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-tcp",
      "additionalProperties": false,
      "properties": {
        "servers": {
          "description": "The TCP servers to allocate.",
          "type": "object",
          "minProperties": 1,
          "additionalProperties": false,
          "patternProperties": {
            "^[a-zA-Z0-9._-]+$": {
              "description": "TCP server",
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "addr": {
                  "description": "Address to listen on.",
                  "type": "string",
                  "minLength": 1,
                  "examples": [
                    "127.0.0.1:7778"
                  ]
                },
                "delimiter": {
                  "description": "Data packet delimiter. Every send should end with either EOF or this delimiter.",
                  "type": "string",
                  "default": "\r\n"
                }
              },
              "required": [
                "addr"
              ]
            }
          }
        },
        "pool": {
          "$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
        },
        "read_buf_size": {
          "description": "Size of the chunks that RR reads data in, in MB. If you expect big payloads on a TCP server, you may reduce `read` system calls by using a big buffer.",
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 1
        }
      }
    },
    "kv": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/kv/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the KV plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-kv",
      "minProperties": 1,
      "additionalProperties": false,
      "patternProperties": {
        "[a-zA-Z0-9_-]*": {
          "description": "The name of the key-value storage, as used in your application.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "driver"
          ],
          "properties": {
            "driver": {
              "description": "The driver to use.",
              "type": "string",
              "enum": [
                "boltdb",
                "memcached",
                "memory",
                "redis"
              ]
            },
            "config": {
              "description": "You may override the global configuration of the driver. If you provided a global configuration for the plugin, this section can be omitted and the global configuration will be used instead. If neither are present, the KV storage will not load.",
              "type": "object"
            }
          },
          "if": {
            "properties": {
              "driver": {
                "enum": [
                  "boltdb"
                ]
              }
            }
          },
          "then": {
            "properties": {
              "config": {
                "$ref": "https://raw.githubusercontent.com/roadrunner-server/boltdb/refs/heads/master/schema.json#/definitions/driver"
              }
            }
          },
          "else": {
            "if": {
              "properties": {
                "driver": {
                  "enum": [
                    "memcached"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "config": {
                  "$ref": "https://raw.githubusercontent.com/roadrunner-server/memcached/refs/heads/master/schema.json"
                }
              }
            },
            "else": {
              "if": {
                "properties": {
                  "driver": {
                    "enum": [
                      "redis"
                    ]
                  }
                }
              },
              "then": {
                "properties": {
                  "config": {
                    "$ref": "https://raw.githubusercontent.com/roadrunner-server/redis/refs/heads/master/schema.json"
                  }
                }
              },
              "else": {
                "if": {
                  "properties": {
                    "driver": {
                      "enum": [
                        "memory"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "driver",
                    "config"
                  ],
                  "properties": {
                    "config": {
                      "type": "object",
                      "description": "The memory plugin does not support configuration, but requires an empty config object to be present due to parsing logic and the fact that memory has no global configuration to inherit from.",
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "service": {
      "$id": "https://raw.githubusercontent.com/roadrunner-server/service/refs/heads/master/schema.json",
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "description": "All the valid configuration parameters for the Service plugin for RoadRunner.",
      "type": "object",
      "title": "roadrunner-service",
      "minProperties": 1,
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z0-9._-]+$": {
          "type": "object",
          "description": "The user-defined service.",
          "additionalProperties": false,
          "required": [
            "command"
          ],
          "properties": {
            "command": {
              "description": "The command the service should execute. This can be any executable instruction that RoadRunner has access to on the server.",
              "type": "string",
              "minLength": 1
            },
            "env": {
              "type": "object",
              "description": "Environment variables to pass to the service.",
              "additionalProperties": false,
              "minProperties": 1,
              "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                  "type": "string"
                }
              }
            },
            "timeout_stop_sec": {
              "description": "Timeout for the service stop operation. If it takes longer for this duration for the service to stop, it will be killed. Zero or empty defaults to 5.",
              "type": "integer",
              "minimum": 0,
              "default": 5
            },
            "process_num": {
              "description": "Number of copies (processes) to start per command execution.",
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "exec_timeout": {
              "description": "The maximum duration the service is allowed to run before RR will kill it. Default/zero means unlimited.",
              "type": "string",
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration",
              "default": "0s"
            },
            "remain_after_exit": {
              "description": "Whether to restart the process if it exits, regardless of the exit code.",
              "type": "boolean",
              "default": false
            },
            "restart_sec": {
              "description": "Number of seconds to wait before process restart. Default/zero means 30 seconds.",
              "type": "integer",
              "default": 30
            },
            "service_name_in_log": {
              "description": "Whether to include the name of the service in logs (e.g. `service.some_service_1`).",
              "type": "boolean",
              "default": false
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Duration": {
      "description": "Time duration",
      "type": "string",
      "pattern": "^([0-9]*(\\.[0-9]*)?(ms|h|m|s))+$",
      "examples": [
        "1h",
        "2.5h",
        "2m",
        ".2m",
        "30s",
        "30.03s",
        "300ms",
        "1h3m40s500ms"
      ]
    }
  }
}
