tidy up lock key, always set hostname