Port facilities have to be organized as microgrids to pursue an efficient electrical utilization based on the four "1"-pillars in the sustainable energy use: levelled, less, local, load (lele-lolo). This paper deals with the special case of STS cranes characterized by high power peaks and a low load factor that require an over-sized electrical network and cause high costs because electrical utilities charge greatly the power peaks. For these reasons, this paper discusses a comprehensive peak shaving solution that implements the coordination of cranes' duty cycles with a power optimization tool and, as energy storage systems, both ultracapacitors and flywheels, allowing the port operator to optimize their power demand, as well as their network design. The suggested "hybrid" solution combines, on the board of each crane, an adequate number of ultracapacitors and in the shore transformer substation, flywheel's modules operating on the simultaneous behavior of the cranes group.