Fresh (unopened): keep them in the fridge at around 4 degrees C. They stay good for up to 2 months.
Fresh (opened): consume within 2 days. Store in the fridge in the meantime.
Dried: at least 1 year shelf life. Keep in an airtight container in a cool, dark place.
To dry truffles: lay them out on a tea towel in a dry spot, no direct sunlight. Takes about a week. A food dehydrator at max 40 degrees C works too. Don't use an oven, the heat destroys active compounds. More drying tips: https://www.zamnesia.com/content/285-how-to-dry-and-store-magic-mushrooms