We present the scaling relation between Sunyaev-Zeldovich (SZ) signal and stellar mass for almost 260,000 locally brightest galaxies (LBGs) selected from the Sloan Digital Sky Survey (SDSS). These are predominantly the central galaxies of their dark matter halos. We calibrate the stellar-to-halo mass conversion using realistic mock catalogues based on the Millennium Simulation. Applying a multi-frequency matched filter to the Planck data for each LBG, and averaging the results in bins of stellar mass, we measure the mean SZ signal down to M500 ∼ 2 × 1011 M⊙, with a clear indication of signal at even lower stellar mass. We derive the scaling relation between SZ signal and halo mass by assigning halo properties from our mock catalogues to the real LBGs and simulating the Planck observation process. This relation shows no evidence for deviation from a power law over a halo mass range extending from rich clusters down to M500 ~ 2 × 10 13 MâŠ™, and there is a clear indication of signal down to M500 ~ 4 × 1012 M âŠ™. Planck's SZdetections in such low-mass halos imply that about a quarter of all baryons have now been seen in the form of hot halo gas, and that this gas must be less concentrated than the dark matter in such halos in order to remain consistent with X-ray observations. At the high-mass end, the measured SZ signal is 20% lower than found from observations of X-ray clusters, a difference consistent with the magnitude of Malmquist bias effects that were previously estimated for the X-ray sample. © 2013 ESO,.