NextCloud Access while on VPN

Hi All,
I have a wonderful Beryl and I would like to get some assistance with a strange problem.When using a VPN connection to my home network, I am unable to connect to my nextcloud server that is on the same network.
So my VPN server is my router which is running Pfsense, my nextcloud server is sitting behind this router.
Testing both Wireguard and OpenVpn with Beryl both give me the same result, the hostname times out and nextcloud clients wont connect. So here is a break down.

No VPN Connection with Beryl = Nextcloud Works
Wireguard or OpenVpn connection with Beryl = No Nextcloud
Wireguard or OpenVpn connection with a windows host = Nextcloud Works

I can access the nextcloud server by entering the local ip e.g but this interferes with the SSL security due to nextcloud using a hostname in its SSL certificate.
VPN settings ive tried, full tunnel and split, both wont connect to nextcloud.

Any suggestions? Thanks in advance.

If I understand your network setup correctly, NetBIOS hostnames do not propagate over VPN nor across subnets.

You can try adding an entry to the client device hosts file that maps the “Nextcloud hostname” to, but that would need to be done on every client device.

Alternatively, you can try adding the same mapping on the router via LuCI → Network → Hostnames that may work across all client devices.

I do not work for and I do not have formal association with GL.iNet

This is because of some route problems. It is hard to explain simply.

Can you use vpn policy and set the vpn server’s own IP not going via vpn? It seems strange but this is what your windows do.

Another try is that, in your vpn server (PFsense) setttings, try to set data forward from vpn interface (server) to lan.

Thanks soo much for your helpful replies.
Tried all your suggestions, I couldnt get them to work.
But you both sent me in the right direction, on my router I created a DNS override to the local IP.
Now it works perfectly and hasn’t interrupted nextcloud access at home either.
Really appreciate your help.