Andrius Gruodis, 32, pleaded guilty under the Misuse of Drugs Act after Gardai were alerted to suspicious activity at his rented home in Ballybofey.
Detective Garda Niall Boyle told Letterkenny Circuit Court that Gardai visited 2 Beechwood Avenue in Ballybofey after a report about the house.
They found a number of empty pots and small balls of insulation at the back of the house.
The Gardai also became aware that the ESB meter on the house had been by-passed.
When they were leaving the area they met with a man coming towards the premises and eventually discovered he was the tenant of the house.
Gardai got a warrant to search the house and as they were about to enter it, Gruodis admitted he has ecstasy tablets and cannabis at the house.
When they entered the house, Gardai found a sophisticated network of equipment used to grow cannabis.
An extractor fan was piped into the chimney and various parts of the house were cordoned off with blue plastic.
In total Gardai found 58 cannabis plants with a street value of €23,000 and BZP tablets worth €420.
When interviewed Gruodis said he had learned all about the cultivation of cannabis from the internet.
The accused sister Androne, who lives in Trim in Co Meath, said she believed her brother was growing the drugs because he owed money to other men.
She told the court how she had received a visit late one night form three men who threatened her if her brother did not pay them the money he owed.
The court heard how Gruodis came to Ireland after being released from prison in Lithuania where he had just served seven years for manslaughter.
Judge John O’Hagan said he did not think that Gruodis was part of a group of Oriental people who are placed in houses to act as caretakers for the growing of cannabis.
“He had a little independent island of his own and he was going to use his contacts to offload it.
“This did not just drop out of the sky. It was a deliberate, intentional and well planned out exercise,” said Judge O’Hagan.
He sentenced Gruodis to six years in prison on two separate charges of possession and intent to sell or supply of cannabis under the Misuse of Drugs Act with both sentences to run concurrently.
He also congratulated the Garda Drugs Squad who he said faced a major task with limited resources and who worked long and often very fruitless hours.