Access to local emoncms via iotawatt on different network

I have installed the emoncms locally on Rpi and now I want to connect a device which is located on different network. Which way I am able to provide this connectivity and what kind of setting needs to be done on both sides. I read there are some way such as using VPN or port forwarding. But, I dont know which better works with iotawatt.

Any time you open up your network you increase the chance of it being abused. Most people consider a well implemented VPN to be better than even well implemented port forwarding. Port forwarding gives direct access to the port and device to everyone on the Internet. There are people that regularly scan IP addresses for open ports, so security by obscurity is unlikely to be successful for long.

VPNs are probably not easy to set up, especially if you don’t understand networking, but it depends on what you are using for a router.

Thanks. What kind of setting needs to be done for vpn. I have to install the vpn server on Rpi and some setting on the modem close to the device. But, what about vpn client. Can iotawatt support it?

Iotawatt doesn’t need to do anything. A VPN allows access to your internal network for a device/network outside of it. This article explains a little about what they are: https://www.howtogeek.com/221001/how-to-set-up-your-own-home-vpn-server/

But, I will caution you to learn a LOT more about the security implications of what you are asking. Unless you have a blatant disregard for the threats, opening holes into your network needs to be done very thoughtfully.

Nothing a simple firewall rule won’t solve.

You can setup an access password as well. If access is via port forwarding, you can set it to require the password only through the port forward.