def METHOD_NAME(config):
    """Sets up and starts/restarts the web service."""
    web_server = WebServer(
        bind=config['bind'],
        port=config['port'],
        ssl_certificate=config['ssl_certificate'],
        ssl_private_key=config['ssl_private_key'],
        base_url=config['base_url'],
    )
    _default_app.secret_key = get_secret()
    user = get_user()
    if not user or not user.password:
        logger.warning(
            'No password set for web server, create one by using'
            ' `flexget web passwd <password>`'
        )
    if _app_register:
        web_server.start()
    return web_server