Configure Roku Environment Variables

To build a Roku app, your Bash profile (.bashrc for Linux, or .bash_profile or .zshenv for Mac) needs to include the YI_CLOUD_SERVER_PORT environment variable. The YI_CLOUD_SERVER_PORT environment variable contains the port number used for communication between your local app development server and the Roku client.

  • Use a port greater than 50000 when testing against a local HTTP server. Note that the default port is 54322 and covers this use case.
  • Use port 50000 or less when testing against an Amazon S3 server.
  • Use port 80 when deploying the Release version of the app.

Do the following steps:

  1. Open your environment configuration file (for example ~/.bash_profile, ~/.zshenv or ~/.bashrc).
  2. Add the following environment variable as needed: export YI_CLOUD_SERVER_PORT=<port>
  3. Save the file.
  4. Open a new terminal window or update your current shell with the changes:

    source ~/.bash_profile, source ~/.zshenv, or source ~/.bashrc.