To get the best from a coffee you want to use fresh roasted beans, grind immediately before brewing and use them within 2 weeks. Now, if you don't have a local coffee roaster around the corner from you, this may not be the most viable solution. In order to ensure that you're brewing the best coffee you can, you might have to store some of your beans. So what’s the best way to store your beans?
The biggest enemies of coffee are air, moisture, heat and light. So to keep your beans fresher for longer periods keep them away from those things. That means storing in airtight containers in a cool, dark and dry place. Ultimately you can store your beans in whatever you have handy at home, but if you're looking for something a little more specialized in preserving your beans, a vacuum sealed storage container from Coffeevac or Vacu Vin is a good choice.
So being cool and dark a refrigerator seems to make sense for storage right? Well, although some people do store their coffee in the fridge, it turns out it’s actually one of the worst places to put your beans. Coffee beans are actually very porous so they readily absorb odors (you can actually use coffee to deodorize). Any particularly pungent smell in your fridge has a good chance of ending up in your beans and ruining its flavor.
What about freezing beans? Well, according to extensive blind taste testing of espresso done by Ken Fox and Jim Schulman at Home-Barista.com. It may be appropriate in some cases. (GFX) They found freezing coffee immediately after roasting in airtight containers in a very cold chest style freezer resulted in no taste preference over fresh unfrozen beans after 4 months of storage. So they concluded freezing is a viable method for the preservation of coffee beans roasted for espresso for a period of at least 4 months.
If you do freeze beans be sure to thaw them overnight before use. Frozen beans can damage grinders - especially in super-automatic espresso machines, once thawed do not refreeze again as condensation will draw moisture into the beans. So freeze only in sealed portions useable within a week or so.
But short of freezing beans be sure to store your coffee beans in an airtight container in a dark, cool and dry spot...and not in the fridge. And of course for best flavor, always grind them right before brewing.