register with name and hostname