o Improve bootstrap sequence and allow for locking the shared database while creating/uploading the encryption secret. Closes #4097.