Although you could upload your game through the PureWeb console immediately after completing the steps in Preparing Your Unreal Project or Preparing Your Unity Project, it’s strongly recommended that you do some local testing first.

Don’t forget that in addition to your packaged game you’ll also need the following installed:

Create a Project in the PureWeb Console

You’ll need a projectId from the PureWeb console before you can begin testing locally.

Open your web browser and go to Log into your account, and if you don’t already have a project, create one by clicking on the [+] icon in the header bar.

Give your project a name in the popup window and click “Create.” Your project should now show up in the dropdown list.

Configure the Platform Streaming Agent

The PureWeb platform streaming agent enables your game to communicate and stream through the PureWeb Platform. You’ll need to install the PureWeb Command Line Interface (CLI) and the PureWeb Streaming Agent.

In your command prompt, there are two command to run.

Using yarn:

yarn global add @pureweb/platform-cli
yarn global add @pureweb/platform-streaming-agent

Using npm:

npm install -g @pureweb/platform-cli
npm install -g @pureweb/platform-streaming-agent
Note: This package currently requires the use of npm 6. Newer versions of npm will be supported in the near future.

Setup CLI credentials

In the PureWeb console, click the gear icon from the top menu to access project properties.

  1. In the Details tab, enable "Allow Unrestricted Access" at the bottom.
  2. In the Platform CLI tab, copy each of the commands there and run them in your command prompt window.

Create a Local Environment for Testing

You’ll use your local machine to emulate the streaming environment.

  1. In the PureWeb console, copy the Default Environment from the Project Properties dialog.
  2. In your command prompt window, use the cli to request an agent token with the following command, inserting the Default Environment value from the console:
pw agent create --environmentId <Default Environment>

The command will return an output message that will include an access_token, needed in step 3.

pw agent create --environmentId 

	"access_token": "ey...iw8rq2Wk",  
    "expires_in": 86400,  
    "token_type": "Bearer"

3. Set the PUREWEB_AGENT_TOKEN environment variable. This will vary between operating systems and shells.

  • Windows PowerShell: $env:PUREWEB_AGENT_TOKEN="<access_token>"
  • Windows Command: set PUREWEB_AGENT_TOKEN=<access_token>
  • OSX / Linux Bash: export PUREWEB_AGENT_TOKEN=<access_token>

4. Set PUREWEB_STREAMER_PORT environment variable
(For Unreal, you can skip this step.)

For Unity, you should set the default port to 9210.

  • Windows PowerShell: $env:PUREWEB_STREAMER_PORT=9210
  • Windows Command: set PUREWEB_STREAMER_PORT=9210
  • OSX / Linux Bash: export PUREWEB_STREAMER_PORT=9210

Run the Streaming Agent

To stream your game locally you must start the streaming agent. In your command prompt window start the streaming-agent.

│                                                          │
│   PureWeb Streaming Agent 2.2.1                          │
│                                                          │
│   Agent id:       e5b1b35a-c60b-45fb-89a4-dd2788620644   │
│   Project id:     bea3c4cb-efa5-4041-9485-6e7a2b49e6d3   │
│   Environment id: 12345-6789-1234-5678-123456733212389   │
│                                                          │
│   Streamer Port:   8888                                  │
│   Leasing Enabled: NO                                    │
│   Sidecar Port:    NO                                    │
│                                                          │
│   Timeouts                                               │
│                                                          │
│     Rendezvous:    NO                                    │
│     Linger:        NO                                    │
│                                                          │
│                                                          │

Note: If you are using this workflow with an Unreal 4.27 game, don't forget to add the version when starting the streaming agent in your command window.

streaming-agent --unrealEngineVersion=4.27

Stream, View and Share Your Game

With the local streaming agent running you’re almost finished!

In another command prompt window, navigate to the folder with your packaged game executable and start the game with local streaming.

//Unreal Engine 5.0
game.exe -PixelStreamingPort=8888 -PixelStreamingIP= -renderOffscreen

//Unreal Engine 4.27
game.exe -PixelStreamingIP=localhost -PixelStreamingPort=8888 -AllowPixelStreamingCommands -PixelStreamingWebRTCDisableResolutionChange=false -ExecCmds="PixelStreaming.WebRTC.DisableResolutionChange" false


Note: The "renderOffscreen" option for Unreal will run the process headless. The advantage is that you will see the stream in the web browser only, but keep in mind that you need to use the Windows Task Manager to stop the UE process when needed.

While your game is running, you can use a web browser to view your application in the PureWeb preview client. Enter the following URL in your browser, including the projectID from the PureWeb console (found in the Project Settings tab), and the environmentID you generated locally in the Create a Local Environment for Testing step. Id&local=true

You can share the URL with others as well to collect feedback and test the behaviour on other browsers and devices.

You can also test a local stream with your local web client running by accessing the following URL


To stop streaming your game:

  1. Press CTRL+C in the command prompt window running the streaming agent.
  2. Close the game window to exit the game.

Next Steps

After you’ve ensured your game package is optimized and ready, you’ll want to share it with your customers / guests!