Skip to main content
Version: v8

Using a Proxy

Proxy support is built-in to the Ionic CLI. Proxy settings can be configured via the config file or an environment variable.

To configure proxy settings via the config file, run the following with the URL of the proxy server:

ionic config set -g proxy

To configure proxy settings via an environment variable, use one of the following:

$ export HTTP_PROXY="" # also used by npm
$ export HTTPS_PROXY="" # also used by npm
$ export IONIC_HTTP_PROXY=""

Other CLIs

Each CLI that you use must be configured separately to proxy network requests.


npm config set proxy


git config --global http.proxy

SSL Configuration

The Ionic CLI can be configured to use various SSL settings for HTTP requests.

$ ionic config set -g ssl.cafile /path/to/cafile # file path to your CA root certificate
$ ionic config set -g ssl.certfile /path/to/certfile # file path to a client certificate
$ ionic config set -g ssl.keyfile /path/to/keyfile # file path to a client key file

The cafile, certfile, and keyfile entries can be manually edited as arrays of strings in ~/.ionic/config.json to include multiple files.