Seatpost Battery Holder
Whether you run 11-speed Di2 or 12-speed Di2, chances are pretty good that you have a seatpost battery - either the BT-DN110 10-/11-speed or the BT-DN300 (12-speed).
If you do, you could tuck away the battery in the seatpost using a piece of cloth or foam and be done with it. Alternatively, you can install a seatpost battery holder.
I tend to use the battery holders, just because I like my battery to be really secure. They're relatively inexpensive and work really well.
I'm using a Deda battery holder in my BetterShifting Cinelli, but any will do, really.
PRO make them, as well as Deda, Ritchey, Cannondale, Giant, and many others.
Most will fit round seatposts, and come in different diameters. Make sure you get the one that matches your seatpost. If your seatpost isn't round, double-check with your bike's manufacturer.