Keelung's central sights are compact enough that walking is the main mode of transport. The train station, harbour, Miaokou Night Market, and Zhuputan Temple are all within ten to fifteen minutes on foot of each other. The hills above the harbour — Zhongzheng Park, Ershawan Battery, the Sino-French Memorial — require some uphill effort but are reachable without transport if you are fit and the weather is cooperative.
By bus: Keelung has a city bus network that connects the centre to outlying sights including Xiandongyuan Fairy Cave (bus 301 on the Taibaili route). Buses are inexpensive and reliable, though schedules can be confusing without Chinese-language literacy. Google Maps works well for navigation here.
By taxi: Taxis are available and reasonably priced by Taiwanese standards. They are useful for reaching the hilltop battery or the memorial park without the climb. Drivers may not speak English — have your destination written in Chinese characters.
By scooter: Rental scooters are available in the city. Useful if you plan to explore the northeast coast along Route 2, which connects Keelung to Ruifang, Jiufen, and Fulong. A valid international driving permit is required.
The harbour area and city centre are flat and pedestrian-friendly. The hills are steep in places, so decent shoes matter.