Red5 Pro provides official Terraform modules for deploying fully configured clusters on major cloud platforms. Terraform automates the provisioning of all required infrastructure — virtual machines, networking, security groups, and load balancers — so you get a reproducible, version-controlled deployment without manual cloud console work.
A typical deployment provisions a Stream Manager plus a node group consisting of origin, edge, and relay nodes. The Stream Manager URL is printed as a Terraform output at the end of the apply step.
If you prefer a fully managed experience without operating your own infrastructure, consider Red5 Cloud, the hosted version of Red5 Pro.
Prerequisites
Before you begin, make sure you have:
- Terraform (version 1.x or later) installed on your workstation. Download from developer.hashicorp.com/terraform.
- Cloud provider credentials configured in your environment. For AWS this means an IAM user with programmatic access; for GCP a service account JSON key; for Azure a service principal.
- A valid Red5 Pro license key from account.red5.net.
- Sufficient cloud quota for the instance types you plan to use.
Regardless of which cloud provider you target, the deployment process follows the same five steps:
Find the module on the Terraform Registry
Create a Terraform configuration file
Create a main.tf (or clone the example from the registry) and reference the module, then create a terraform.tfvars file with your specific values:# terraform.tfvars example — replace all placeholder values
red5pro_license_key = "YOUR_LICENSE_KEY"
aws_region = "us-east-1"
ssh_key_name = "my-key-pair"
# ... additional variables per the module's documentation
Initialize the working directory
This downloads the module and any provider plugins. Preview the planned changes
Review the output to confirm the resources Terraform will create before you apply anything. Apply and deploy
Type yes when prompted. Terraform provisions all resources and prints the Stream Manager URL when complete:Outputs:
stream_manager_url = "https://sm.your-domain.com:443"
Store your Terraform state in a remote backend such as S3, GCS, or Terraform Cloud so that multiple team members can manage the same deployment safely.
Cloud provider modules
The AWS module deploys Red5 Pro into a VPC with an autoscaling node group managed by Stream Manager.Module: registry.terraform.io — AWSMinimum terraform.tfvars variables to configure:red5pro_license_key = "YOUR_LICENSE_KEY"
aws_region = "us-east-1"
ssh_key_name = "my-aws-keypair"
stream_manager_instance_type = "t3.medium"
node_origin_instance_type = "t3.medium"
node_edge_instance_type = "t3.medium"
Use the Ubuntu 22.04 AMI for all instances. The Amazon Linux AMI is not supported and may be missing libraries required by Red5 Pro.
The GCP module provisions Compute Engine instances, firewall rules, and a load balancer in your chosen region.Module: registry.terraform.io — GCPMinimum terraform.tfvars variables to configure:red5pro_license_key = "YOUR_LICENSE_KEY"
gcp_project_id = "my-gcp-project"
gcp_region = "us-central1"
gcp_zone = "us-central1-a"
stream_manager_machine_type = "n2-standard-2"
node_origin_machine_type = "n2-standard-2"
node_edge_machine_type = "n2-standard-2"
The DigitalOcean module creates Droplets, a VPC, and firewall rules in your chosen region.Module: registry.terraform.io — DigitalOceanMinimum terraform.tfvars variables to configure:red5pro_license_key = "YOUR_LICENSE_KEY"
digitalocean_region = "nyc3"
stream_manager_droplet_size = "s-2vcpu-4gb"
node_origin_droplet_size = "s-2vcpu-4gb"
node_edge_droplet_size = "s-2vcpu-4gb"
The OCI module deploys Red5 Pro on Oracle Cloud Infrastructure using Compute instances and Virtual Cloud Networks.Module: registry.terraform.io — OCIMinimum terraform.tfvars variables to configure:red5pro_license_key = "YOUR_LICENSE_KEY"
oracle_region = "us-ashburn-1"
oracle_tenancy_ocid = "ocid1.tenancy.oc1..xxx"
oracle_user_ocid = "ocid1.user.oc1..xxx"
oracle_fingerprint = "xx:xx:xx:xx"
oracle_private_key_path = "~/.oci/oci_api_key.pem"
stream_manager_shape = "VM.Standard.E4.Flex"
What gets deployed
A complete Red5 Pro Terraform deployment provisions:
- Stream Manager — orchestrates autoscaling and routes streams between nodes. Accessible via HTTPS on port 443.
- Origin nodes — receive inbound streams from publishers.
- Edge nodes — distribute streams to viewers, scaling horizontally as concurrent connections increase.
- Relay nodes (optional) — bridge streams between geographic regions.
- Security groups / firewall rules — opens the required ports for RTMP, WebRTC, and RTSP.
Tear down the deployment
To remove all provisioned resources:
terraform destroy permanently deletes all infrastructure created by the module, including any recorded stream data on the instances. Back up any data you need to keep before running this command.