Friction between ordered, atomically smooth surfaces at the nanoscale (nanofriction) is often governed by stick-slip processes. To test long-standing atomistic models of such processes, we implemented a synthetic nanofriction interface between a laser-cooled Coulomb crystal of individually addressable ions as the moving object and a periodic lightfield potential as the substrate. We show that stick-slip friction can be tuned from maximal to nearly frictionless via arrangement of the ions relative to the substrate. By varying the ion number, we also show that this strong dependence of friction on the structural mismatch, as predicted by many-particle models, already emerges at the level of two or three atoms. This model system enables a microscopic and systematic investigation of friction, potentially even into the quantum many-body regime.