When preserving fresh dragon fruit, the best way to keep it is to store it in the fridge; that way, it will be fine for a couple of weeks. You can leave the dragon fruit at room temperature if you need to ripen it a little more, or you will eat it in a few days.  A long-term preservation option is to freeze the pulp of the dragon fruit. However, you could also dehydrate the pitahaya or keep it in syrup. Dragon fruit juice keeps well in the fridge, but you can also freeze it.