BGPVR Operator guide
Operator guide

Make remote help ready on your server

Remote help on the BGPVR Player app (see a viewer's app screen, press its buttons, change its settings) needs three things from your server. Settings › Clients & privacy › Remote help readiness checks all three through your own web address and shows the command for each red line, filled in for your install. MAG boxes need none of this.

On this page
  1. Make remote help ready on your server
  2. In the console
  3. 1. Name your reverse proxy
  4. 2. Add the picture locations to your proxy
  5. 3. Use https
  6. 4. Check again
  7. Watch out

Make remote help ready on your server

Remote help on the BGPVR Player app (see a viewer's app screen, press its buttons, change its settings) needs three things from your server. Settings › Clients & privacy › Remote help readiness checks all three through your own web address and shows the command for each red line, filled in for your install. MAG boxes need none of this. Kodi boxes (the BGPVR Kodi add-on) are listed in Devices but have no remote help.

  1. Name your reverse proxy. The suite believes "this came over https" and "this is a picture" only from a proxy you named. Until then it is in auto mode and remote help on the app stays off. Run on the server (127.0.0.1 when nginx runs on the same machine, else the proxy's own address; no restart needed):
    docker exec bgpvr python3 -c "import sys; sys.path.insert(0, '/app/backend'); from bgpvr.config import set_setting; set_setting('trusted_proxy_cidrs', '127.0.0.1/32')"
    If you set BGPVR_TRUSTED_PROXIES in your docker-compose.yml, that wins over the setting: change it there and restart the container instead.
  2. Add the picture locations to your proxy. Screen pictures must stay in memory: they are never written to your proxy's disk, a cache or a log. Write this install's picture key into a file only nginx reads (the key goes through the pipe and never shows on screen):
    docker exec bgpvr python3 -c "import sys; sys.path.insert(0, '/app/backend'); from bgpvr.config import get_setting; print('proxy_set_header X-BGPVR-Picture-Path %s;' % get_setting('remote_help_picture_key', ''))" | sudo install -m 600 /dev/stdin /etc/nginx/bgpvr-picture-key.conf
    then add these two locations to the https server block of your console's address, above location / (change 127.0.0.1:8095 to what your location / uses), and reload:
    location ~ ^/api/client/device/remote-help/[0-9]+/screen$ {
        client_max_body_size 1m;
        client_body_buffer_size 1m;
        proxy_request_buffering on;
        include /etc/nginx/bgpvr-picture-key.conf;
        proxy_pass http://127.0.0.1:8095;
        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 $scheme;
    }
    location ~ ^/api/remote-help/[0-9]+/screen$ {
        proxy_buffering off;
        proxy_max_temp_file_size 0;
        proxy_pass http://127.0.0.1:8095;
        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 $scheme;
    }
    sudo nginx -t && sudo systemctl reload nginx
    Without it the keys and actions work, and the console says "Live screen needs the server update".
  3. Use https. The app never takes remote help on an http:// address. With nginx and Let's Encrypt: sudo certbot --nginx -d your.domain, then open the console on https.
  4. Open Settings › Clients & privacy › Remote help readiness and press Check again: all three lines say Ready.
Another reverse proxy (Caddy, Traefik, HAProxy, a NAS)

The same three rules: name its address in trusted_proxy_cidrs; for the paths /api/client/device/remote-help/<n>/screen keep the request body (up to 1 MB) in memory and add the header X-BGPVR-Picture-Path with this install's key (read it with the command above, without the proxy_set_header words, straight into your proxy's secret store); for /api/remote-help/<n>/screen turn response buffering and caching off; send X-Forwarded-Proto and X-Forwarded-For everywhere. The readiness card tells you when it is right.

Never paste the picture key into a chat, a ticket or a screenshot

Anyone with it could hand pictures to your server as if they came through your proxy. The console never shows it. If it leaked (or the readiness card says this install has none), make a new one, then run step 2 again:

docker exec bgpvr python3 -c "import secrets, sys; sys.path.insert(0, '/app/backend'); from bgpvr.config import set_setting; set_setting('remote_help_picture_key', secrets.token_hex(32))"

In the console: Make remote help ready on your server

1. Name your reverse proxy

The suite believes "this came over https" and "this is a picture" only from a proxy you named; until then remote help on the app stays off. Run on the server (127.0.0.1 when nginx runs on the same machine, else the proxy's own address; no restart needed):

docker exec bgpvr python3 -c "import sys; sys.path.insert(0, '/app/backend'); from bgpvr.config import set_setting; set_setting('trusted_proxy_cidrs', '127.0.0.1/32')"
If BGPVR_TRUSTED_PROXIES is set in your docker-compose.yml, that wins: change it there and restart the container.

2. Add the picture locations to your proxy

Screen pictures stay in memory: never on the proxy's disk, in a cache or a log. Write this install's picture key into a file only nginx reads, then add the two location blocks for /api/client/device/remote-help/<n>/screen and /api/remote-help/<n>/screen above location / and reload nginx. The readiness card and the full Help page have both blocks, ready to paste. Without them the keys and actions work, and the console says "Live screen needs the server update".

3. Use https

The app never takes remote help on an http:// address. With nginx and Let's Encrypt: sudo certbot --nginx -d your.domain, then open the console on https.

4. Check again

Settings › Clients & privacy › Remote help readiness → Check again: all three lines say Ready.

Watch out

  • Another reverse proxy (Caddy, Traefik, HAProxy, a NAS): the same three rules. Name its address in trusted_proxy_cidrs, keep the picture upload (up to 1 MB) in memory with the X-BGPVR-Picture-Path header, turn buffering and caching off for the live screen, send X-Forwarded-Proto and X-Forwarded-For everywhere.
  • Never paste the picture key into a chat, a ticket or a screenshot: anyone with it could hand pictures to your server as if they came through your proxy. If it leaked, make a new one (the full Help page has the command) and do step 2 again.