With the rapid development of railways, sensors, signal lights and other rail‐side applications are being used to increase the safety of trains. The source of electricity for rail‐side applications remains a problem. In this study, a portable solar energy harvesting system (SEHS) is developed to supply power for rail‐side applications. The designed system can be used as a temporary or permanent power supply due to its portability. The proposed system is composed of two main parts: a solar foldable‐wings module (SFWM), and an energy storage module. The photovoltaic (PV) panels convert the solar energy into electricity, and the generated electricity is stored in supercapacitors which supply power to rail‐side applications. The Beijing–Tangshan Inter‐City Railway is selected for a case study. Theoretical analysis and simulation results show that the annual power generation of the SEHS can be up to 673,994 kWh. We conducted solar radiation simulation experiments on the proposed system in the laboratory using a solar simulator. Experiments show that the maximum output power of the proposed SEHS is 10.934 W when the prototype is loaded with 5 Ω, indicating that the proposed system would be able to supply power for rail‐side applications as a permanent power source or a temporary power source.