The most accurate answer is going to depend quite a bit on your environment, the following things are factors:
- How humid is the air where you dry it?
- How clean (e.g. absence of mold and particles, dust, etc) is the air where you dry it? You'd be surprised how some dirty air ducts can contaminate a room.
- The average temperature of the room
There's also the moisture content of the pasta itself to consider. Under ideal conditions (semi-warm, relatively dry and reasonably clean air), pasta that has been dried correctly can last for several weeks at room temperature on a vented tray covered with some wax or parchment paper. I try very hard to consume it within that period, ideally within a day or two of making it.
If you do need to store it longer, you want it in an evacuated container of some kind (vacuum sealed) and then freeze it. Make absolutely certain the pasta is completely dry or the crystallization of the remaining moisture is going to affect it very negatively.
If you need to make a lot well ahead of time, consider using a bit less egg than your recipe calls for, kneading more, and then simply refrigerating the pasta in an otherwise evacuated container (plastic bag, etc) similar to how you'd purchase fresh pasta at the grocery store. It can stay refrigerated in that manner for up to a couple of months, and you can dry it fully prior to using it.
It's hard to write a blanket 'safe' answer here too, as oils you might add to your recipe could be closer to being rancid than you think - use common sense above everything else and rely on your sense of smell :)
In short, if you're going to end up freezing it ... you're kind of defeating the purpose of making it fresh to begin with, a good brass-cut pre-made commercial durum would almost be a better idea at that point. But if you do have to freeze it, try to do so in the absence of air and moisture, or you'll end up with something that sort of defeated the purpose of making it fresh to begin with.