Save settings on server start

Now settings for server will be saved to config when starting the
server. Also added Port parameter to config.