Jebber just beat me to it! Passports did exist in the 1800s but these were generally used by diplomats, merchants and suchlike. Ordinary people generally could come and go as they wished, and it wasn't until WW1 that restrictions on movement were imposed.