Most visitors to Pamplona want to go during the San Fermin Festival, eight days of street parties, bullfighting and the morning bull runs that encourage brave Spaniards and drunk tourists to run in front of a pack of angry bovines. But accommodation can be hard to come by at this time of year, so you might want to consider staying in San Sebastian and traveling over to see the festival.
But bear in mind that the bull runs are very early in the morning, at 8 AM. So unless you have your own car, you'll need to check if there is public transport at the right time to get to the festival.
If you don't want to get up so late, consider staying up late instead. There is partying all night throughout the festival - most people who watch (or run) the bull runs haven't slept.
See also: How to Spend 3 Days in San Sebastian
Note: these times and prices are subject to change and are intended as guidance only. Please check the websites for current prices and timetables.
Also be aware that the Basque language word for San Sebastian is 'Donostia'. You may see both on timetables, or just one. If you plan your trip far enough in advance, you can get reasonably priced accommodation in Pamplona.
Alternatives to Staying in San Sebastian
San Sebastian is a great city and should definitely be on your itinerary when in this part of the country. But there are other options for staying close to Pamplona during the festival.
Note that trains rarely leave in the middle of the night from anywhere near to Pamplona. If you want to travel overnight to save on accommodation and arrive in time for the festival, you'll need to consider traveling from further afield, such as Madrid or Barcelona. But really, you'll be missing the true party experience of San Fermin.
San Sebastian to Pamplona by Train
The train from San Sebastian to Pamplona takes under two hours. There is no morning train that arrives before the bull runs, so you'll need to stay overnight to see the bull runs. There are only two trains a day, costing around 25 euros.
San Sebastian to Pamplona by Bus
The bus from San Sebastian to Pamplona takes just over one hour and costs under eight euros. They run throughout the day, but, unfortunately, the first one of the day arrives just after the bull run. Book Bus Tickets in Spain
San Sebastian to Pamplona by Car
The 80km journey can be covered in just over one hour, traveling mainly on the A15 road. Compare Car Rental Rates in Spain