Skip to main content

Overview

Ant Media Server can be deployed on Google Cloud Platform (GCP) using Compute Engine instances, GCP Marketplace for one-click deployment, or Managed Instance Groups (MIG) for auto-scaling capabilities.

Deployment Methods

Deploy Ant Media Server Enterprise Edition directly from GCP Marketplace:
Currently, only the Enterprise Edition is available on GCP Marketplace. Community Edition can be deployed manually on Compute Engine.

Manual Compute Engine Deployment

Deploy on a Compute Engine VM instance with custom configuration.

Managed Instance Groups

Automated scaling using MIG with load balancing for high-traffic scenarios.

Compute Engine Instance Requirements

Machine Types

Development/Testing:
  • Machine Type: e2-medium or n1-standard-2
  • vCPUs: 2
  • Memory: 4 GB
  • Cost: ~$50-70/month
Production (Recommended):
  • Machine Type: c2-standard-4 or n2-standard-4
  • vCPUs: 4
  • Memory: 8-16 GB
  • Network: Premium tier
  • Cost: ~$150-250/month
High-Performance Streaming:
  • Machine Type: c2-standard-8 or c2-standard-16
  • vCPUs: 8-16
  • Memory: 16-32 GB
  • Network: Premium tier, 10+ Gbps
  • SSD persistent disk
  • Cost: ~$300-600/month

Operating System Images

Supported Images:
  • Ubuntu 20.04 LTS
  • Ubuntu 22.04 LTS
  • Debian 11 (Bullseye)
  • Debian 12 (Bookworm)
  • CentOS Stream 8/9
  • Red Hat Enterprise Linux 8/9
Ubuntu 20.04 LTS or 22.04 LTS from ubuntu-os-cloud project is recommended.

Boot Disk

  • Size: 30 GB minimum (50 GB recommended)
  • Type: SSD persistent disk (pd-ssd) for production
  • Additional Disk: 100-500 GB for stream recordings

Quick Start: GCP Marketplace Deployment

1

Access GCP Marketplace

  1. Log into Google Cloud Console (https://console.cloud.google.com)
  2. Navigate to Marketplace
  3. Search for “Ant Media Server Enterprise Edition”
  4. Click on the listing
2

Launch Instance

Click Launch and configure:
  • Deployment name: antmedia-server
  • Zone: Select region (e.g., us-central1-a)
  • Machine type: c2-standard-4 or larger
  • Boot disk: 30 GB SSD persistent disk
3

Configure Firewall

Enable firewall rules:
  • ✓ Allow HTTP traffic (port 5080)
  • ✓ Allow HTTPS traffic (port 5443)
  • Additional ports configured automatically
4

Deploy

  1. Review configuration
  2. Click Deploy
  3. Wait for deployment (5-10 minutes)
  4. Note the external IP address
5

Access Web Panel

Open browser to http://EXTERNAL_IP:5080Create admin account on first access

Manual Compute Engine Deployment

1

Create VM Instance

Using gcloud CLI:
2

Create Firewall Rules

Configure firewall (see section below):
3

Connect to Instance

SSH into the instance:
4

Verify Installation

Check service status:
Get external IP:

Firewall Configuration

Required Firewall Rules

Create firewall rules for all required ports:

Using gcloud CLI

Restrict SSH access (port 22) to specific IP addresses for security. Replace YOUR_IP with your actual IP address.

Static External IP

Reserve Static IP

Configure Server Name

Set your static IP or domain:
Restart:

Managed Instance Groups (Auto-Scaling)

Create Instance Template

Create Managed Instance Group

Create Load Balancer

Persistent Disk Configuration

Create and Attach Disk

Mount the Disk

Cloud Storage Integration

Create Storage Bucket

Configure Service Account

Database Configuration (Enterprise)

Cloud Firestore (MongoDB Alternative)

For serverless NoSQL database option, use Cloud Firestore in native mode.

MongoDB Atlas on GCP

Deploy MongoDB Atlas cluster on GCP for managed MongoDB:
  1. Create MongoDB Atlas account
  2. Deploy cluster in same GCP region
  3. Configure network peering or IP whitelist
  4. Get connection string

Configure Cluster Mode

Cloud SQL (Alternative)

For managed relational database needs (not for Ant Media Server primary DB, but for custom integrations).

SSL/TLS Configuration

Using Let’s Encrypt

Using Google-Managed SSL Certificates

For load balancer SSL termination:

Monitoring with Cloud Monitoring

Enable Cloud Monitoring Agent

Create Alert Policies

Custom Metrics

Send custom Ant Media Server metrics to Cloud Monitoring using the API.

Backup and Disaster Recovery

Snapshot Schedule

Manual Snapshot

Multi-Region Deployment

Deploy in multiple regions for disaster recovery:
  • Primary: us-central1
  • Backup: europe-west1
  • Use Cloud DNS for failover

Cost Optimization

Committed Use Discounts

Purchase 1-year or 3-year committed use contracts for up to 57% discount.

Preemptible VMs

For non-critical workloads (up to 80% discount):

Custom Machine Types

Optimize vCPU and memory ratio:

Troubleshooting

Instance Not Accessible

  1. Check firewall rules: gcloud compute firewall-rules list
  2. Verify instance is running: gcloud compute instances list
  3. Check serial port output: gcloud compute instances get-serial-port-output antmedia-server --zone=us-central1-a

Performance Issues

  1. Check Cloud Monitoring dashboards
  2. Verify machine type is appropriate
  3. Check disk performance metrics
  4. Review application logs: gcloud compute ssh antmedia-server --zone=us-central1-a --command="sudo journalctl -u antmedia -n 100"

WebRTC Connection Issues

  1. Verify UDP firewall rules
  2. Check external IP configuration
  3. Ensure server.name is set correctly
  4. Test STUN/TURN connectivity

Next Steps