The next generation of shipping industry, namely Shipping 4.0 will integrate advanced automation and digitization technologies towards revolutionizing the maritime industry. As conventional maintenance practices are often inefficient, costly, and unable to cope with unexpected failures, leading to operational disruptions and safety risks, the need for efficient predictive maintenance (PdM), relying on machine learning (ML) algorithms is of paramount importance. Still, the exchange of training data might raise privacy concerns of the involved stakeholders. Towards this end, federated learning (FL), a decentralized ML approach, enables collaborative model training across multiple distributed edge devices, such as on-board sensors and unmanned vessels and vehicles. In this work, we explore the integration of FL into PdM to support Shipping 4.0 applications, by using real datasets from the maritime sector. More specifically, we present the main FL principles, the proposed workflow and then, we evaluate and compare various FL algorithms in three maritime use cases, i.e. regression to predict the naval propulsion gas turbine (GT) measures, classification to predict the ship engine condition, and time-series regression to predict ship fuel consumption. The efficiency of the proposed FL-based PdM highlights its ability to improve maintenance decision-making, reduce downtime in the shipping industry, and enhance the operational efficiency of shipping fleets. The findings of this study support the advancement of PdM methodologies in Shipping 4.0, providing valuable insights for maritime stakeholders to adopt FL, as a viable and privacy-preserving solution, facilitating model sharing in the shipping industry and fostering collaboration opportunities among them.