Yes, the dragon fruit plants can flourish indoors in some areas like a sunroom or a large window that receives six to eight hours of sunlight every day.
This is a fast-growing cactus, so you’ll need to prune it frequently and use a large, hefty container. Be advised that hand pollination is necessary for indoor plants to produce fruit.