© 2021 IEEE.Greenhouse gas (GHG) emissions have recently been considered as a vital negative issue for the environment and human health. Accordingly, studies are being carried out in many areas to reduce GHG emissions, and one of the important areas is the transportation applications, especially the maritime systems. In this study, an energy management approach for a port serving fuel cell/battery hybrid ferries is modelled. In addition to the grid, the resources supplying the port include wind and solar power systems as renewable energy sources and there is a bi-directional power flow between the port and the grid. In addition to these power sources, each ferry can meet the power needs during the berthed-in mode at the port by its own fuel cell and battery systems together with the power support of the port. The proposed energy management algorithm aims to minimize the cost by regarding the energy transactions of the port with the grid. The proposed algorithm is modelled and solved by using Python.