  We provide the modified TOV equations for the hydrostatic equilibrium of
charged compact stars within the metric $f(R)$ gravitational background. We
adopt the MIT bag model EoS for the dense matter and assume a charge
distribution where the electric charge density $\rho_{\rm ch}$ is proportional
to the standard energy density $\rho$. Using the Starobinsky model, we explore
the role of the $\alpha R^2$ term, where $\alpha$ is a free constant and $R$
the Ricci scalar, on the global properties of charged stars such as radius,
mass and total charge. We present the dependence of the structure of the star
for several values of $\alpha$ and for different values of the constant
parameter $\beta\equiv \rho_{\rm ch}/\rho$. Remarkably, we find that the radius
decreases with respect to its GR value for low central densities, while the
opposite occurs in the high-central-density region. The mass measured at the
surface always decreases and the maximum-total charge undergoes a substantial
increase as the parameter $\alpha$ increases. We also illustrate the variations
of the asymptotic mass as a consequence of the electric charge and the extra
quadratic term.
