Wat type of lighting are you using? Distance to canopy will largely be determined by this. Using HPS, MH, or 7 band LED, (blurple color lighting) 2 feet is a good distance, using white light LED diodes (cobs, strips, quantum boards) 18-24 inches works well, and with a solid T5 fluorescent light, you can run it around 4-8 inches away effectively.
And though T5 fluorescent is great lighting for seedlings and smaller rooted clones, due to its rapid drop in penetration and intensity, it should definitely be replaced with a stronger source of light after your plants are 6-10 inches or so, depending on nodal spacing.
Best of luck!! Be happy and be safe