Getting around Morocco by train as a solo traveller: Routes + Travel Tips + Safety Advice
If you’re travelling solo in Morocco and exploring the north of the country, chances are, you’ll end up taking a train at some point during your trip. Trains are the most convenient way of getting between big cities like Casablanca, Marrakech and Fes, as well as Tangier in the far northwest.
Moroccan trains generally run on time, are quiet and clean, and have luggage racks at both ends of the carriages – convenient if you’re travelling with large bags. Some of the railway stations are also really impressive, both architecturally and in terms of the facilities they offer to passengers.
That being said, the railway network in southern Morocco is relatively lacking…at this point in time anyway. So if you’re heading to places like Agadir, Essaouira or the Sahara Desert, you’ll need to rely on buses to get around. A railway line connecting Marrakech to Agadir is in the planning phase and when it is complete, it will facilitate the high-speed Al Boraq.
Discover everything you need to know about getting around Morocco by bus as a solo traveller here.
If you haven’t heard of the Al Boraq, this is Africa’s first high-speed rail service, which whisks passengers from Tangier to Casablanca in just over two hours. Travelling on the Al Boraq is a highlight of travelling in Morocco, with speeds exceeding 300 kilometres per hour. I recently took it from Rabat to Tangier, and if you’re traveling in northern Morocco, I highly recommend planning your trip around it.
In this article, I’ll explain everything you need to know about getting around Morocco by train as a solo traveller, from buying tickets to finding timetables and booking overnight “couchettes”.
Trying to decide between a group tour and independent travel in Morocco? Discover the pros and cons of each option here.

Disclosure: This article contains affiliate links, meaning I earn a small commission when you make a purchase. Affiliate links cost you nothing and ensure my content stays free!
Key Takeaways
ONCF is Morocco’s national railway company, operating both Al Atlas and high-speed Al Boraq trains
Trains are the best way to get around Morocco’s north – the rail network only extends as far south as Marrakech
First-class and second-class tickets are available, although there isn’t a huge difference between the two
Tickets can be purchased at the station, via the ONCF website or using third-party transport aggregators like 12Go
Security personnel and police regularly patrol carriages to ensure the safety of passengers
Train ticket prices in Morocco are quite affordable, making them a great choice for budget-conscious solo travellers
Purchasing tickets for trains in Morocco
Morocco’s rail network is run by the Moroccan National Railways (ONCF) and includes regular long-distance trains (branded as Al Atlas) as well as the high-speed Al Boraq line. ONCF has a website specifically for passenger bookings, ONCF Voyages. In theory, buying train tickets in Morocco online should be relatively simple.
In reality, though, I always have SO MUCH trouble getting the ONCF website to work properly – either the site won’t load at all or it will crash/stall partway through the booking process. Based on feedback from other travellers, I know I’m not the only one experiencing this issue!
At this point in time, I’ve given up on using the ONCF website to book my Morocco train tickets and instead use a third-party booking site like 12Go. It lists all the train departures available on your chosen route and allows you to book tickets directly through the site, whether you want a first-class or a second-class ticket.
If I’m near a railway station (known locally as gares) and it’s not too much of a hassle, I’ll go there in person to buy my ticket. The staff are always helpful, even if we sometimes run into language barriers. If you purchase your Morocco train tickets at the station, they’ll give you paper tickets, so you don’t have to worry about downloading an e-ticket.
Top Tip:
If you’re travelling during major celebrations like Eid al-Adha and Eid al-Fitr (at the end of Ramadan) it’s best to book your Morocco train tickets in advance. A lot of Moroccans are on the move in the days leading up to and immediately after these festivals, heading to visit family and friends over the holiday period.
On other days, however, you can usually buy your ticket the day before or even on the day of travel (depending on availability). If you’re doing it on the day, I’d recommend turning up at the station at least half an hour before the scheduled departure, just in case there is a queue at the ticket office.
Al Atlas and Al Boraq trains have reserved seats (and limited tickets), while the few remaining Classic Express trains don’t accept seat reservations. Seats are available on a first-come, first-served basis, with standing room for the rest. This means they don’t sell out like the Al Atlas and Al Boraq trains do.

