Large container ships or aircraft carriers can stay at dock and just have all entrances sealed off. They are strong, less likely to get hit by waves, and retain safety without having to be stuck in the middle of the ocean.
The most important factor, like any Base, is having the right amount of survivors with you. That can maintain the ship and keep it well defended.
Large ships can have many lifeboats, just in case the ship becomes overrun and a quick getaway is needed. Aside from that, aircraft carriers are designed, as the name suggests, to carry aircraft, which can function as transport.