Container
Coffee's original packaging is generally not ideal for long-term storage. Once opened, it starts to lose freshness quickly. For that reason, it's a good idea to transfer coffee to another more appropriate container as soon as possible. For best results, use an opaque glass, ceramic, or non-reactive metal container with an airtight gasket seal. This will protect beans from oxygen and bright light.
Location
To keep coffee fresh and flavorful, choose a storage location that is cool, dark, and dry, such as a pantry or cabinet. Avoid locations that get warm, or get hot from exposure to sunlight or cooking equipment. If storing coffee on a counter, an airtight, opaque container is a good option. Do not store coffee in the refrigerator or freezer, as coffee beans can absorb moisture, odors and tastes. Because most home storage containers still let in small amounts of oxygen, this is a recipe for a compromised cup of coffee.