We catalogue and study three-Higgs-doublet models in terms of all possible allowed symmetries (continuous and discrete, Abelian and non-Abelian), where such symmetries may be identified as flavour symmetries of quarks and leptons. We analyse the potential in each case, and derive the conditions under which the vacuum alignments (0, 0, v), (0, v, v) and (v, v, v) are minima of the potential. For the alignment (0, 0, v), relevant for dark matter models, we calculate the corresponding physical Higgs boson mass spectrum. Motivated by supersymmetry, we extend the analysis to the case of three up-type Higgs doublets and three down-type Higgs doublets (six doublets in total). Many of the results are also applicable to flavon models where the three Higgs doublets are replaced by three electroweak singlets.