Using Stremio Server with Custom Certificate - tsaridas/stremio-docker GitHub Wiki

Scenario 4: HTTPS with Your Own Domain and Certificate

If you have your own domain and SSL certificate, you can use them directly.

  • Place your certificate file (e.g., certificate.pem) in the directory you mount to /root/.stremio-server.
  • Set the DOMAIN and CERT_FILE environment variables.
docker run -d \
  --name=stremio-docker \
  -e DOMAIN=your.custom.domain \
  -e CERT_FILE=certificate.pem \
  -e AUTO_SERVER_URL=1 \
  -v ./stremio-data:/root/.stremio-server \
  -p 8080:8080 \
  tsaridas/stremio-docker:latest

Make sure the certificate file is placed in the same folder that you expose in /root/.stremio-server. For example, if your certificate is located at ./stremio-data/certificate.pem on your host machine, it will be accessible inside the container at /root/.stremio-server/certificate.pem.

The WebPlayer will be available at https://your.custom.domain:8080 and the streaming server at https://your.custom.domain:8080. Alternatively you can also pass AUTO_SERVER_URL=1 to the environmental variables of the container to automatically setup the server.

Using Docker Compose:

services:
  stremio:
    image: tsaridas/stremio-docker:latest
    restart: unless-stopped
    environment:
      DOMAIN: your.custom.domain
      CERT_FILE: certificate.pem
      AUTO_SERVER_URL: 1
    ports:
      - "8080:8080"
    volumes:
      - "./stremio-data:/root/.stremio-server"