PurposeTo remain sustainable, open source software (OSS) projects must attract new members—or newcomers—who make contributions. In this paper, the authors develop a set of hypotheses based on the knowledge barriers framework that examines how OSS communities can encourage contributions from newcomers.Design/methodology/approachEmploying longitudinal data from the source code repositories of 232 OSS projects over a two-year period, the authors employ a Poisson-based mixed model to test how community characteristics, such as the main drivers of knowledge-based costs, relate to newcomers' contributions.FindingsThe results indicate that community characteristics, such as programming language choice, documentation effort and code structure instability, are the main drivers of knowledge-based contribution costs. The findings also suggest that managing these costs can result in more inclusive OSS communities, as evidenced by the number of contributing newcomers; the authors highlight the importance of maintaining documentation efforts for OSS communities.Originality/valueThis paper assumes that motivational factors are a necessary but insufficient condition for newcomer participation in OSS projects and that the cost to participation should be considered. Using the knowledge barriers framework, this paper identifies the main knowledge-based costs that hinder newcomer participation. To the best of the authors' knowledge, this is the first empirical study that does not limit data collection to a single hosting platform (e.g., SourceForge), which improves the generalizability of the findings.