Moroccan train ticket costs
Train travel in Morocco is relatively affordable (at least compared to European rail travel) and only slightly more expensive than taking the bus. For example, a train ticket from Casablanca to Fes costs around €22 while an overnight train ticket from Tangier to Marrakech is around €35.
Fares for the Al Boraq and Al Atlas trains now have variable pricing, offering cheaper “saver” tickets (these are non-refundable and non-changeable) and more expensive “flexible” tickets. The latter can be changed or cancelled, although fees may apply.
If you’re travelling to Morocco solo on a budget, I’d recommend buying your tickets as early as possible to get the cheapest fares.
Keep in mind, only e-tickets can be changed or cancelled online. If you bought your ticket at the station, you will need to make any changes at the station.
Before buying train tickets in Morocco, either at the station or online, always check the booking terms. Some third-party resellers may have their own terms and conditions, in addition to those imposed by ONCF.
Some Morocco train tickets can be changed up to a few minutes before departure. So if you find that the date or time you have chosen is not suitable, you can adjust it later on.
For a rough idea of train ticket costs in Morocco, second-class Al Boraq fares from Casablanca to Tangier start from around €35 (early saver ticket), while the same journey on Al Atlas is around €30. For first-class tickets on the Al Boraq, expect to pay at least €50 for an early saver ticket and more than €75 if you buy your ticket closer to the departure date.
When buying Moroccan train tickets at the station, you can pay with either cash or a credit/debit card. Online purchases via ONCF or 12Go can be done using international credit/debit cards.

First-class vs second-class train tickets in Morocco
In my opinion, there isn’t a huge difference between first and second-class train tickets in Morocco. It really depends on how much more you’re willing to pay for a little more comfort.
First-class carriages are usually less crowded, with slightly more space, wider seats and power sockets to charge your devices. Second class, on the other hand, can be more crowded and may not be as quiet. But in my experience, passengers generally keep their voices low when riding trains in Morocco.
Second-class tickets are definitely more affordable, making them perfect for solo travellers exploring Morocco on a budget. Both classes have carts selling tea and coffee, as well as a variety of sandwiches and snacks, and toilet facilities are available.
If you’re traveling on the Al Boraq or Al Atlas trains, you’ll have an assigned seat no matter which class of ticket you purchase. On the trains connecting Rabat and Casablanca, second-class tickets are unreserved, so you won’t be guaranteed a seat.
One major difference between first and second-class train tickets in Morocco is the Al Boraq lounges, which are available to any traveller holding a first-class Al Boraq ticket. These lounges (just like airport lounges) are available at Tangier, Kenitra, Rabat Agdal and Casablanca Voyageurs railway stations.
I haven’t been inside but apparently, there are complimentary drinks and tables where you can work while waiting for your train. This may be beneficial for digital nomads who want a quiet place to work or if you need to arrive at the station well before your departure time.

Travelling by sleeper trains in Morocco
If you’re travelling from Tangier to Marrakech (or vice versa), there is a night train that runs daily from each city. It’s a convenient option if you’re short on time and want to save yourself a travel day, as well as the cost of overnight accommodation.
That being said, you will miss out on seeing some wonderful scenery along the way as it’s dark for most of the journey. And for some solo travellers, spending a night alone on a train in a foreign country may not feel like the safest choice.
While there are no private berths on Morocco’s overnight trains, there are sleeper cars known as “couchettes”. These come with four bunk beds, which can be single-sex or mixed-sex, depending on your preference. Bedding is provided, including pillows, sheets and light blankets, and there are fans to help with air circulation. For added privacy and security, the doors can be locked from the inside.
Morocco’s overnight trains depart Tangier at 23:45 and arrive in Marrakech at around 9:00 or depart Marrakech at 21:30 and arrive in Tangier at around 7:00. This train is classed as a “slow train” and it stops at roughly six stations along the way.
Top Tip:
While there’s only one overnight service from Tangier to Marrakech (one in each direction), it’s possible to travel this route during the day if you get up early. After taking the Al Boraq from Tangier to Casablanca, you can switch to the Al Atlas service, which will take you the rest of the way to Marrakech.
The best way to buy Morocco overnight train tickets is in person at the train station, as they want to see your passport. If this is not convenient and you need to book in advance (perhaps from overseas), you can do so through the Marrakech Tickets website. Keep in mind that Morocco’s overnight train sleepers can sell out, so it’s best to book in advance if possible.

