Skip to content

Options

Command Line

Info

By default the server listens on all IPs on port 8080. This is totally fine for most users. You can skip this page.

$ ./stream-server --help
NAME:
   stream-server - https://stream-server.h-da.io

USAGE:
   stream-server [global options] [arguments...]

VERSION:
   v1.0.0

GLOBAL OPTIONS:
   --port value          http port to listen on (default: 8080)
   --tlsport value       https port to listen on (default: 8443)
   --listen value        address to listen on (default: "0.0.0.0")
   --tlscert value       TLS cert
   --tlskey value        TLS key
   --use-host-namespace  use the Host header as namespace
   --help, -h            show help
   --version, -v         print the version

By default stream-server listens on all ip addresses on port 8080. This means that it is exposed to the local network (LAN / WLAN) which is needed if the app is on a phone. Note that the phone must be in the same network as the computer / laptop.

When using the Android Emulator on the same device as the server this exposure is not necessary. Use the --listen 127.0.0.1 flag to only listen on 127.0.0.1 aka localhost. The emulator must then connect to 10.0.2.2 as described here:

Also note that the address 127.0.0.1 on your development machine corresponds to the emulator's own loopback interface. If you want to access services running on your development machine loopback interface (a.k.a. 127.0.0.1 on your machine), you should use the special address 10.0.2.2 instead.

Android Studio - User guide

Advanced configuration

  • HTTPS can be enable by providing a TLS cert and key. If both config values are present a additional HTTPS server is spawned on the tlsport.
  • By default the stream-server has only one namespace, meaning that all incoming requests reference the same display. With --use-host-namespace the Host header is used as a namespace. This means that each different host has a different display. This can be used to dynamically host different displays on one stream-server instance. New displays are created on demand.

Environment Variables

The TWITCH_CLIENT_ID environment variable can be set. This is only necessary during development to access the Twitch API. All official release builds ship with a default client id but you can still supply your own if you want.


Last update: June 20, 2020