Basculer le menu
Changer de menu des préférences
Basculer le menu personnel
Non connecté(e)
Votre adresse IP sera visible au public si vous faites des modifications.

« Moonlight web stream » : différence entre les versions

De Le Wiki de Lug
Ligne 70 : Ligne 70 :
= vhost =
= vhost =
  server {
  server {
     listen 443 ssl http2;
     listen 443 ssl;
     server_name <font color = blue>moonlight.tondomaine.com</font>;
     server_name <font color = blue>moonlight.tondomaine.com</font>;
   
   
Ligne 76 : Ligne 76 :
     ssl_certificate_key /etc/letsencrypt/live/<font color = blue>moonlight.tondomaine.com</font>/privkey.pem;
     ssl_certificate_key /etc/letsencrypt/live/<font color = blue>moonlight.tondomaine.com</font>/privkey.pem;
   
   
     location /api/host/stream {
     location / {
         proxy_pass http://<font color = blue>192.168.123:8080</font>/api/host/stream;
         proxy_pass http://<font color = blue>192.168.1.123:8090</font>;
         proxy_http_version 1.1;
         proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_read_timeout 86400;
    }
   
   
    location / {
        proxy_pass http://<font color = blue>192.168.1.123:8080</font>/;
        proxy_http_version 1.1;
         proxy_set_header Host $host;
         proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header X-Forwarded-Proto https;
         proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_buffering off;
        proxy_request_buffering off;
         proxy_read_timeout 86400;
         proxy_read_timeout 86400;
        proxy_send_timeout 86400;
     }
     }
  }
  }

Version du 14 juin 2026 à 12:52

Source github

Installation version Docker

Source

# mkdir /opt/moonlightwebstream
# cd /opt/moonlightwebstream
# vi docker-compose.yml
 services:
  moonlight-web:
    image: mrcreativ3001/moonlight-web-stream:latest
    container_name: moonlight-web
    restart: unless-stopped
    ports:
      - "8080:8080"
      - "40000-40100:40000-40100/udp"
    volumes:
      - /opt/moonlightwebstream/server:/moonlight-web/server
# docker compose up -d

Configuration

# vi /opt/moonlightwebstream/server/config.json

Auhtentification

Au minimum renseigner les champs suivant :

        ...
        "username": "un_utilisateur",
        "credential": "un_mot_de_passe"
        ...

Paramètres forcés

Exemple avec une configuration retrogaming en 720p :

remplacer à la fin :

 "default_settings": null

Par :

    "default_settings": {
        // possible values: "left", "right", "up", "down"
        "sidebarEdge": "left",
        "bitrate": 10000,
        "packetSize": 2048,
        "fps": 60,
        "videoFrameQueueSize": 3,
        // possible values: "720p", "1080p", "1440p", "4k", "native", "custom"
        "videoSize": "720p",
        // only works if videoSize=custom
        //"videoSizeCustom": {
        //    "width": 1920,
        //    "height": 1080
        //},
        // possible values: "h264", "h265", "av1", "auto"
        "videoCodec": "h265",
        "forceVideoElementRenderer": false,
        "canvasRenderer": false,
        "playAudioLocal": true,
        "audioSampleQueueSize": 20,
        // possible values: "highres", "normal"
        "mouseScrollMode": "highres",
        "controllerConfig": {
            "invertAB": false,
            "invertXY": false,
            // possible values: null or a number, example: 60, 120
            "sendIntervalOverride": null
        },
        // possible values: "auto", "webrtc", "websocket"
        "dataTransport": "auto",
        "toggleFullscreenWithKeybind": false,
        // possible values: "standard", "old"
        "pageStyle": "standard"
    }

vhost

server {
    listen 443 ssl;
    server_name moonlight.tondomaine.com;

    ssl_certificate /etc/letsencrypt/live/moonlight.tondomaine.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/moonlight.tondomaine.com/privkey.pem;

    location / {
        proxy_pass http://192.168.1.123:8090;

        proxy_http_version 1.1;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_buffering off;
        proxy_request_buffering off;

        proxy_read_timeout 86400;
        proxy_send_timeout 86400;
    }
}