While family and community background are two of the most important early-life factors determining later outcomes very little is known about their relative importance in explaining earnings inequality over the life cycle. Using longitudinal data based on tax records from administrative registers for the population of Danish men we develop a model which accounts for the joint earnings dynamics of siblings and youth community peers and decompose for the first time the sibling correlation of permanent earnings into family and community effects allowing for life-cycle dynamics. Modelling jointly the earnings of siblings and peers we identify family effects net of any community effects and we show that it is possible to identify community influences separately from sorting of families into communities. We find that the sibling correlation of earnings is U-shaped, which is consistent with the prediction from human capital models that heterogeneous investments in human capital induce an inverse relationship between initial earnings and earnings growth rates. The decomposition of sibling correlations shows that family is the most important factor influencing earnings inequality over the life cycle. Community background can explain a substantial share of the sibling correlation of earnings early in the working life, but its importance diminishes over time and becomes negligible after age 30. On average, community does not account for more than 10 percent of the sibling correlation of earnings. These findings are robust to the measurement of youth communities and to various sample selection choices. The diminishing community influence over the life cycle highlights the importance of observing long earnings histories beyond the first years of the working life.