Bose–Einstein condensation (BEC) is a special many-boson phenomenon that was observed in atomic particles at ultra-low temperatures. Later, BEC was also shown for non-atomic bosons, such as photons. Those experiments were usually done in micron-size cavities, where the power (particle number) was varied, and not the temperature, until condensation was reached. Here we demonstrate BEC of photons in a few-meters-long one-dimensional (1D) erbium–ytterbium co-doped fiber cavity at, below and above room temperature, between 100 K and 415 K. The experiments were done at about the 1550 nm wavelength regime having a few to tens of μW intra-cavity light power (107−108 photons). By varying the power and also the temperature, we found linear dependence of the condensation on power for various temperatures and of the critical power (for condensation) on temperature. These findings agree, functionally and quantitatively, with the theoretical BEC prediction without any adjustable parameter.