Skip to content

Demo run

This document gives a minimal guide to starting an Agora installation in a simple environment.

To run it you need:

  1. A computer running Linux (or macOS) with ports 9010 and 9011 free
  2. Docker and Docker Compose installed on it
  3. A license key from us

The guide covers these steps:

  1. Installing Agora Controller with Docker Compose
  2. Adding a test stream
  3. Registering a local streamer
  4. Starting the local streamer
  5. Watching the test stream

Installing Agora Controller

Below is the contents of docker-compose.yml:

services:
  controller:
    image: flussonic/agora:${AGORA_VERSION:-latest}
    build: .
    env_file:
      - .env
    environment:
      - DATABASE_URL=mongodb://mongo:27017/agora
      - STATS_DATABASE_URL=mongodb://mongo:27017/agora-stats
    ports:
      - 9010:8080
    depends_on:
      - mongo
    networks:
      - agora-network
  mongo:
    image: mongo:latest
    ports:
      - "27017"
    volumes:
      - mongo-data:/data/db
    networks:
      - agora-network
networks:
  agora-network:
    driver: bridge
volumes:
  mongo-data:
    driver: local

Save this file locally and run:

docker compose up -d

Adding a user

docker compose exec controller /app/create-account -l root -p pass

You can now sign in to Agora with login root and password pass

Adding a test stream

  1. In Streams, create a new stream named test-stream
  2. In the inputs settings section, add a new Demo input

Registering a streamer in Agora

Check that you can sign in at http://localhost:9010/agora-admin/

Creating zones

In Zones, add a new zone named default with CIDR 0.0.0.0/0

Creating a streamer

Create a streamer with a name such as origin1

Then set the following in the editor:

  • API URL: http://localhost:9011. If you run on a Mac, use http://docker.for.mac.localhost:9011 because of how Docker works on macOS
  • Role: Origin
  • Zone: default
  • Playback URL: http://localhost:9011
  • Config API key: click the generate icon
  • Edit API auth: click the generate icon

Save the streamer, then copy streamer config external; you will need that value next

Starting the local streamer

Start the local streamer like this:

mkdir origin1 && docker run -v `pwd`/origin1:/etc/flussonic -e STREAMER_CONFIG_EXTERNAL=http://docker.for.mac.localhost:9010/agora-admin/api/admin-v1/config-external/..... -e LICENSE_KEY="..." -p 9011:9011 flussonic/flussonic

Note: replace STREAMER_CONFIG_EXTERNAL with the actual value from the streamer settings and LICENSE_KEY with the license key you received from us.

If you run in Docker on a Mac, change localhost to docker.for.mac.localhost in STREAMER_CONFIG_EXTERNAL

After it starts, return to Agora and open the streamer page; you should see telemetry from it

Watching the test stream

Open http://localhost:9010/agora/portal?stream=test-stream

You will see a player you can start.