Abstract Many gravitational phenomena that lie at the core of our understanding of the Universe have not yet been directly observed. An example in this sense is the boson star that has been proposed as an alternative to some compact objects currently interpreted as being black holes. In the weak field limit, these stars are governed by the Newton–Schrodinger equation. Here we present an optical system that, under appropriate conditions, identically reproduces such equation in two dimensions. A rotating boson star is experimentally and numerically modelled by an optical beam propagating through a medium with a positive thermal nonlinearity and is shown to oscillate in time while also stable up to relatively high densities. For higher densities, instabilities lead to an apparent breakup of the star, yet coherence across the whole structure is maintained. These results show that optical analogues can be used to shed new light on inaccessible gravitational objects.