I can connect to my Pi via Octopi.local while I am at the office but not able when at home

I have a Pi 4 B with a fisheye camera. Everything works fine while I am at the office. I can control the printer and its settings. The problem is when I go back home, I can't open Octopi.local. I have a VPN for the office in order to connect to the server.

I am new to this procedure and I don't know what the problem might be.

At home I have a BT broadband connection with the typical BT router. I am trying to connect to my Pi 4 B and Creality CR 10 V3 printer. The Pi is connected via Wi-Fi. Windows and Mac while at home, no luck though.

Thank you very much in advance.

Maybe your running Bonjour at work or you have an entry in hosts?

If you connect to octopi.local (at work), then Bonjour is being used (unless the work domain is .local which I doubt). The RPi most likely obtained its IP address via DHCP and if the DHCP server communicates with the work DNS server, then the RPi should be available as
octopi.<work domain name>.

At home the VPN would typically be configured to resolve names and route traffic to *.<work domain name> through the VPN, and all other *.<random domain names> normally. Another typical VPN configuration routes all traffic and DNS queries through the VPN. In either case, *.local isn't resolvable using DNS.

If octopi.<work domain name> doesn't work, an alternate solution is to determine the IP address of the RPi and just use that both at work and at home.

Thank you very much.

The didn't work but the IP works. I was able to connect via the IP of the Raspberry.