Automatic local/production mode