[solved] Can’t login to Syncthing GUI with Ngnix Proxy Manager
Edit: Solution is in Nginx I disabled these: Cache Assets, Block Common Exploits, Websockets Support.
I can login using the local IP 192.168.1.2:9101, but when I route that with Nginx, It won't.
I have the GUI listen address as : 0.0.0.0:9101
I've been googling for hours but I can't find anything, In browser console it says
Failed to load resource: the server responded with a status of 403 ()
syncthing.my.domain.com/:1 Refused to execute script from 'https://syncthing.my.domain.com/meta.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
I'm a bit confused about those ports (9000 and 9101) because afaik Syncthing only listens on 8384 (GUI) and 22000 (transfers).
I'm using it with NPM as well and I haven't needed to do anything special to access the GUI through NPM beyond pointing NPM at the syncthing address and port (which, again, I used 8384).
Please note that 22000 is unrelated to the GUI, that needs to be handled as a stream. It's not HTTP so you won't be able to do domain routing with it. You can add it as a stream host in NPM but it will use the IP/name of the machine/container that NPM runs on.
I currently expose 22000 to Tailscale through the tailnet IP/name. But you only need to define that in the other syncthing clients anyway, shouldn't impact using the GUI.
In GUI you can change the port of the GUI and that's what I did, so I can right now actually access it using 192.168.1.2:9101 and it works. Do you have NPM configured in anyway other than pointing? have you made any changes in Syncthing itself to give it a domain name or an address?
I tried to add what's in the docs.syncthing using the GUI but it failed, I wasn't sure if I should modify something inside the ngnix docker container or not.
My npm has web sockets enabled and blocking common exploits.
Just checked syncthing and it's set to 0.0.0.0:8384 internally but that shouldn't matter if you changed the port.
When Syncthing is set to listen on 0.0.0.0, it means it's listening on all available network interfaces on the device. This allows it to accept connections from any IP address on the network, rather than just the local interface. Essentially, it makes Syncthing accessible from any device within the network.
Just make sure you open those firewall ports on the server syncthing is running on.
Btw the syncthing protocol utilizes port 22000 tcp and udp. Udp utilizing a type of quic if you let it.
So it's a good idea to allow udp and tcp on 22000 if you have a firewall configured on the syncthing server.
Edit
Wording for firewall ports and the purpose of 0.0.0.0
I have it set to 0.0.0.0, and I can access it from another pc using the ip:port address. But when I try to access using the domain name it shows the login page but I can't login, it just refresh the page and I can see the error above in the logs.