David Robinson, 23, cultivated the illegal drug in a tent next to his bedside at his then home on Rossall Road, Cleveleys, Preston Crown Court was told.
His stunned landlady made the discovery on July 5 when she turned up to show a prospective new tenant around.
Prosecuting, David Clarke said: “The defendant had been a tenant for six months, however (the landlady) had a number of concerns and even took it upon herself on this day to invite a prospective new tenant down for that same flat.
“She had been and knocked on the door that morning and left a note that she would be back at 2pm.”
When she returned, Robinson was ‘irate’, the court heard.
Mr Clarke added: “She immediately noticed a strong smell and saw inside there was a tent containing four large plants a good few feet tall. She was rather thrown, and phoned the police straight away.”
The court was told Robinson had left by this point but returned with another man and took the plants away. He came back again but was met by police.
In interview he gave no comment, but later admitted cultivating cannabis and breaching a suspended sentence.
Recorder Mark Laprell accepted the cannabis was for Robinson’s own use, adding: “This wasn’t a couple of plants on a window sill – it was more sophisticated than that. It was quite a serious enterprise.”
Robinson is already on a curfew until next March and a rehabilitation activity.