Allow provide hostname to bind server to

Refactored variant of #686