All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
If you are traveling around the world on a ship and your family is not with you, as is clear from the question, then you are considered a traveler and you are permitted to take the concessions of a traveler, such as shortening the prayer and breaking the fast (in Ramadan), and then you make up for the days in which you broke the fast when you return to your country.
If during your travel (in Ramadan), you remain in one country (or town) for a period during which you are not considered as a traveler, which is four days according to the view of the majority of the scholars, then you must fast during that period.
Allah knows best.