Separate config hostconfig

This depends on #4083, please review that first.