Getting error when trying to upload the CA certifcate

Hi, I am trying to upload a certificate using the CLI and I am getting this error:

/opt/couchbase/bin/couchbase-cli ssl-manage -c public-hostname --upload-cluster-ca /opt/couchbase/var/lib/couchbase/inbox/letsencrypt-rootCA.pem -u Administrator -p password

and I am getting this error:

DEPRECATED: Specifying --upload-cluster-ca is deprecated
ERROR: API is accessible from localhost only (this behavior can be changed by means of POST /settings/security/allowNonLocalCACertUpload, see documentation for details)

for the hostname I have a public domain, but I am running the command from the localhost.

If i replace with localhost then it is working but seems that for some reason it cannot figure out that we are calling the CLI from the localhost and not from the outside of the server.

Is is a trick that I could do here to make it work with a public server hostname but run from the localhost?

P.S. also, the warning related to the DEPRECATED message is not documented in the docs
Thanks