Skip to main content

Command Palette

Search for a command to run...

Deploying Ant Media Server Live Video Streaming on Ubuntu 24.04

Step-by-step guide to deploy Ant Media Server Community Edition with Docker Compose and Traefik on Ubuntu 24.04, with RTMP ingest and automatic HTTPS for the web panel.

Updated
2 min read
Deploying Ant Media Server Live Video Streaming on Ubuntu 24.04
S
A Developer Advocate with a focus on improving the developer experience through clear communication, technical enablement, and community engagement.
A
DevOps Engineer with experience in Kubernetes, automation, cloud infrastructure, and observability. I work in Developer Relations, contribute to technical documentation, and collaborate on engineering-focused projects.

Ant Media Server is an open-source live video streaming engine that handles WebRTC, RTMP, HLS, and DASH for ultra-low-latency broadcasts. This guide deploys Ant Media Server Community Edition using Docker Compose with Traefik handling automatic HTTPS for the management panel and RTMP exposed on port 1935, following live video streaming deployment practices documented in Vultr Docs.


Set Up the Directory Structure

1. Create the project directory:

$ mkdir -p ~/ant-media-server
$ cd ~/ant-media-server

2. Create the environment file:

$ nano .env
DOMAIN=ant.example.com
LETSENCRYPT_EMAIL=admin@example.com

3. Download the community release archive and Dockerfile:

$ wget https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.16.2/ant-media-server-community-2.16.2.zip
$ wget https://raw.githubusercontent.com/ant-media/Scripts/master/docker/Dockerfile_Process -O Dockerfile

Deploy with Docker Compose

1. Create the Docker Compose manifest:

$ nano docker-compose.yaml
services:
  traefik:
    image: traefik:v3.6
    container_name: traefik
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
      - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    restart: unless-stopped

  antmedia:
    build:
      context: ./
      dockerfile: ./Dockerfile
    container_name: antmedia
    entrypoint: /usr/local/antmedia/start.sh
    ports:
      - "1935:1935"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.antmedia.rule=Host(`${DOMAIN}`)"
      - "traefik.http.routers.antmedia.entrypoints=websecure"
      - "traefik.http.routers.antmedia.tls.certresolver=letsencrypt"
      - "traefik.http.services.antmedia.loadbalancer.server.port=5080"
    restart: unless-stopped

volumes:
  letsencrypt:

2. Build the Ant Media image with the downloaded release:

$ docker compose build --build-arg AntMediaServer=ant-media-server-community-2.16.2.zip

3. Start the services:

$ docker compose up -d

4. Verify the services are running:

$ docker compose ps
$ docker compose logs

Access the Management Panel

Open https://ant.example.com in a browser. Create the administrator account on first launch, then create an application (default applications: LiveApp, WebRTCAppEE). Ingest streams via RTMP at rtmp://SERVER_IP/LiveApp/STREAM_KEY.


Next Steps

Ant Media Server is running with HTTPS for the panel and RTMP ingest exposed. From here you can:

  • Configure WebRTC publishing/playback from the sample pages under /LiveApp

  • Enable HLS and DASH playback for browser-friendly delivery

  • Upgrade to Enterprise Edition for adaptive bitrate, recording, and SFU/MCU

For the full guide with additional tips, visit the original article on Vultr Docs.

The Self-Hosted Stack

Part 35 of 50

The Self-Hosted Stack is a developer-focused series exploring open-source tools you can deploy, run, and manage on your own infrastructure. From AI platforms and databases to developer tools, observability stacks, and authentication systems, each guide walks through deploying production-ready open-source software on Vultr cloud infrastructure.

Up next

Deploying MinIO Object Storage Server on Ubuntu 24.04

Step-by-step guide to deploy MinIO with Docker Compose and Traefik on Ubuntu 24.04, with persistent storage and automatic HTTPS on separate console and S3 API domains.

More from this blog

V

Vultr

71 posts

Vultr is a global cloud infrastructure provider trusted by developers and businesses in 185+ countries. We publishe hands-on guides spanning Linux administration, server configuration, DevOps, networking, open source stacks, AI code agents, and Vultr product walkthroughs, all tested against real cloud environments and built for engineers who ship.