www.edr.gov.et is the official website to buy your train tickets in Djibouti.
Djibouti has a modern railway connection primarily designed to link Ethiopia with the Port of Djibouti via the Addis Ababa–Djibouti Railway. This electrified standard-gauge railway is used for both freight and limited passenger services. The passenger trains, which run infrequently, connect Dire Dawa in Ethiopia to Nagad station near Djibouti City.