My 3CX is hosted at OVH as a VPS. And I have 2 Analog lines that I would like to connect to the system. So my question am I able to connect a 2 port FXO gateway when my system on on a VPS offsite???
You can, but it's not supported. The easiest way to do this is to setup a site2site VPN between the VPS and your office, then add the gateway like a local LAN device to the PBX.
That depends on what you have for a firewall at the office. But typically an IPSec VPN works with almost anything. Or if not, you could install OpenVPN on a couple of machines (not the 3CX machine) and use static routes to direct traffic over it.