Stremio is a free application which lets you stream your favorite shows and movies.
The docker images in this repo have the stremio server with ffmpeg and web player setup for you and ready to use in a small alpine image.
Idea here is to have both Stremio web player and server run on the same container and if IPADDRESS env variable is setup generate a certificate and use it for both.
The Web player runs on port 8080 and server runs on both ports 11470 ( plain http ) and 12470 (https).
- If you exposed the ports 8080, 11470 for HTTP just point your streaming server (http://{LAN IP}:8080/) in settings to the lan ip address and set the server to be http://{LAN IP}:11470/ and enjoy. Make sure you set NO_CORS=1 with this option.
This is the easy option since there is no need to setup and dns or have an external ip. Do not set the IPADDRESS env variable if you just want HTTP. You do not need to expose port 12470 with this option but you will only be able to use the webplayer with HTTP.
- If you set your public ip address for the IPADDRESS env variable then streamio server should automatically set the certificate to the wild card *.519b6502d940.stremio.rocks and should generate an A record for your public ip address. You should then expose ports 8080 and 12470 to your servers and then setup port forwarding to your router to point these two ports to your server. Once this is done you can point the WebPlayer to your streaming server on port 12047.
In order to find the fqdn that the certificate is pointing to you can look at the folder you mounted for a file that has .pem extension. The filename is the domain you need to add your your hosts in case of local ip address.
- If you set IPADDRESS to your private ip address then the server should still set the certificate to the wildcard *.519b6502d940.stremio.rocks and have the subdomain set as 192-168-1-10 assuming your private is 192.168.1.10. Full domain should look like 192-168-1-10.519b6502d940.stremio.rocks. You can then setup your /etc/hosts in Linux or c:\Windows\System32\Drivers\etc\hosts in windows to point that host to your lan address like :
192.168.1.10 192-168-1-10.519b6502d940.stremio.rocks # this is an example. set your own ip and fqnd here.
Then you can point your browser to https://192-168-1-10.519b6502d940.stremio.rocks:8080 and setup Streaming server to https://192-168-1-10.519b6502d940.stremio.rocks:12470 .
In order to find the fqdn that the certificate is pointing to you can look at the folder you mounted for a file that has .pem extension. The filename is the domain you need to add your your hosts in case of local ip address.
You don't need to have both Stremio Server and Web Player running. One could use the stremio web player (https://app.strem.io/#/). Stremio's web player should also work for option 2 and 3 above because the webplayer requires that the server's url is in HTTPS.
You can also use the native clients for options 2-3 since they use https. Its probably the best since I imagine your docker servers might not be that powerful.
- A host with Docker installed.
If you haven't installed Docker yet, install it by running:
$ curl -sSL https://get.docker.com | sh
$ sudo usermod -aG docker $(whoami)
$ exit
And log in again.
To automatically run stremio web player and server, simply run:
$ docker run -d \ --name=stremio-docker \ -e NO_CORS=1 \ -e IPADDRESS=`YOURIPADDRESS` \ -v ~/.stremio-server:/root/.stremio-server \ -p 8080:8080/tcp \ -p 11470:11470/tcp \ -p 12470:12470/tcp \ --restart unless-stopped \ tsaridas/stremio-docker:latest
💡 Replace
YOUR_SERVER_IP
with your WAN IP or LAN IP
The Web UI will now be available on http://0.0.0.0:8080
.
💡 Your configuration files and cache will be saved in
~/.stremio-server
These options can be configured by setting environment variables using -e KEY="VALUE"
in the docker run
command.
Env | Default | Example | Description |
---|---|---|---|
FFMPEG_BIN |
- | /usr/bin/ |
Set for custom ffmpeg bin path |
FFPROBE_BIN |
- | /usr/bin/ |
Set for custom ffprobe bin path |
APP_PATH |
- | /srv/stremio-path/ |
Set for custom path for stremio server. Server will always save cache to /root/.stremio-server though so its only for its config files. |
NO_CORS |
- | 1 |
Set to disable server's cors |
CASTING_DISABLED |
- | 1 |
Set to disable casting |
IPADDRESS |
- | 192.168.1.10 |
Set this to enable https |
There are multiple other options defined but probably best not settings any.
To update to the latest version, simply run:
docker stop stremio-docker
docker rm stremio-docker
docker pull tsaridas/stremio-docker:latest
And then run the docker run -d \ ...
command above again.
We build our own ffmpeg from jellyfin repo with version 4.4.1. This plays well and its what stremio officially supports.
You could build your own image with extra ffmpeg configure options. Your new option will probably require that you have the -dev libraries installed for alpine.
If you cannot find the -dev libraries in the alpine repo then you might need to compile them as well.
xvidcore-dev \
fdk-aac-dev \
libva-dev \
git \
x264 `ADD-DEV-PACKAGE-HERE` && \
Add your extra options at the end line before the && :
--prefix=/usr/lib/jellyfin-ffmpeg --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzimg --enable-small --enable-nonfree --enable-libxvid --enable-libaom --enable-libfdk_aac --enable-vaapi --enable-hwaccel=h264_vaapi --toolchain=hardened `ADD-OPTION-HERE` &&
You also add the dev libraries to the above line from configure where you see lots of -dev packages installed. Those packages are purged later so you will also need to install the normal library (not the headers) in the end.
apk add --no-cache libwebp libvorbis x265-libs x264-libs libass opus libgmpxx lame-libs gnutls libvpx libtheora libdrm libbluray zimg libdav1d aom-libs xvidcore fdk-aac curl libva `ADD-NON-DEV-PACKAGE-HERE` && \
The lines shown above might have changed so just try to use common sense on where to add your package. If you want hardware acceleration you might need to compile it with the driver for your hardware.
Builds are setup to make images for the below archs :
- linux/arm/v6
- linux/amd64
- linux/arm64/v8
- linux/arm/v7
I can add more build archs if you require them and you can ask but I doubt anybody ever will need to install these containers in anything else.
- latest -> ones I tested all three options I described and release
- nightly -> builds daily from development branch of web player and gets latest version of server.
- release version (example v1.0.0) -> to have old releases available