Stenocereus fruit (sour pitayas) are a variety that is commonly eaten in the arid regions of the Americas. They are more sour and refreshing, with juicier flesh and a stronger taste. The sour pitaya or pitaya agria (S. gummosus)[3] in the Sonoran Desert has been an important food source for Native Americans. The Seri people of northwestern Mexico still harvest the fruit,[4] and call the plant ziix is ccapxl – "thing whose fruit is sour". The fruit of related species, such as S. queretaroensis and the dagger cactus (S. griseus),[5] are also locally important foods. The organ pipe cactus (S. thurberi) fruit (called ool by the Seris) is the pitaya dulce ("sweet pitaya"). It still has a more tart aroma than Hylocereus fruit, described as somewhat reminiscent of watermelon; it has some uses in folk medicine.

Fruits of some other columnar cacti (mainly Cereeae) are also called "pitayas" – for example those of the Peruvian apple cactus (Cereus repandus), which are very rare.

After thorough cleaning of the seeds from the pulp of the fruit, the seeds may be stored when dried. Ideally, the fruit must be unblemished and overripe. Seeds grow well in a compost or potting soil mix – even as a potted indoor plant. Pitaya cacti usually germinate after between 11 and 14 days after shallow planting. As they are cacti, overwatering is a concern for home growers. As their growth continues, these climbing plants will find something to climb on, which can involve putting aerial roots down from the branches in addition to the basal roots. Once the plant reaches a mature 10 pounds in weight, the plant may flower.[clarification needed]

Pitaya flowers bloom overnight and usually wilt by the morning.[6] They rely on nocturnal pollinators such as bats or moths for fertilization. Self-fertilization will not produce fruit in some species, and while cross-breeding has resulted in several "self-fertile" varieties, cross-pollinating with a second plant species generally increases fruit set and quality. This limits the capability of home growers to produce the fruit. However, the plants can flower between three and six times in a year depending on growing conditions. Like other cacti, if a healthy piece of the stem is broken off, it may take root in soil and become its own plant.

The plants can handle temperatures up to 40 °C (104 °F) and very short periods of frost, but will not survive long exposure to freezing temperatures. The cacti thrive most in USDA zones 10-11, but may survive outdoors in zone 9a or 9b.[7][8][9]

Hylocereus has adapted to live in dry tropical climates with a moderate amount of rain. The dragon fruit sets on the cactus-like trees 30–50 days after flowering and can sometimes have 5-6 cycles of harvests per year. There are some farms in Vietnam that produce 30 tons of fruit per hectare every year.[10]

Overwatering or excessive rainfall can cause the flowers to drop and fruit to rot. Also, extended over-watering can cause maturing fruit to split on the branch. Birds can be a nuisance. The bacteriumXanthomonas campestris causes the stems to rot. Dothiorellafungi can cause brown spots on the fruit, but this is not common. Other fungi known to infect pitaya include Botryosphaeria dothidea, Colletotrichum gloesporioides and Bipolaris cactivora.[11]

To prepare a pitaya for consumption, the fruit is cut open to expose the flesh. The fruit's texture is sometimes likened to that of the kiwifruit because of its black, crunchy seeds. The flesh, which is eaten raw, is mildly sweet and low in calories. The seeds are eaten together with the flesh, have a nutty taste and are rich in lipids,[12] but they are indigestible unless chewed. The fruit is also converted into juice or wine, or used to flavour other beverages. The flowers can be eaten or steeped as tea.

The mild taste of pitaya flesh is often remarked upon, as it stands in stark contrast to the vibrant exterior. The taste has been described as being "very bland... like a melon or kiwifruit," with a "mild sweetness".