The Ostbahn was founded as the private Raaber Bahn (or Wien-Raaber-Eisenbahn).
The line from Vienna to Bruck an der Leitha was constructed between 1840 and 1846.
It was extended to Győr (German Raab) in 1855 and later to Budapest.
Later it merged with another private railway company, the Staatseisenbahngesellschaft, which operated the line from Vienna to Pressburg (now Bratislava), and the line via Mistelbach and Laa an der Thaya to Brno.
The Vienna East Station from which the lines operated had been destroyed in World War II and was merged with the nearby Vienna South Station during reconstruction.