You probably won't be able to just 'keep' it in the cupboard unless you can get the jar and lid sterilised and the jar sealed.
You'd need to put your oven to a high temperature, wash the jar in very hot soapy water, rinse it, and then leave it in the oven for 10 minutes to sterilise it. Meanwhile, put the jar lids in some boiling water for 10 minutes.
Once that's done, heat the sauce thoroughly (so that it's too hot to eat).
Take the jar from the oven and put the sauce in to it. Best to use a jam funnel for this. Then take the lid from the boiling water, dry it and close the jar up. Wipe it down with a dry cloth and leave to cool.
It does depend on the quality of the glass and the quality of the lid as to whether or not the jar survives and the food stays sterile. If it does they'll keep for weeks.
A better solution IMO are Kilner jars or Parfait jars, which you can buy at lots of places (such as Lakeland). The same washing and sterilising approach applies.
Preserving stuff is very efficient so long as you've got the cupboard space. For some other useful tips I really recommend Marguerite Patten's "Basic Basics - Jams, Preserves and Chutneys" which is full of handy ideas.