Docker Installation - Storm Streaming Server

Docker is the simplest way to start working with Storm Streaming Server. Please make sure that both Docker and Docker Compose components are installed on your target OS, you can do this by using the following command. If you have no prior experience with Docker, check our Docker Software Installation guide:

Let's check if all Docker components are in place:

                        
docker version
                    
(for Windows please use PowerShell/Command Prompt)
                        
docker-compose version
                    
(for Windows please use PowerShell/Command Prompt)

Basic Docker configuration

Let's create a simplified docker configuration file called storm-docker-compose.yml

                        
version: '3.8'
services:
  storm-streaming-server:
    image: stormstreaming/storm-streaming-server:latest
    environment:
      STORM_LICENSE_KEY: "DEVELOPER"
      STORM_SERVER_NAME: "Main"
      STORM_ADMIN_USERNAME: "admin"
      STORM_ADMIN_PASSWORD: "admin"
      JAVA_XMX_VALUE: "16g"
      JAVA_XMS_VALUE: "8g"
    ports:
      - "8080:8080"
      - "1935:1935"
    volumes:
      - /etc/ssl/private:/etc/ssl
      - /var/logs/storm/log:/srv/storm/log
                        
                    

Explanation - Environmental variables:

STORM_LICENSE_KEYFor testing purposes, you can keep “DEVELOPER”, however server will be limited to 5 concurrent streams and 10 viewer connections. For a paid or non-commercial license, use your license key found on “My Products” page.
STORM_ADMIN_USERNAMEAdmin username for accessing the control panel.
STORM_ADMIN_USERNAMEAdmin password for accessing the control panel.
Table 1. Environmental variables table

Additional & Optional Environmental variables:

STORM_SERVER_NAMEThe name of your server will help identify it later if you need to manage multiple instances.
STORM_SERVER_GROUPThe server group will help identify it later if you need to manage multiple grouped instances.
STORM_RTMP_SSL_ENABLEDIf set to 'true' enables SSL engine for default RTMP VHost. The default value is 'false'. Please keep in mind that you'll also have to provide STORM_SSL_CERT_PATH & STORM_SSL_CERT_PASSWORD variables or server won't start.
STORM_WEBSOCKET_SSL_ENABLEDIf set to 'true' enables SSL engine for default WebSocket/HTTP VHost. The default value is 'false'. Please keep in mind that you'll also have to provide STORM_SSL_CERT_PATH & STORM_SSL_CERT_PASSWORD variables or server won't start.
STORM_SSL_CERT_PATHA path to JKS certificate file. The default path starts with '/etc/ssl' as it is shown in Volumes section below. Required if STORM_RTMP_SSL_ENABLED or STORM_WS_SSL_ENABLED are set to 'true'.
STORM_SSL_CERT_PASSWORDA password for JKS certificate file. Required if STORM_RTMP_SSL_ENABLED or STORM_WS_SSL_ENABLED are set to 'true'.
STORM_RTMP_PORTA default port for RTMP VHost (1935 by default). Please keep in mind that this port must be exposed to docker host.
STORM_RTMP_HOSTA default hostname for RTMP. In order to open host on all available addresses use "*" (default value).
STORM_WEBSOCKET_PORTA default port for WebSocket VHost (8080 by default). Please keep in mind that this port must be exposed to docker host.
STORM_WEBSOCKET_HOSTA default hostname for WebSocket & HTTP protocols. In order to open host on all available addresses use "*" (default value).
Additional & Optional Environmental variables table

Explanation – Volumes:

Volumes are shared (linked) directories between a docker host/machine (left side) and a docker container (right side). The right side after a colon should NOT BE MODIFIED

DOCKER_HOST_PATH_FOR_SSL:/etc/sslVolume for JKS files required for Storm running in SSL mode.
DOCKER_HOST_PATH_FOR_CONFIGS:/srv/storm/configVolume for Storm config files.
DOCKER_HOST_PATH_FOR_LOGS:/srv/storm/logVolume for logs
Table 2. Volumes table

For Windows based operating system paths should look as in this example:

                        
- /c/Users/USERNAME/Documents/Strom/config:/srv/storm/log
                    

Explanation – Port forwarding:

Docker allows to forward ports between host/machine (left side) and a docker container (right side). Ports on the container side can be modified with STORM_RTMP_PORT and STORM_WS_PORT variables. You can also modify ports used internally by Storm Server by editing Preferences.xml file (Vhost section).

Creating container from YML file

Let’s create the container from our YML file now.

                        
docker-compose -f storm-docker-compose.yml up
                    

Destroying container

If we want to stop the container and destroy it, simply use:

                        
docker-compose -f storm-docker-compose.yml down
                    

Java Memory Allocation

In order to increase memory available to Java application within Docker you can use these optional environmental variables.

JAVA_XMS_VALUE: "8g"Minimal amount of heap memory available for Java (Strom) application. Sample values:

8G – 8 GiB (default / development)
32G – 32 GiB (default / development)
JAVA_XMX_VALUE: "16G"Maximum amount of heap memory available for Java (Strom) application. Sample values:

16G – 16 GiB (default / development)
128G – 128 GiB (production)
Table 3. Docker & Java Memory Allocation table