We present a study of the prevalence and luminosity of active galactic nuclei (AGN; traced by optical spectra) as a function of both environment and galaxy interactions. For this study, we used a sample of more than 250 000 galaxies drawn from the Sloan Digital Sky Survey and, crucially, we controlled for the effect of both stellar mass and central star formation activity. Once these two factors are taken into account, the effect of the local density of galaxies and of one-on-one interactions is minimal in both the prevalence of AGN activity and AGN luminosity. This suggests that the level of nuclear activity depends primarily on the availability of cold gas in the nuclear regions of galaxies and that secular processes can drive the AGN activity in the majority of cases. Large-scale environment and galaxy interactions only affect AGN activity in an indirect manner, by influencing the central gas supply.