God doesn't just command Joshua to be strong and courageous, he gives him good reasons to be brave - God's faithful to his promises, God's determination to fulfil his purposes; and God's presence with His people. God calls us to align our lives with His purposes and to have the same courage, looking to The Leader that He's appointed - the Lord Jesus Christ.
Check out this video to get the back story and overview of Joshua.
1 After the death of Moses the servant of the Lord, the Lord said to Joshua son of Nun, Moses’ aide: 2 “Moses my servant is dead. Now then, you and all these people, get ready to cross the Jordan River into the land I am about to give to them—to the Israelites. 3 I will give you every place where you set your foot, as I promised Moses. 4 Your territory will extend from the desert to Lebanon, and from the great river, the Euphrates—all the Hittite country—to the Mediterranean Sea in the west. 5 No one will be able to stand against you all the days of your life. As I was with Moses, so I will be with you; I will never leave you nor forsake you. 6 Be strong and courageous, because you will lead these people to inherit the land I swore to their ancestors to give them.
7 “Be strong and very courageous. Be careful to obey all the law my servant Moses gave you; do not turn from it to the right or to the left, that you may be successful wherever you go. 8 Keep this Book of the Law always on your lips;meditate on it day and night, so that you may be careful to do everything written in it. Then you will be prosperous and successful. 9 Have I not commanded you? Be strong and courageous. Do not be afraid; do not be discouraged, for the Lord your God will be with you wherever you go.”
10 So Joshua ordered the officers of the people: 11 “Go through the camp and tell the people, ‘Get your provisions ready. Three days from now you will cross the Jordan here to go in and take possession of the land the Lord your God is giving you for your own.’”
12 But to the Reubenites, the Gadites and the half-tribe of Manasseh, Joshua said,13 “Remember the command that Moses the servant of the Lord gave you after he said, ‘The Lord your God will give you rest by giving you this land.’ 14 Your wives,your children and your livestock may stay in the land that Moses gave you east of the Jordan, but all your fighting men, ready for battle, must cross over ahead of your fellow Israelites. You are to help them 15 until the Lord gives them rest, as he has done for you, and until they too have taken possession of the land the Lordyour God is giving them. After that, you may go back and occupy your own land, which Moses the servant of the Lord gave you east of the Jordan toward the sunrise.”
16 Then they answered Joshua, “Whatever you have commanded us we will do, and wherever you send us we will go. 17 Just as we fully obeyed Moses, so we will obey you. Only may the Lord your God be with you as he was with Moses.18 Whoever rebels against your word and does not obey it, whatever you may command them, will be put to death. Only be strong and courageous!”