Put registry file in database

This enables the use of several instances without responding with stale
registry files.