put in a directory and run with root, this is designed for Ubuntu with Elasticsearch 8.2.0 but should work for versions > 7.0.0
First log into the Web UI https://:5601 and go to settings > fleet > settings to configure elasticsearch and your fleet server settings Then run the script and follow the prompts