I know this answer is a little off-topic since it really is pfSense configuration, but since @gtj has already posted here, and I have knowledge to share, there is no sense in having the two of us migrate this to the pfSense forums just yet, although we can if we need to delve deeper into it.
Configuring your DNS so that your ownCloud is accessible at the same host name from both the LAN and the public internet should solve your problem. If you are on a dynamic IP you have two distinct problems to solve. The good news is that you can solve both of them with pfSense.
The first problem you have is to keep a public DNS record updated with your dynamic IP when it changes. See the Dynamic DNS section of the pfSense Documentation for details on setting that up. You will then use that hostname in your ownCloud client on your mobile device.
That leaves you with one more problem which can also be solved in pfSense, as long as you are using it as your DNS resolver on your LAN. The solution to your problem for LAN access is to essentially create a split DNS record for the public hostname.
In the General Settings of the DNS Resolver Service in your pfSense you will see a Host Overrides section where you can configure an entry for your ownCloud server. Be sure to use the public hostname and domain provided by your DDNS service provider and the local IP of your ownCloud server. If you have a simple network, that should be all that you need to do.
The best part about having this setup is that you could configure Let’s Encrypt on your ownCloud server, and the certificate will work just fine on both on the public internet, and on your LAN. Depending on how your port forwarding is set up, you may need to reconfigure some things to get that working, but that’s a separate topic you can address after you get your current situation resolved.
I hope this helps, and good luck!