System requirements
Before installing Ant Media Server, ensure your system meets these requirements:Minimum requirements
- Operating System: Ubuntu 18.04+, CentOS 7+, or compatible Linux distribution
- CPU: 2 cores (4+ cores recommended for production)
- RAM: 4 GB (8+ GB recommended for production)
- Disk Space: 10 GB free space
- Java: OpenJDK 17
- Network: Open ports 5080 (HTTP), 5443 (HTTPS), 1935 (RTMP), 5000-65000 (UDP for WebRTC)
Recommended production requirements
- CPU: 8+ cores
- RAM: 16+ GB
- Network: 1 Gbps connection
- Storage: SSD with 100+ GB
Resource usage scales with concurrent streams. For high-traffic deployments, consider cluster mode for horizontal scaling.
Installation on Linux
Quick installation
The fastest way to install Ant Media Server is using the official installation script:- Create an
antmediauser and group - Install files to
/usr/local/antmedia - Configure systemd service
- Set up log directory at
/var/log/antmedia - Start the service automatically
Installation with options
You can customize the installation by starting the server with specific options:Available options
Use global (public) IP in network communication
Use public IP as server name
Replace candidate address with server name
Server mode:
standalone or clusterMongoDB or Redis connection string (e.g.,
mongodb://username:password@host:port or redis://username:password@host:port)License key for Enterprise Edition
TURN/STUN server URL (e.g.,
stun:stun.l.google.com:19302 or turn:turn.example.com:3478)JVM memory options (e.g.,
-Xms2g -Xmx8g)CPU limit percentage (server reports high resource usage above this threshold)
Memory limit percentage (server reports high resource usage above this threshold)
Example configurations
Systemd service configuration
Ant Media Server runs as a systemd service. The service file is located at/lib/systemd/system/antmedia.service.
Service management
Environment variables
You can configure JVM memory options by editing the service file:JVM_MEMORY_OPTIONS environment variable:
Server configuration
The main configuration file is located at/usr/local/antmedia/conf/red5.properties.
Key configuration options
Common configuration tasks
Change HTTP/HTTPS ports
Change HTTP/HTTPS ports
Edit Restart the service:
/usr/local/antmedia/conf/red5.properties:Configure resource limits
Configure resource limits
Adjust CPU and memory thresholds to prevent resource exhaustion:These settings prevent the server from accepting new streams when resources are constrained.
Enable global IP for NAT environments
Enable global IP for NAT environments
For servers behind NAT or load balancers:Or in
red5.properties:Enable SSL
SSL/TLS is required for WebRTC in production. Ant Media Server includes a built-in SSL configuration script.Automatic SSL with Let’s Encrypt
- Install Certbot if not present
- Obtain certificates from Let’s Encrypt
- Configure Ant Media Server to use the certificates
- Set up automatic renewal
Manual SSL configuration
If you have your own certificates:Cluster mode
For high-availability and scaling, you can run Ant Media Server in cluster mode using MongoDB or Redis.Prerequisites
- MongoDB 4.0+ or Redis 6.0+
- Multiple Ant Media Server instances
- Load balancer (recommended)
Configuration
- Set up MongoDB or Redis:
- Start server in cluster mode:
- Verify cluster status:
All servers in the cluster must use the same database connection string and license key.
Post-installation verification
After installation, verify everything is working correctly:Check service status
Verify ports are listening
- Port 5080 (HTTP)
- Port 5443 (HTTPS)
- Port 1935 (RTMP)
Access the dashboard
Open your browser:Check logs
Test streaming
Use the pre-installedLiveApp application:
Cloud deployment options
Ant Media Server is available on major cloud platforms:AWS
Deploy on Amazon Web Services
Azure
Deploy on Microsoft Azure
Google Cloud
Deploy on Google Cloud Platform
AWS CloudFormation
For auto-scaling clusters on AWS:Troubleshooting
Service fails to start
Service fails to start
Check Java installation:Verify log directory permissions:Check for port conflicts:
Cannot access dashboard
Cannot access dashboard
Verify the service is running:Check firewall rules:Check if the port is listening:
WebRTC not working
WebRTC not working
WebRTC requires HTTPS. Verify SSL is configured:Open UDP ports for WebRTC:Configure STUN/TURN server in application settings:
High CPU or memory usage
High CPU or memory usage
Adjust resource limits in Increase JVM heap size:Add:Reload and restart:
/usr/local/antmedia/conf/red5.properties:Next steps
- Configure applications and stream settings
- Set up adaptive bitrate streaming for optimal quality
- Configure authentication and security
- Monitor server metrics and performance
- Integrate with your application using REST API
Getting help
If you encounter issues:- GitHub Discussions - Community support
- GitHub Issues - Report bugs
- Documentation - Comprehensive guides
- [email protected] - Enterprise support
