Trains in Morocco are Reliable and Affordable
Be cautiously pessimistic after seeing various countries where rail service is overloaded, prohibitively expensive, or entirely unreliable (ask us about the train we took in India that was 15 hours late). However, Many people discovered that trains in Morocco operate on time and are not only comfortable but also extremely inexpensive.
A first-class train ticket from Casablanca to Fes costs only 195 Dhs ($20 USD) per person. In a 6-person cabin with plenty of legroom and storage space, you'll relax in a wide, comfy seat. You can save money by flying second class, but you will not be assigned a seat and it may be very congested.
The train station frequently has a line at the ticket counter, however they also have automated ticket machines in a variety of languages, so you don't have to wait. Even so, it's important to arrive at the station early. It provides you a little more time to buy your ticket and find a seat.