Treat the cut ends of the dragon fruit stem cuttings with fungicide to prevent fungus rot of the dragonfruit cactus at the cutting location and then allow the cuttings to 'heal' or 'cure' for about 1 week in a dry spot out of direct sunlight. This step reduces the chance of rot and allows you to actually see the root production. Simply placing the dragon fruit vine cutting directly in soil won't give you an idea of whether root production is taking place and/or if fungus or rot has set in under the soil level.
Just place the dragon fruit stem cutting in a dry place (do not place the stem cutting in water) which is not in direct sunlight, and in days to at most a few weeks depending upon the ambient temperature and other factors, the stem cutting should begin to produce roots. No watering or soil is required for this 'curing' process to take place. The dragon fruit cactus plant naturally should do this root production process without any outside encouragement.