Finding timetables for Moroccan trains online
If you can get the ONCF website to work properly, you’ll find timetables for all routes there. Simply input your departure and arrival destinations and the date of travel and it will show you all available options. Be sure to select only one passenger if you’re travelling solo.
If the ONCF website doesn’t work for you, you can search for your preferred route at 12Go – it shows all available departures throughout the day. Just make sure you filter the search results on 12Go to show only trains, unless you’re willing to consider other transport options, such as buses and private transfers.
Trains on popular routes run frequently, with hourly services between Rabat and Casablanca and between Casablanca and Fes.
Results at 12Go don’t necessarily indicate Al Boraq trains but they will usually say “fastest” above the search result if it is. You can also tell Al Boraq trains by the duration, which is always listed as part of 12Go search results. As an example, the journey from Rabat to Tangier by Al Boraq is just one hour and 20 minutes.
FAQs about travelling solo in Morocco by train
Can you travel Morocco by train?
Morocco has a well-developed rail network that enables you to explore much of the country with ease. National rail operator ONCF has a fleet of comfortable, modern trains that connect major cities including Casablanca, Rabat, Fes, Marrakech and Tangier.
However, the rail network is mainly limited to northern Morocco and does not extend to the desert regions of the south or the small towns in the Atlas Mountains. To reach these areas or the coastal cities of Agadir and Essaouira in the south, you will need to take a bus or private transport.
Is it safe to take a train in Morocco as a solo traveller?
Taking the train in Morocco is generally a safe and comfortable way to explore the country, even for solo travellers. Different classes of service are available, including first and second class, so you can choose the option you prefer.
There is a strong security presence on trains in Morocco, with police and train staff regularly patrolling the carriages to ensure the safety of passengers. If someone makes you feel uncomfortable on the train, let the security personnel or a fellow passenger know.
Petty theft can occur in any country, so it is wise to keep your valuables safe – don’t leave them in the luggage storage area! As a solo traveller, you should always be aware of your surroundings, especially in busy train stations where there are a lot of people.
What is the difference between first-class and second-class trains in Morocco?
There isn’t a huge difference between first and second-class train tickets in Morocco. First-class carriages are usually less crowded, offer more space and wider seats, and have access to power sockets for charging devices.
Second-class carriages can be slightly more crowded, but fares are considerably cheaper. Both classes have carts selling tea, coffee, sandwiches and snacks, and toilet facilities are available.
If you travel on Al Boraq or Al Atlas trains, you will have a reserved seat, regardless of your ticket type. On the trains connecting Rabat and Casablanca, second-class tickets are unreserved, meaning you are not guaranteed a seat.
One major difference between the two classes is the Al Boraq lounge, which is only accessible to first-class Al Boraq ticket holders. These lounges offer free drinks and workspaces and are located at Tangier Ville, Kenitra, Rabat Agdal and Casablanca Voyagerus train stations.
Are there sleeper trains in Morocco?
Yes, there are overnight trains in Morocco between Tangier and Marrakech, with one sleeper service each night in both directions. The train departs Tangier at 11:45 pm and is expected to arrive in Marrakech at 9:00 am. In the opposite direction, it departs Marrakech at 9:30 pm and is expected to arrive in Tangier at 7:00 am.
While there are no private berths on Morocco’s overnight trains, you can find sleeper cars (“couchettes”) with four upper and lower berths. These cars can be booked for single-sex or mixed-sex groups, and have shared bathrooms. Each berth has a pillow, sheet and light blanket, and there are fans to keep the air circulating.
Is there a bullet train from Marrakech to Casablanca?
No, the high-speed Al Boraq train currently stretches from Casablanca to Tangier, passing through Rabat Agdal and Kenitra along the way. Although there are plans to extend the line to Marrakech, it is not currently open to passengers.