I tried this once at home and thought it is perfect for a long boat trip. Green coffee keeps forever and you can just roast as much as you need. It is easy too. Just heat up a pot or pan, cover the bottom with one layer of green coffee beans, stir and wait until the beans pop. After that it is a matter of taste if you want a dark roast or a light roast how much longer you have to keep it going but it will move from light to french and burned pretty fast.
I do this every couple days. Gives the boat a nice coffee smell too... 😉
I buy the coffee here: