We are running an Read-Write DC at our home office which we are using for authentication when were are working there. It works fine as long as we are at the office, but we are going to be on the road for a few months, and and IT infrastructure at our office will have to stay offline during this time.
I read several times that it's not a good idea to expose a DC to the internet, so I was thinking of setting up RODC on a cloud server instead and caching some credentials there.
Would I be able to authenticate against the RODC if the writeable DC was offline for several months? I'm worried that my credentials might be cached at first but expire at a later time.
Nathan is right IMO, but I'll address your actual "questions":
The RODC still has to replicate with the DC at your HQ. And the cloud server itself would either have to be exposed to the internet or you'd have to setup a tunnel to that cloud instance (which further upvotes Nathan's comment).
If the RODC can't get replication from the RWDC then only cached account credentials from users that have authenticated against the RODC while it was able to talk to the RWDC will be allowed to login.
Honestly, Nathan is right...or simply just login to the laptops with cached credentials to begin with...if you aren't connected to the network the laptops will still accept your cached credentials on them. You might run into issues when you return though with the workstation's account itself having trust relationship issues to the domain if it hasn't contacted the DC in 30 days (by default).