Public bus from Dubrovnik to Dubrovnik (city)
There are several buses making a stop at Port Gruz. Buses N° 1A, 1B, 1C and 3 take you in 10 minutes to Pile, opposite the old town. A ticket costs 15 kN per person (one way). Given the many buses you should never wait longer than 10 minutes. The bus stop is just outside the gates of the port at Gruska Obala.
TIP: buy your ticket in advance at the counter or at a kiosk. On the bus, you pay just a little more.