Webtop KasmVNC "Uncaught TypeError"

Hi there,
I set up a webtop on my debian host, using the following compose file:

---
version: "2.1"
services:
  webtop:
    image: ghcr.io/linuxserver/webtop:ubuntu-xfce
    container_name: webtop
    privileged: true #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Oslo
      - CUSTOM_USER=dejhost
      - PASSWORD=passw
#      - SUBFOLDER=/ #optional
    volumes:
      - /home/dejhost/config/webtop_config:/config
      - /home/dejhost/config/docker.sock:/var/run/docker.sock #optional
    ports:
      - 21004:3000
    shm_size: "1gb" #optional
    restart: unless-stopped

When I access the container through the local IP address, I have no issues. But if I use the WAN address, I get the following error-message after a few seconds:

So this has probably something to do with the config of my reverse proxy (nginx):

server {
    server_name jetson.subseascanning.com;
    include /etc/nginx/include/server_http2.conf;
    client_max_body_size 0;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;
        include /etc/nginx/include/proxy-ident.conf;
        proxy_pass http://192.168.1.177:21004;
        #include /config/nginx/proxy.conf;
        #include /config/nginx/resolver.conf;
#        set $upstream_app webtop;
#        set $upstream_port 21004;
#        set $upstream_proto http;
#        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_buffering off;
    }
}

As you can see, I tried to adept the config from lsio recommendations, but clearly, I am doing something wrong.
Any help much appreciated! Thank you in advance.

Your proxy is likely to be blocking websockets.
Our SWAG solution does manage this automatically if you’re using that, if not, you’ll have to look into our proxy.conf files.

Thank you, j=nnymoe.
I added

# WebSocket support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

into the location, and now it seems to run fine.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.