I think we can agree that there is no universal recipe for happiness, and also that a few prerequisites, while not absolutely* necessary, do help: health, shelter, food.

Beyond these, here are my three very general rules for happiness, they work for me, I hope others can make something out if them:

  1. Keep learning.
  2. Things don't matter, happiness comes only from life.
  3. Life comes to an end, eventually. The pain is a reminder of all the happiness it generated, without the one, you'd never feel the other.

These are valid for me, today, they have no pretense of representing any truth, just a step in a long journey.
I want to believe it's also possible to be happy when some of these or missing, but I can't be sure, I've been lucky so far.