Exodus 13:17-22

17 When Pharaoh let the people go, God didn't lead them on the road through Philistine territory, although that was the shortest route. God said, "If they see that they have to fight a war, they may change their minds and go back to Egypt."
18 So God led the people around the other way, on the road through the desert toward the Red Sea. The Israelites were ready for battle when they left Egypt.
19 Moses took the bones of Joseph with him, because Joseph had made the Israelites solemnly swear to do this. Joseph had said, "God will definitely come to help you. When he does, take my bones with you."
20 They moved from Succoth and camped at Etham, on the edge of the desert.
21 By day the LORD went ahead of them in a column of smoke to lead them on their way. By night he went ahead of them in a column of fire to give them light so that they could travel by day or by night.
22 The column of smoke was always in front of the people during the day. The column of fire was always there at night.