All organisms leave traces of DNA in their environment. This environmental DNA (eDNA) is often used to track occurrence patterns of target species. Applications are especially promising in rivers, where eDNA can integrate information about populations upstream. The dispersion of eDNA in rivers is modulated by complex processes of transport and decay through the dendritic river network, and we currently lack a method to extract quantitative information about the location and density of populations contributing to the eDNA signal. Here, we present a general framework to reconstruct the upstream distribution and abundance of a target species across a river network, based on observed eDNA concentrations and hydro-geomorphological features of the network. The model captures well the catchment-wide spatial biomass distribution of two target species: a sessile invertebrate (the bryozoan Fredericella sultana) and its parasite (the myxozoan Tetracapsuloides bryosalmonae). Our method is designed to easily integrate general biological and hydrological data and to enable spatially explicit estimates of the distribution of sessile and mobile species in fluvial ecosystems based on eDNA sampling.