Streamwell
Search
K

Installing Streamwell

Before you begin, make sure your Streamwell server:
  • Meets the requirements including a running installation of Docker
  • Has a known or fixed IP address on your network
  • Has root / admin access enabled (required on Linux and macOS)
If you plan to expose your server to the internet, make sure you:
  • Forward the applicable ports from your router to the IP of the server (example)
  • Point the DNS A records from your domain name to the public IP of your router (example)
  • (Recommended) Configure firewalls on your server & router (example)

Express Installation

With Docker installed and running, open a terminal or PowerShell prompt and run this command:
Linux or macOS:
curl http://files.streamwell.net/install.sh -L -o install.sh && chmod +x install.sh && sudo ./install.sh
Windows (PowerShell):
Invoke-WebRequest -Uri http://files.streamwell.net/install.bat -OutFile install.bat; .\install.bat
The on-screen prompts will ask you to choose an install directory and set a system key, or press enter to leave the default settings. After a few seconds, you should be ready to say "Hello World" to your new Streamwell server 😎
Please note these scripts are not guaranteed to work on all systems! If you are running in an enterprise or managed environment, you will likely need to proceed with Manual Installation.

Manual Installation

For more control over the docker installation including port and environment variable settings, start by pulling the latest available docker image:
docker pull beamwell/streamwell:latest
Create or mount directories to hold your SSL certificate, recordings, logs and uploaded files. By storing these outside of the Docker container we are about to create, we can freely update it without fear of losing them:
mkdir ssl rec log files
Time to start up the Streamwell container! (see below for further explanation and more options)
Linux:
docker run -d --name Streamwell --restart always -e SYSTEM_KEY="yourSecretKey" --network host -v ~/ssl:/etc/letsencrypt -v ~/rec:/rec -v ~/log:/log -v ~/files:/files beamwell/streamwell:latest
Windows and macOS:
docker run -d --name Streamwell --restart always -e SYSTEM_KEY="yourSecretKey" -p 80:80 -p 443:443 -p 1935:1935 -p 1936:1936 -p 3333:3333 -p 3334:3334 -p 8000:8000 -p 8081:8081 -p 9999:9999/udp -p 10010:10010 -p 10010:10010/udp -v /path/to/ssl:/etc/letsencrypt -v /path/to/rec:/rec -v /path/to/log:/log -v /path/to/files:/files beamwell/streamwell:latest
After a few seconds, Streamwell should be accessible at the IP of the server via a web browser.

What do these commands mean?

docker pull downloads the application image and version specified (e.g. mycompany/myapp:version).
docker run -d --name Streamwell runs a detached container (so we can close the terminal) and calls it Streamwell
--restart always If the container crashes or is rebooted due to a power failure / system restart, it will automatically restart itself
-e Optional Environment Variables to tune the config right at launch. Here are the available options:
SYSTEM_KEY - we use this as the encryption key inside the application, to secure your links and stream keys. If you don’t pass a key in, one will be created for you and printed a single time in the startup logs (use docker container logs Streamwell to view those logs).
STREAMWELL_DOMAIN_NAME and STREAMWELL_DOMAIN_EMAIL - Streamwell will automatically configure HTTPS for your server, assuming it is reachable over the internet at that domain name. You can also easily configure this later in the web interface.
HTTP_PORT, HTTPS_PORT, WS_PORT, WSS_PORT, RTMP_PORT, RTMPS_PORT, HLS_PORT, API_PORT, SRT_PORT, DATA_PORT - Customize which ports run which services. The web server always runs within the container on the standard ports 80 / 443, but you can pass HTTP(S)_PORT variables and map different ports to serve the web client interface if required, e.g. -p 8080:80 -p 8443:443 -e HTTP_PORT=8080 -e HTTPS_PORT=8443
UPLOAD_MB_LIMIT - sets the maximum file upload size in megabytes (e.g. UPLOAD_MB_LIMIT=512). The default is 256. The maximum is 1024.
TZ - overrides the default internal timezone setting of 'UTC' (details)
WS_PROXY and HLS_PROXY - by default, stream data passes through an Apache proxy so users don't need to worry about opening traffic on additional ports. Set these environment variables to "false" (or any value other than "true") to disable use of the proxy. This may be helpful in environments where system resources are limited.
STREAM_WORKER_COUNT, RTMP_PROVIDER_WORKER_COUNT, SRT_PROVIDER_WORKER_COUNT, WEBRTC_PROVIDER_WORKER_COUNT, WEBRTC_PUBLISHER_WORKER_COUNT, HLS_PUBLISHER_WORKER_COUNT, APP_WORKER_COUNT, WEBRTC_PROVIDER_TCPRELAY_WORKER_COUNT, WEBRTC_PUBLISHER_TCPRELAY_WORKER_COUNT - adjust the number of CPU worker threads for each of the various providers/publishers in OvenMediaEngine. The most used one is STREAM_WORKER_COUNT which allocates CPU threads to ultra low latency playback sessions. This will need to be increased substantially once you get above a small number of live viewers / data output (around 50 viewers / 250Mbps). Likewise for APP_WORKER_COUNT which may need to be increased if you are sending a large number of streams into the server.
-p Connect this port from the outside world to the container. On Linux hosts, you don’t need to do this. Instead you can use the argument --network host in your command for optimal performance. Or connect the ports manually if you prefer.
-v Connect this folder from the computer running Docker to the container
The -v flag is particularly useful since that lets you house things like file uploads, recordings, logs, certificates and more on the host server rather than in the running container. So when you need to update the application it is as simple as replacing the running container with one run from an updated image. While not absolutely required, you should create these directories on your server for data persistence outside of the Docker container:
-v /your/path/to/SSL:/etc/letsencrypt
-v /your/path/to/LOGS:/log
-v /your/path/to/RECORDINGS:/rec
-v /your/path/to/FILES:/files
BEST PRACTICE: Once you figure out the run command for your system, tuck it away somewhere so you can easily re-deploy whenever you Update Streamwell