The oblique propagation of the quantum electrostatic solitary waves in magnetized relativistic quantum plasma is investigated using the quantum hydrodynamic equations. The plasma consists of dynamic relativistic degenerate electrons and positrons and a weakly relativistic ion beam. The Zakharov‐Kuznetsov equation is derived using the standard reductive perturbation technique that admits an obliquely propagating soliton solution. It is found that two types of quantum acoustic modes, that is, a slow acoustic mode and fast acoustic mode, could be propagated in our plasma model. The parameter that determines the nature of soliton, that is, compressive or rarefactive soliton, for slow mode is investigated. Our numerical results show that for the slow mode, the determining parameter is ion beam velocity in the case of relativistic degenerate electrons. We also have examined the effects of plasma parameters (like the beam velocity, the density ratio of positron to electron, the relativistic factor, and the propagation angle) on the characteristics of solitary waves.