Callum Peter Walden, 27, of Browning Street, admitted producing the Class B drug at his home address on July 22, when he appeared at Mansfield Magistrates Court on Thursday.
Neil Hollett, prosecuting, said 17 plants had been recovered by police with a street value of between £5,000 and £15,000.
Tom Oates, mitigating, said Walden had been growing the drug for his own personal use.
The court heard he was subject to a suspended sentence from Nottingham Crown Court for a like offence. Walden was sent back there for sentencing on October 13.