A plugin can also be downloaded directly from a custom location by specifying the URL:
For instance, to install a plugin from your local file system, you could run:
sudo bin/elasticsearch-plugin install file:///path/to/plugin.zip
The plugin script will refuse to talk to an HTTPS URL with an untrusted certificate. To use a self-signed HTTPS cert, you will need to add the CA cert to a local Java truststore and pass the location to the script as follows:
sudo ES_JAVA_OPTS="-Djavax.net.ssl.trustStore=/path/to/trustStore.jks" bin/elasticsearch-plugin install https://....