A Hawick man admitted growing cannabis valued at £600 in the bedroom of his home.
Scott Shearman, 44, pleaded guilty at Jedburgh Sheriff Court to producing the class B drug at his former house in Silverbuthall Road, Hawick, on September 9.
Depute procurator fiscal Tessa Bradley said police, armed with a warrant, searched the property.
Shearman admitted there were eight plants as part of a cultivation growing in a tent in a bedroom.
His lawyer said his client had tried to self-medicate with valium, but then switched to cannabis.
He added that he did not want to involve himself with drug dealers so he had decided to grow the cannabis for his own use.
Shearman, now living at Howdenbank in Hawick, had sentence deferred until April 18 for background reports.