We investigate the dark matter and the cosmological baryon asymmetry in a simple theory where baryon (B) and lepton (L) number are local gauge symmetries that are spontaneously broken. In this model, the cold dark matter candidate is the lightest new field with baryon number and its stability is an automatic consequence of the gauge symmetry. Dark matter annihilation is either through a leptophobic gauge boson whose mass must be below a TeV or through the Higgs boson. Since the mass of the leptophobic gauge boson has to be below the TeV scale one finds that in the first scenario there is a lower bound on the elastic cross section of about 5x10^{-46} cm^2. Even though baryon number is gauged and not spontaneously broken until the weak scale, a cosmologically acceptable baryon excess is possible. There is tension between achieving both the measured baryon excess and the dark matter density.