Melbourne has a long history of railway building . The city 's first railway opened in 1854 , when in 1834 the city itself did not exist . Melbourne 's first railway line opened in 1854 , when only 20 years earlier Melbourne itself did not exist .