This mostly depends on the alcohol you use. Alcohol and sugar is a pretty decent preservative, but you'd need a high proof alcohol to prevent microbial growth. In general, keep the liqueur in a sanitized liquor bottle out of sunlight and it can last years which makes it an amazing gift. If you're planning to use it soon, keep it in the fridge to chill before adding to cocktails.