I heard these words of the Buddha one time when the Lord was living in the vicinity of Savatthi at the Anathapindika Monastery in the Jeta Grove. Late at night, a deva appeared whose light and beauty made the whole Jeta Grove shine radiantly. After paying respects to the Buddha, the deva asked him a question in the form of a verse:

“Many gods and men are eager to know
what are the greatest blessings
which bring about a peaceful and happy life.
Please, Tathagata, will you teach us?”

(This is the Buddha’s answer):

“Not to be associated with the foolish ones,
to live in the company of wise people,
honoring those who are worth honoring —
this is the greatest happiness.

“To live in a good environment,
to have planted good seeds,
and to realize that you are on the right path —
this is the greatest happiness.

“To have a chance to learn and grow,
to be skillful in your profession or craft,
practicing the precepts and loving speech —
this is the greatest happiness.

“To be able to serve and support your parents,
to cherish your own family,
to have a vocation that brings you joy —
this is the greatest happiness.

“To live honestly, generous in giving,
to offer support to relatives and friends,
living a life of blameless conduct —
this is the greatest happiness.

“To avoid unwholesome actions,
not caught by alcoholism or drugs,
and to be diligent in doing good things —
this is the greatest happiness.

“To be humble and polite in manner,
to be grateful and content with a simple life,
not missing the occasion to learn the Dharma —
this is the greatest happiness.

“To persevere and be open to change,
to have regular contact with monks and nuns,
and to fully participate in Dharma discussions —
this is the greatest happiness.

“To live diligently and attentively,
to perceive the Noble Truths,
and to realize Nirvana —
this is the greatest happiness.

“To live in the world
with your heart undisturbed by the world,
with all sorrows ended, dwelling in peace —
this is the greatest happiness.

“For he or she who accomplishes this,
unvanquished wherever she goes,
always he is safe and happy —
happiness lives within oneself.”

Mahamangala Sutta, Sutta Nipata 1