Shulchan Aruch Chapter 248: The Law Regarding Departing on a Boat and Going Out on a Carivan on The Sabbath (4 Paragraphs)
Note: REMA in brackets [ ]
1. It is permitted to depart on a boat even on Friday if one is traveling for a Mitzvah as long as he makes a deal with the crew that they will rest on the Sabbath. If afterwards they do not rest then it does not matter. However, for voluntary travel one may not go out on a boat less than 3 days before the Sabbath. [But earlier than three days is allowed even on a boat that travels through animal labor even if the water is not higher than 10 handbreaths and even in a place that the Jew must do work on the Sabbath in order to make the boat travel.] If it is a small journey such as from Tzur to Tzidone that is only one day travel then it is permitted to set out on Friday morning; since it is possible to reach the destination before the Sabbath. In a place where the custom is to never set out on the eve of Sabbath at all then one may not do so, even for a small journey.
2. The reason why we do not depart on a boat less than three days before the Sabbath is because of Oneg Shabbat (the delight of Sabbath); since the first three days of the journey involves a lot of anguish and disorientation. This only applies to journeys on saltwater seas. However, with regard to rivers there is no anguish to be confused with by them, therefore it is permitted to start traveling on rivers even on Friday. This applies where it is not known to us whether there exists 10 handbreaths  of water depth. In a place where we know that from the bottom of the boat to the bottom of the river is less than 10 handbreaths, then it is forbidden [to go outside the boundary] because of the prohibition against going outside the boundary on the Sabbath. [In a boat that requires the Jew to do work on the Sabbath it is forbidden to enter 3 days before the Sabbath even in flowing rivers over 10 handbreaths. What the animals push the boats from the shore is not forbidden. That is not similar to traveling in a wagon which is forbidden.]
3. The case stated above that is permitted to set sail on Friday is if he entered to boat on Friday and negotiated that they are to rest on the Sabbath. Even if they (break the deal and) set sail on the Sabbath it is permitted so long as he does not exit the boat from the time that he negotiated that they rest. [Some say that it is even permitted to exit the boat on Friday after he purchased that they rest and afterwards enter the boat on Saturday and sail. There are those who make Kiddush (Friday night) on the boat and afterwards return to their home for lodging and later return to the boat and set sail. So is our custom in a few places and one should not protest. See later 339, 401.
4. Those who set out on a caravan in the desert, everyone is aware that they must violate the Sabbath because of the danger involved and they are not able to hold back (from the caravan) and rest on the Sabbath by themselves. Such individuals are prohibited from departing three days before the Sabbath. On Sunday, Monday and Tuesday they are permitted to depart. If afterwards there develops a danger and they must violate the Sabbath because of the threat to life then it is permitted and there is no violation here. When traveling to the Holy Land, if he has reason to fear he may even depart on Friday since it is for a Mitzvah. However, he must make a deal with them to rest on Saturday. If after the are already in the desert and to not want to rest with him, then he is permitted to travel with them despite going outside of the Sabbath boundary because of the danger to life. If they arrive at a city on the Sabbath he may walk through the entire city. If he wishes to enter the city is is permitted since it is for a Mitzvah and he has 2,000 cubits  in every direction. [There are those who say that in any situation where a person travels for trade or to see a prominant friend it is all considered for a Mitzvah and it is not considered a D'var R'shut (casual) except when he is going touring. Therefore our custom in some places is to be lenient with regard to sailing and caravan traveling within 30 days since everything is considered for a Mitzvah. We do not protest since they have whom to rely upon.
 A handbreath is either 3 inches or 4 inches based on most authorities.
 A cubit is either 18 inches or 24 inches based on most authorities. I think 18 inches in the correct opinion.
Translated by Jay Dinovitser 10/2012 all rights reserved