Some animals, such as planaria, can regenerate complex anatomical structures in a process regulated by genetic and biophysical factors, but additional external inputs into regeneration remain to be uncovered. Microbial communities inhabiting metazoan organisms are important for metabolic, immune, and disease processes, but their instructive influence over host structures remains largely unexplored. Here, we show that Aquitalea sp. FJL05, an endogenous commensal bacterium of Dugesia japonica planarians, and one of the small molecules it produces, indole, can influence axial and head patterning during regeneration, leading to regeneration of permanently two-headed animals. Testing the impact of indole on planaria tissues via RNA sequencing, we find that indole alters the regenerative outcomes in planarians through changes in expression to patterning genes, including a downregulation of Wnt pathway genes. These data provide a unique example of the product of a commensal bacterium modulating transcription of patterning genes to affect the host's anatomical structure during regeneration.