Green (unroasted) coffee beans will store pretty much indefinitely in a cool dry place. Bugs don’t like ‘em either.
I’ve been roasting my own every other day for better’n five years now. You can get it pretty cheap. Got 40# for $120 delivered from Blue Bell Coffee. Ain’t no hoity toity high brow blended crap, just good bean from Nicaragua.
MRE Depot has green coffee beans canned. 12 Cans per case, packed with Oxygen Absorbers and Desiccant Packs to ensure that these stay moisture and oxygen free for many, many years.
I only buy during the glut during harvest.
I also have roasted my own for 15 years or so. I've roasted it in an iron skillet over an open flame, or in an air pop-corn popper (my favorite).
Nothing like excellent, fresh roasted, fresh ground, good coffee first thing in the morning. Whether there is electrikity or not.
/johnny