Police uncovered 44 plants together with growing equipment when they raided Jamal Baqshahi’s house in Sheriff Street.
Two bedrooms had been converted into growing areas, each housing 22 plants as well as lighting, fans and extractor equipment.
Teesside Crown Court heard that Baqshahi, 46, had been approached by a man and agreed to let him grow a few plants at the address.
He was told he would be paid £5,000 when they were sold.
Baqshahi later realised he was a member of a gang when more plants than he expected were put in.
The court heard he was monitored by two of the group who had a key for the property and he was in fear for his safety.
The house was empty when the police raided it in September 2019.
But they found a tenancy agreement and driver’s licence for Baqshahi who later went to the police station voluntarily.
Prosecutor Joseph Hedworth said: “In relation to the plants he said he had been approached by a male who offered to help him out with some money to go back to Iran to see his poorly mother.
"He fully admitted allowing his premises to be used to grow cannabis and said ‘I regret it, I’ve made a mistake.
“’I didn’t know there were that many plants’.”
Baqshahi, a chef’s assistant in a takeaway, pleaded guilty to permitting his premises to be used for the production of a class B drug.
Tabitha Buck, mitigating, said he stood to make limited financial gain and played no part beyond letting his house be used by the gang.
She said: “Custody would lead to him losing his accommodation and job.
"He is of otherwise previous good character. He is deemed a low level of reoffending.”
Baqshahi, now of York Road, Hartlepool, was made the subject of a 12 month community order with 120 hours unpaid community work.
The judge, Recorder Christopher Williams, told him: “Even the permitting of a premises to be used facilitates that supply to others who may go on to cause problems for this society.”
But he added: “You have learned a lesson from this episode.”