We manage a handful of properties remotely (however most of ours are local to Charlotte market) and we keep actual keys in a lockbox in case batteries die or any malfunction. We don’t give guests the code. It is there for emergency purposes only.
We have an apartment building an hour away. A tenant who is retired, opens doors for trades etc. We even had her do a showing or two. In return she gets a break on rent.
We are using the "rent-by-room" strategy, and we put electronic locks on all bedroom doors and the front door. Even if we were just renting to single tenant long-term, I would totally still use electronic locks. Our locks allow us to remotely add a pin for a new resident, make temporary pins for handymen/contractors, etc. And we've had 7 locks in our property for a year now, and the lowest one is at 50% battery (shown in the app).
We looked for any lock that uses the "TTlock" app on Amazon. That way, all of our locks are in the same app and have the same functionality.
For exterior deadbolt locks (front door, garage door), we used this: https://a.co/d/2SFMNcy
For normal interior locks (bedroom), we used something like this (the ones we have are currently unavailable, but this has similar capabilities): https://a.co/d/8C6nYen
You can create codes from anywhere without the locks having internet connection because it can create them using an offline algorithm. But if you want to create specific codes with certain digits (instead of random), you either need to be close enough to the lock to use bluetooth or you need to have a gateway. The gateway is just a hub that all the locks connect to.