Many animal cells that crawl on extracellular substrates exhibit durotaxis, i.e., directed migration toward stiffer substrate regions. This has implications in several biological processes including tissue development and tumor progression. Here, we introduce a phenomenological model for single-cell durotaxis that incorporates both elastic deformation-mediated cell-substrate interactions and the stochasticity of cell migration. Our model is motivated by a key observation in an early demonstration of durotaxis: a single, contractile cell at a sharp interface between a softer and a stiffer region of an elastic substrate reorients and migrates toward the stiffer region. We model migrating cells as self-propelling, persistently motile agents that exert contractile traction forces on their elastic substrate. The resulting substrate deformations induce elastic interactions with mechanical boundaries, captured by an elastic potential. The dynamics is determined by two crucial parameters: the strength of the cellular traction-induced boundary elastic interaction (A), and the persistence of cell motility (Pe). Elastic forces and torques resulting from the potential orient cells perpendicular (parallel) to the boundary and accumulate (deplete) them at the clamped (free) boundary. Thus, a clamped boundary induces an attractive potential that drives durotaxis, while a free boundary induces a repulsive potential that prevents antidurotaxis. By quantifying the steady-state position and orientation probability densities, we show how the extent of accumulation (depletion) depends on the strength of the elastic potential and motility. We compare and contrast crawling cells with biological microswimmers and other synthetic active particles, where accumulation at confining boundaries is well known. We define metrics quantifying boundary accumulation and durotaxis, and present a phase diagram that identifies three possible regimes: durotaxis, and adurotaxis with and without motility-induced accumulation at the boundary. Overall, our model predicts how durotaxis depends on cell contractility and motility, successfully explains some previous observations, and provides testable predictions to guide future experiments.