Plan on a series. If I can recommend the Honor Harrington series by David Weber as an example [see wikipedia link below], he's going on 20 books now and they're still relatively good reads. David's known the end of the story for the most part since the early '90's, the rest of us are waiting for the last two novels with cash in hand, so to say.
Anyway... there's a trick I do whether I am playwriting, script writing, chapter book, or a full length novel, which seems to work well. I even found a few software tools like Scrivener which make the process much easier.
The idea is to get the story organized in your head and see how it plays out before you've written a whole lot. You're editing the story in advance the same way as if someone handed you 20 hours of film and said "edit together the best takes, special effects, etc. and deliver "Star Wars".
Trouble is it isn't written yet. So, gotta organize the series universe... Let's say that in order to write all 20 books, you're going to need 400-500 major plot points. That's about twenty five a book which is more than enough or a decent story. So you start writing down what those plot points are on paper card. then push pin them to a wall size cork board . Then you rearrange, edit, delete, add, etc. until the overall plot arc makes sense.
Pretend you're done and they're good, so you put each set of 20-25 cards in it's own slot in an index card file. Take out the cards for "book one", oh crap, time to put in more details. So now I need a few cards for characters, settings and the lot. So those go in that section, etc. Might force some reorganization of the plot cards in the box, come to think about it.
Repeat for each set of cards to a smaller extent, some characters will die or be killed, new ones come in, settings change, etc. but the goal is simply to see if the cards can be put in an order where there's an episodic finish per set, and where the sets fit together to make the whole story complete.
Once you've got a good set of ideas and a start and end point for book one down on paper / in Scrivener / whatever plus the overall big picture, whatever start writing! And then make Book One your best work! (so that it will pay you enough to write book two, etc.)