The effect of the ion temperature on ion acoustic solitary waves in a collisionless relativistic plasma is discussed using the Korteweg–de Vries equation. The phase velocity of the ion acoustic waves decreases as the relativistic effect increases, and increases as the ion temperature increases. Only a compressional soliton of the ion acoustic wave is formed in this system. Since its amplitude increases for the lower ion temperature as the relativistic effect increases, we deduce the formation of a precursor by the presence of the streaming ions. In contrast, for the higher ion temperature, the amplitude decreases slowly. Furthermore, it is shown that the oscillatory solution of the Korteweg–de Vries equation smoothly links with the nonlinear Schrödinger equation in a relativistic plasma.