Keelung is about a thirty minute ride from Taipei by either freeway bus or train. Both means of transport are very frequent, and stops for Keelung bound buses are located all across the city.
Probably the easiest way to get to Keelung from Taipei is by commuter train, which ply the route every 15 to 20 minutes. Travelers heading to Keelung should be aware that although the city lies on the extreme north end of the main Western Line it is not accessible on all trains running north, many of which are bound for the east coast and will not pass through Keelung. Only take trains with Keelung as their final destination or you may accidentally find yourself in Taitung - a six hour journey from Keelung!
Several companies operate buses between Keelung and Taipei,and the journey can range from between 30 minutes to two hours depending upon the route taken and traffic conditions. Because of the large number of bus routes and stops, the high potential for delay, and the limited English ability of most drivers, taking a bus from Taipei to Keelung is probably not a good idea. Unless you are familiar with Taiwan and can speak some Chinese, it is wiser to take a train.
Keelung is one of the world's largest ports. A ferry takes passengers between Keelung and Okinawa , Japan . Regular ferries to the outlying islands of Kinmen and Matsu are also available, though they are used mostly by military personnel.