Canonical Reference: Mahaparinibbana Sutta Verified Source

“Be lamps unto yourselves. Be a refuge unto yourselves. Seek no external refuge. Hold fast to the Dhamma as a lamp and as a refuge.”

Canonical Pali Original: Attadīpā viharatha attasaraṇā anaññasaraṇā, dhammadīpā dhammasaraṇā anaññasaraṇā.

— Gautam Buddha
The Awakened One, Founder of Dhamma
Historical Setting & Context:

Delivered by Gautama Buddha at Beluva village near Vesali before his Parinibbana. Recorded in Digha Nikaya 16.2.26.