Strange Networking behind Two Routers

I moved house into a new home where my ISP provides a modem/router combo. I can’t change that and don;t want to use ISP router for my home office lan.

I have connected my Netgear Nighthawk to the ISP router (lan to wan), so I have a completely different network to the ISP router. It works mostly very well, with some notable exceptions.

I have Nextcloud and onlyoffice (or collabora - I have tried both) unning in lxd containers on an ubuntu server. I can access Nextcloud via 192.168.1.X - my second router’s LAN addresses and it works.

I can also access it via www url but ONLY if my dekstop pc is connected to the internet via a commercial VPN. There’s something odd with the routing to where it can’t quite handle lan to ISP back to isp router down to second router/lan and nextcloud. It hangs with a circle of death.

Also, I can access my onlyoffice (or collabora) server via www but only using vpn internet service, not straight from my own computer via isp.

I have DHCP turned on for both LAN networks, but I believe that’s that’s correct as I have two seperate networks (deliberately). But there is something I have not quite got right.

It’s like the ISP router can’t redirect DNS traffic to the local network correctly, I have to manually do that via lan addresses. If I go out to web via VPN then I can come back in and it works. Onlyoffice/collabora however cannot reliably connect to Nextcloud so that’s completely broken for me.

It makes it hard to use my Nextcloud because I have to use a VPN service on phone/computer, and that’s not always convenient.

Any pointers or suggestions? I run my Nextcloud and services on an ubuntu server, and I use both windows and Linux Mint on my home network for general computing.

I have a same experience.
I have a Nextgear nighthawk router behind the EE (uk) isp router. I set the netgear router as a DMZ and the same happens.
The Nginx give me back a 503 error if I try to assecc the nextcloud from local network but it’s working outside from the internet, through public IP.

In my case, I had to switch out the ISP router - it simply wasn’t capable of correctly re-routing outbound traffic back in. my ISP allowed me to switch it out for my own after I grovelled to them.

Once I put a Netgear at the front end, my problems went away. Sorry if that’s not terribly useful. I tried all kinds of things to get this to work, all failed; hence the switch, which worked straight away.

Good luck!

Sadly this solution is not workable for me.
(I’m just a tenant in the house, so I have no permission to switch the router.)

But thanks for the update.