Ws-scrcpy Better Here

On your Android device, go to Settings > About Phone and tap Build Number seven times to enable Developer Options. Then, enable USB Debugging . Clone and Install:

location / proxy_pass http://127.0.0.1:8000; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; ws-scrcpy