Skip to content

Installation

Mohit Dubey edited this page Jan 3, 2024 · 27 revisions

If you are not familiar with Linux and basic terminal commands, Please check our guide for Beginners.

Linux (Ubuntu)

1. Installing the Ant Media Server

  • Download the install_ant-media-server.sh shell script
wget -O install_ant-media-server.sh https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh && sudo chmod 755 install_ant-media-server.sh
  • Run the Installation Script

    For a clean new installation:

    sudo ./install_ant-media-server.sh -l 'your-license-key'
    

For more utilization options you can use sudo ./install_ant-media-server.sh -h

2. Upgrading the Ant Media Server

Upgrading the Ant Media Server is essentially a three-step process that involves getting the installation zip file, getting the installation script, and running the update command.

To know the exact commands and step-wise process for upgrading the Ant Media Server, please check this upgrading guide.

3. Control the Service

You can check the service if it is running.

sudo service antmedia status

You can stop/start the service anytime you want.

sudo service antmedia stop
sudo service antmedia start

4. Install SSL for your Ant Media Server

  • Enabling SSL on the Ant Media Server can be done directly from the web panel itself using the free subdomain of antmedia.cloud

image

  • For enabling SSL from the terminal and other options, please check the setting SSL document.

5. Accessing Web panel

Open your browser and type http://SERVER_IP_ADDRESS:5080 to go to the web panel. If you're having difficulty accessing the web panel, there may be a firewall that blocks accessing the 5080 port.

Docker Installation

Please visit for more information Docker and Docker Compose.

Cluster Installation

Cluster installation is an advance topic. Please visit Clustering & Scaling.

Server Ports

In order to server run properly you need to open some network ports. Here are the ports server uses.

  • TCP:1935 (RTMP)
  • TCP:5080 (HTTP)
  • TCP:5443 (HTTPS)
  • UDP:4200 (SRT)
  • UDP:50000-60000 (WebRTC. It's 50K-60K since 2.4.2. Before 2.4.2, default value 5K-65K. You can change port range
  • TCP:5000 (You need to open this port in only cluster mode for internal network. It should not be open to public.)

Forward Default http(80), https(443) Ports to 5080 and 5443

Generally, port forwarding is used to forward default ports to the server's ports in order to have ease of use. For instance let's forward 80 to 5080, just type the command below.

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5080
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 5443

After running the command above, the http requests going to 80 is forwarded to 5080. The http requests going to 443 is being forwarded to 5443.

Please pay attention that while you're enabling SSL, 80 port should not be used by any process or should not be forwarded to any other port either.

List and Delete Current Port Forwardings

To List port forwarding run the command below.

sudo iptables -t nat --line-numbers -L

To delete a port forwarding run the command below.

iptables -t nat -D PREROUTING [LINE_NUMBER_IN_PREVIOUS_COMMAND]

Make Port Forwarding Persistent

If you want the server to reload port forwarding after reboot, we need to install iptables-persistent package and save rules like below.

sudo apt-get install iptables-persistent

Above command will install iptables-persistent package, after that just run the command below every time you make a change and want it to be persistent.

sudo sh -c "iptables-save > /etc/iptables/rules.v4"

User Guide

Reference

Troubleshooting

Draft

Proposals

Clone this wiki locally