Open for contact outside the home

Is brand new to this. I installed HA on an Rpi Zerow that I had lying around to test how this program works.
Have tried looking at youtube and read how to access HA outside the home. I’ve downloaded duck dns. But when I read, many people write in configuration.yaml that you have to fill in a password to secure my connection. Or is there a newer guide on how to do with security and open gates.