Should not be a problem to keep it at all. You will need to know species to feed it correct leaves but more likely it is looking to pupate if you found it crawling up your door. Most likely it will burrow into the earth in the bottom of your cage or cover itself to start this process.