Skip to content



For most deployment configurations, IP cameras will be hosted on a local network that is protected behind a firewall. If the BrainFrame server is not running in this local network, it will not be able to directly access the IP cameras. To enable this kind of configuration, BrainFrame provides tools to proxy video streams from local networks to a remote BrainFrame server, through the concept of a premises.

A premises is a local network with one or more IP cameras. In order for a remote BrainFrame server to have access to IP cameras on a premises, a StreamGateway must be running on that premises. The StreamGateway will take care of proxying local IP camera streams to BrainFrame as needed.


The StreamGateway communicates with a stream proxy server that runs alongside the BrainFrame server. To allow the StreamGateway to communicate with this server, the StreamGateway server port (8004) must be forwarded. See the Server Configuration page for information on how to customize this port.

Setting Up a StreamGateway

The StreamGateway executable is included in your distribution of BrainFrame. Transfer the executable to a dedicated machine on the same local network as the IP cameras.

Before starting the StreamGateway, we need to create a new premises with the new command. For additional options, run ./StreamGateway new -h.

./StreamGateway new --premises-name "The Emerald City" --hostname <BrainFrame IP Address>

The new command creates a new premises and saves the provided information to a configuration file named gateway_config.json.

To start the StreamGateway, use the start command.

./StreamGateway start

Using Premises

Now that we've created a premises and started a StreamGateway, we can connect to IP cameras on that premises. In the Add Stream dialog, select the new premises from the "Premises" drop-down and provide an IP camera URL as if it were being connected to directly (which usually means a local IP address should be used).

Deleting a Premises

When a premises is no longer needed, it can be deleted using the StreamGateway delete command.

./StreamGateway delete