Scott Finlay also started growing cannabis plants after renting a room in a house in Marlborough a year ago.
But after the 42-year-old failed to turn up at Swindon Crown Court earlier this year a judge issued a warrant for his arrest.
And when he appeared in the dock after being arrested he admitted he role in the drug dealing enterprise.
Finlay, who gave the court an address in Andover, pleaded guilty to possessing cocaine with intent to supply and producing cannabis on Thursday, March 10 last year.
Nick Clough, defending, asked for the case to be adjourned to give the probation service time to compile a pre-sentence report.
Judge Tim Mousley QC agreed and remanded him in custody until Wednesday, April 5 when he is to face sentence.
Police executed a warrant at the house on Maurice Way where 27-year-old Gareth Bartlett was living with lodger Finlay.
Inside they found three ounces of powdered cocaine which had a street value of almost £8,000.
And when a mobile phone was examined it was found to be littered with messages relating to the sale of the drug, showing £1,000 was made in a five hour period.
Bartlett, who was renting the property, told police he knew about the cannabis plants his lodger was growing but they were not his.
At an earlier hearing Bartlett, now of Cloatley Close, Royal Wootton Bassett, admitted possessing cocaine with intent so supply and allowing his premises to be used for the production of cannabis
He was handed a two year jail term suspended for 24 months with 25 days rehabilitation activity requirement and 120 hours unpaid work.