The basic idea in storing coffee beans is to prevent it from being exposed to odors, moisture, or open air. Coffee beans are like little sponges that will readily absorb moisture and odors.
It is generally recommended to keep coffee in an airtight container (preferably glass) in a cool, dry place away from direct sunlight.
If you decide to freeze your coffee beans, be sure to thaw only what you are going to use immediately.leaving thawed coffee alone will cause condensation to form on the beans which will absorb the water and become musty. Also, if you refreeze thawed coffee, you run the risk of causing the beans to break as the absorbed condensation expands within.
Do not store coffee in the refrigerator because there are many odors in there that the coffee beans will absorb.