I know just enough to be a danger to myself and sometimes others
Posted by Doc_Senna
It looks like you have been playing around with ugreen so hopefully you can help. I'm trying to set up custom domains for all the apps that point to an internal ip address. I'm to the point that putting in the custom domain gets me to the nas login page. I'm using a Ugreen dxp4800 pro, running system version 1.16.0.0089. The Web Portal service ports are set to 9999 for http and 9443 for https. there is an active option to redirect port 80/433 to http/https port below that, when i disable it the custom domain no longer pulls anything up. I believe the sb-nginx is also trying to listen on 80/443. Tom AI had me run sudo ss -tlnp | grep -E ':80|:443' and told me PID that returned was for the UGreen's own nginx that wasn't communicating with the sparkbox nginx. Tom Ai gave me the option to use cloudflare proxied mode to resolve it, or to kill the ugreen nginx manually (but also said it didn't recommend that). LISTEN 0 511 0.0.0.0:80 0.0.0.0: users:(("nginx",pid=1718629,fd=7),("nginx",pid=1718628,fd=7),("nginx",pid=1718627,fd=7),("nginx",pid=1718626,fd=7),("nginx",pid=1718625,fd=7),("nginx",pid=1718624,fd=7),("nginx",pid=1718623,fd=7),("nginx",pid=1718622,fd=7),("nginx",pid=2713,fd=7)) LISTEN 0 511 0.0.0.0:443 0.0.0.0: users:(("nginx",pid=1718629,fd=9),("nginx",pid=1718628,fd=9),("nginx",pid=1718627,fd=9),("nginx",pid=1718626,fd=9),("nginx",pid=1718625,fd=9),("nginx",pid=1718624,fd=9),("nginx",pid=1718623,fd=9),("nginx",pid=1718622,fd=9),("nginx",pid=2713,fd=9)) LISTEN 0 4096 0.0.0.0:8089 0.0.0.0: users:(("docker-proxy",pid=1535876,fd=4)) LISTEN 0 4096 0.0.0.0:8080 0.0.0.0: users:(("docker-proxy",pid=1534430,fd=4)) LISTEN 0 4096 0.0.0.0:8096 0.0.0.0: users:(("docker-proxy",pid=1535527,fd=4)) LISTEN 0 4096 0.0.0.0:8053 0.0.0.0: users:(("docker-proxy",pid=1537561,fd=4)) LISTEN 0 511 [::]:80 [::]: users:(("nginx",pid=1718629,fd=8),("nginx",pid=1718628,fd=8),("nginx",pid=1718627,fd=8),("nginx",pid=1718626,fd=8),("nginx",pid=1718625,fd=8),("nginx",pid=1718624,fd=8),("nginx",pid=1718623,fd=8),("nginx",pid=1718622,fd=8),("nginx",pid=2713,fd=8)) LISTEN 0 511 [::]:443 [::]: users:(("nginx",pid=1718629,fd=33),("nginx",pid=1718628,fd=33),("nginx",pid=1718627,fd=33),("nginx",pid=1718626,fd=33),("nginx",pid=1718625,fd=33),("nginx",pid=1718624,fd=33),("nginx",pid=1718623,fd=33),("nginx",pid=1718622,fd=33),("nginx",pid=2713,fd=33)) LISTEN 0 4096 [::]:8089 [::]: users:(("docker-proxy",pid=1535883,fd=4)) LISTEN 0 4096 [::]:8080 [::]: users:(("docker-proxy",pid=1534440,fd=4)) LISTEN 0 4096 [::]:8096 [::]: users:(("docker-proxy",pid=1535537,fd=4)) LISTEN 0 4096 [::]:8053 [::]: users:(("docker-proxy",pid=1537568,fd=4)) This probably falls outside the scope of getting an answer since it seems like an issue with my hardware and not on the sparkbox side. If you have time to let me know if the cloudflare proxied mode would work with an internal ip address, or if there is something I'm missing, I'd appreciate it though.
1 replies
tomspark wrote:
Good news, this is solvable and your instinct was right. The nginx holding 80 and 443 in your output is UGOS's own, not SparkBox's, which is exactly why your domains land on the NAS login page. You already did the key step (portal moved to 9999/9443). Two pieces left: First, turn OFF that "redirect 80/443" toggle so UGOS fully lets go of those ports. Second, point SparkBox's proxy at them: in /opt/sparkbox/.env set HTTPPORT=80 and HTTPSPORT=443, then run sudo sparkbox restart core. On UGREEN the installer often parks those at 8080/8444 to dodge this very clash, so with the redirect off and nothing claiming 443, nothing answers, that's your "nothing pulls up". Re-run your ss check: you want to see docker-proxy (SparkBox) on 443, not UGOS nginx. Then your domains pointed at the NAS IP will route to each app. On Cloudflare proxied mode: no, the orange-cloud proxy can't point at an internal 192.168 address, it only reaches origins it can hit from the public internet. A Cloudflare Tunnel would work, but that's for reaching apps from outside your house, more than you need for local domains.