nurdism / neko

A self hosted virtual browser (rabb.it clone) that runs in docker.
Apache License 2.0
2.03k stars 185 forks source link

How to use neko behind a reverse proxy? #18

Closed sebastianwachter closed 4 years ago

sebastianwachter commented 4 years ago

Hello I am using traefik as a reverse proxy. I start the container on my server using this configuration:

[...]
  environment:
    - NEKO_WIDTH=1280
    - NEKO_HEIGHT=720
    - NEKO_PASSWORD=password
  labels:
    - "traefik.enable=true"
    - "traefik.http.routers.neko.rule=Host(`neko.domain.tld`)"
    - "traefik.http.routers.neko.tls.certresolver=staging"
    - "traefik.http.routers.neko.entrypoints=websecure"
    - "traefik.http.services.neko.loadbalancer.server.port=8080"
    - "traefik.docker.network=proxy"
[...]

As I try to log in using the password I get an error tellting me "unable to connect to server". Inspecting the network traffic in the developer tools I saw the /ws route and also added it to the label configuration:

    - "traefik.http.routers.neko-websocket.rule=Host(`neko.domain.tld`) && Path(`/ws`)"

But it still does not let me log in to neko (gives the same error).

I think there are still ports missing in the configuration of my neko compose file.

zikeji commented 4 years ago

The error is unrelated to the reverse proxy. Try loading it on a mobile phone. I'm using the same setup and can't run the site on my browser but I can run it on mobile. Basically the same thing as #15 .

sebastianwachter commented 4 years ago

Okay I tried it again on the server and this time it worked on my laptop and on my mobile phone but not on my iPad.

But you are right its pretty much the same thing as #15 and therefore I close this issue and watch that one for now.