Skip to main content

Overview

Ant Media Server can be installed on various Linux distributions including Ubuntu, Debian, CentOS, Rocky Linux, and AlmaLinux. This guide covers the complete installation process, system requirements, and post-installation configuration.

System Requirements

Minimum Hardware Requirements

  • CPU: 2 cores (4+ cores recommended for production)
  • RAM: 4GB minimum (8GB+ recommended for production)
  • Storage: 20GB minimum free disk space
  • Network: Public IP address with required ports open

Software Requirements

  • Operating Systems:
    • Ubuntu 20.04 LTS or later
    • Debian 10 or later
    • CentOS 8 or later
    • Rocky Linux 8 or 9
    • AlmaLinux 8 or 9
  • Java: OpenJDK 17 (installed automatically)
  • Required packages: jq, dnsutils/bind-utils, iptables

Network Requirements

The following ports must be open in your firewall:

Installation Steps

1

Download the Installation Script

Download the latest Ant Media Server installation script from the official repository:
2

Run the Installation

Execute the installation script with root privileges:
The script will:
  • Install OpenJDK 17 if not already installed
  • Download the latest Ant Media Server package
  • Extract and configure the server
  • Create the antmedia system user and group
  • Set up systemd service
  • Configure necessary permissions
3

Verify Installation

Check if the Ant Media Server service is running:
You should see output indicating the service is active and running.
4

Access the Web Panel

Open your browser and navigate to:
You should see the Ant Media Server dashboard. On first access, you’ll be prompted to create an admin account.

Default Installation Directory

Ant Media Server is installed to:

Directory Structure

Service Management

Ant Media Server runs as a systemd service named antmedia.

Start the Service

Stop the Service

Restart the Service

Check Service Status

Enable Auto-start on Boot

View Logs

View real-time logs:
View application logs:

Systemd Service Configuration

The service file is located at /lib/systemd/system/antmedia.service.
Key service configuration details:
  • User/Group: antmedia
  • Working Directory: /usr/local/antmedia
  • File Descriptor Limit: 65536-524288
  • Tasks Max: 64000
  • Restart Policy: on-failure with 5s delay
  • Java Home: /usr/lib/jvm/java-17-openjdk-amd64

Firewall Configuration

Ubuntu/Debian (UFW)

CentOS/Rocky/AlmaLinux (firewalld)

iptables (Manual Configuration)

If you’re using iptables directly:

Configuration Files

Main Server Configuration

Location: /usr/local/antmedia/conf/red5.properties Key configuration parameters:

Application Configuration

Location: /usr/local/antmedia/webapps/{APP_NAME}/WEB-INF/red5-web.properties Each application (LiveApp, WebRTCAppEE) has its own configuration file for app-specific settings.

JVM Memory Configuration

By default, Ant Media Server uses -Xms1g for initial heap size. To customize memory settings:

Edit the Service File

Add the following override:
Reload and restart:

Using start.sh (Manual Mode)

If running manually with start.sh:

Server Configuration Options

The start.sh script supports various configuration options:

Example: Configure Public IP

Example: Cluster Mode with MongoDB

Post-Installation Tasks

1

Configure SSL/TLS

For production environments, enable SSL. See the SSL Setup guide.
2

Set Up License Key (Enterprise)

If using Enterprise Edition, add your license key:
Set:
Restart the service:
3

Configure Resource Limits

Adjust CPU and memory limits based on your server capacity:
Modify:
4

Set Up Monitoring

Configure log rotation and monitoring for production:

Upgrading

To upgrade to a newer version:
Always backup your configuration and database before upgrading:

Uninstallation

To completely remove Ant Media Server:
This will:
  • Stop the antmedia service
  • Remove the systemd service file
  • Delete the installation directory
  • Remove the antmedia user and group

Troubleshooting

Service Won’t Start

Check the error logs:

Port Already in Use

Find which process is using the port:

Permission Issues

Ensure proper ownership:

Java Not Found

Verify Java installation:
Set JAVA_HOME if needed:

Next Steps