Fascinating nanostructured porous materials have recently been synthesized by evaporation-driven coassembly of ceramic precursors and amphiphiles. To expand our understanding of this process, we examine the influence of interfaces on self-assembly process using equilibrium lattice-based Monte Carlo simulations of ternary amphiphile-solvent mixtures. The simulations are able to predict the existence of all significant lyotropic mesophases, including lamellae, hexagonal closepacked cylinders, and cubic phases such as the gyroid. In the presence of walls that attract the majority solvent, the amphiphiles are confined to a smaller region of space, and experience a higher local concentration than the bulk concentration. This can lead to early transitions between mesophases. On the other hand, when the surface repels the majority solvent, amphiphiles tend to adsorb at the walls, and the local effective concentration in solution is lower. This can delay mesophase formation. When the amphiphile concentration is high enough that mesophases form in the bulk solution, however, either type of strongly attracting wall will align the mesophase (lamellae or hexagonal channels) parallel to the walls. In contrast, neutral walls (with no preferential interaction with either component) align mesophases perpendicular to themselves, which could be an interesting route to pores aligned normal to a film.