He had saved a ton of money from his time as factory owner--we saw him dig some of it up. Presumably after he had the cash in hand, he rented the house. He probably continued to go outside the convent during his years working there--or, at least, got a newspaper or however people rented/found lodgings back then.
I've read the book, but it's been many, many years. Can someone remind me whether Javert remained THIS focused on Valjean throughout those years? My impression of him was more that Valjean haunted him, but not to the point that he was constantly brooding in his office and telling his subordinates that he WILL get that man! More like, he focused on progressing through his career, but kept an ear to the ground about Valjean. Just in case.