Colin McGrath admitted producing the class B drug at High Peak Magistrates’ Court last Wednesday.
The court heard that police found 41 cannabis plants and heat lamps in Bodytech Repair Centre, on Platt Street, in Padfield on June 12.
The 35-year-old, of Arrowscroft Way, Hyde, said he was growing them for his own personal use as he had a long-standing medical condition.
Prosecutor Jennifer Fitzgerald told magistrates the plants were likely to yield between 1,148g and 2,583g of cannabis, with a street value of between £11,480 and £25,830.
Annis Rowlands, defending, said her client had been frank and candid and had contacted police following the bust to say the drugs were his.
Chairman of the bench Michael Hilton committed McGrath to Derby Crown Court for sentencing on March 5.
Co-defendant Stuart Whiteman, 42, of Hurdlow Way, Glossop, denied being involved in the production of the cannabis and was also committed to Derby Crown Court for a preliminary hearing on February 12.