{
  "doc": {
    "id": "app/references/proxy-configuration",
    "title": "Proxy Configuration in Cypress",
    "description": "How to configure Cypress to work with a corporate proxy",
    "section": "app",
    "source_path": "/llm/markdown/app/references/proxy-configuration.md",
    "version": "e6988a974973e9090ce70406c38cb2b9e0eac9fa",
    "updated_at": "2026-05-15T15:50:22.536Z",
    "headings": [
      {
        "id": "app/references/proxy-configuration#proxy-configuration",
        "text": "Proxy Configuration",
        "level": 1
      },
      {
        "id": "app/references/proxy-configuration#set-a-proxy-on-linux-or-macos",
        "text": "Set a proxy on Linux or macOS",
        "level": 2
      },
      {
        "id": "app/references/proxy-configuration#set-a-proxy-on-windows",
        "text": "Set a proxy on Windows",
        "level": 2
      },
      {
        "id": "app/references/proxy-configuration#proxy-environment-variables",
        "text": "Proxy environment variables",
        "level": 2
      },
      {
        "id": "app/references/proxy-configuration#using-a-custom-certificate-authority-ca",
        "text": "Using a custom certificate authority (CA)",
        "level": 2
      },
      {
        "id": "app/references/proxy-configuration#view-unset-and-set-environment-variables",
        "text": "View, unset, and set environment variables",
        "level": 2
      },
      {
        "id": "app/references/proxy-configuration#linux-or-macos",
        "text": "Linux or macOS",
        "level": 3
      },
      {
        "id": "app/references/proxy-configuration#set-an-environment-variable-for-the-current-session",
        "text": "Set an environment variable for the current session",
        "level": 4
      },
      {
        "id": "app/references/proxy-configuration#unset-an-environment-variable",
        "text": "Unset an environment variable",
        "level": 4
      },
      {
        "id": "app/references/proxy-configuration#see-all-the-currently-set-environment-variables",
        "text": "See all the currently set environment variables",
        "level": 4
      },
      {
        "id": "app/references/proxy-configuration#windows",
        "text": "Windows",
        "level": 3
      },
      {
        "id": "app/references/proxy-configuration#set-an-environment-variable-for-current-session",
        "text": "Set an environment variable for current session",
        "level": 4
      },
      {
        "id": "app/references/proxy-configuration#set-environment-variable-globally-for-all-future-sessions",
        "text": "Set environment variable globally for all future sessions",
        "level": 4
      },
      {
        "id": "app/references/proxy-configuration#unset-an-environment-variable-in-the-current-session",
        "text": "Unset an environment variable in the current session",
        "level": 4
      },
      {
        "id": "app/references/proxy-configuration#see-all-currently-set-environment-variables",
        "text": "See all currently set environment variables",
        "level": 4
      },
      {
        "id": "app/references/proxy-configuration#view-proxy-settings-in-cypress",
        "text": "View proxy settings in Cypress",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "app/references/proxy-configuration#set-a-proxy-on-linux-or-macos",
      "doc_id": "app/references/proxy-configuration",
      "heading": "Set a proxy on Linux or macOS",
      "heading_level": 2,
      "content_markdown": "## Set a proxy on Linux or macOS\n\nTo set your proxy on Linux or macOS, run the following command in a terminal before running Cypress:\n\n```\nexport HTTP_PROXY=http://my-company-proxy.com\n```\n\nYou can also set `NO_PROXY` to bypass the proxy for certain domains (by default, only `localhost` will be bypassed):\n\n```\nexport NO_PROXY=localhost,google.com,apple.com\n```\n\nTo make these changes permanent, you can add these commands to your shell's `~/.profile` (`~/.zsh_profile`, `~/.bash_profile`, etc.) to run them on every login.\n",
      "section": "app",
      "anchors": [
        "set-a-proxy-on-linux-or-macos"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 101
    },
    {
      "id": "app/references/proxy-configuration#set-a-proxy-on-windows",
      "doc_id": "app/references/proxy-configuration",
      "heading": "Set a proxy on Windows",
      "heading_level": 2,
      "content_markdown": "## Set a proxy on Windows\n\nWhen starting up after being installed, Cypress will attempt to load the proxy configured in the Windows registry by default. [Learn how to set your proxy settings system-wide in Windows.](https://www.howtogeek.com/tips/how-to-set-your-proxy-settings-in-windows-8.1/)\n\nWhen downloading Cypress for the first time, the `cypress` command line tool _does not_ read proxy settings from the Windows registry. If you need to configure a proxy for the installation to work, you must set the appropriate environment variables as described below.\n\nYou can also set proxy environment variables before running Cypress to override the Windows registry. This is also the only way to define a proxy for `cypress install`. In Command Prompt, defining the required environment variables looks like this:\n\n```\nset HTTP_PROXY=http://my-company-proxy.com\n```\n\nTo accomplish the same thing in PowerShell:\n\n```\n$env:HTTP_PROXY = \"http://my-company-proxy.com\"\n```\n\nTo save the `HTTP_PROXY` variable and use your proxy for all new shells, use `setx`:\n\n```\nsetx HTTP_PROXY http://my-company-proxy.com\n```\n",
      "section": "app",
      "anchors": [
        "set-a-proxy-on-windows"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 205
    },
    {
      "id": "app/references/proxy-configuration#proxy-environment-variables",
      "doc_id": "app/references/proxy-configuration",
      "heading": "Proxy environment variables",
      "heading_level": 2,
      "content_markdown": "## Proxy environment variables\n\nThis section refers to your operating system's environment variables, _not_ [Cypress environment variables](/llm/markdown/app/guides/environment-variables.md)\n\nCypress automatically reads from your system's `HTTP_PROXY` environment variable and uses that proxy for all HTTP and HTTPS traffic. If an `HTTPS_PROXY` environment variable is set, HTTPS traffic will use that proxy instead.\n\nTo bypass the proxy for certain domains, a `NO_PROXY` environment variable can be set to a comma-separated list of domain names to not proxy traffic for. By default, traffic to `localhost` will not be proxied. To make Cypress send traffic for `localhost` through the proxy, pass `<-loopback>` in `NO_PROXY`.\n\nIf an uppercase and a lowercase version of the proxy settings are supplied (for example, `HTTP_PROXY` and `http_proxy` are both set), the lowercase variable will be preferred.\n",
      "section": "app",
      "anchors": [
        "proxy-environment-variables"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 168
    },
    {
      "id": "app/references/proxy-configuration#using-a-custom-certificate-authority-ca",
      "doc_id": "app/references/proxy-configuration",
      "heading": "Using a custom certificate authority (CA)",
      "heading_level": 2,
      "content_markdown": "## Using a custom certificate authority (CA)\n\nThis section refers to npm config variables and node environment variables, _not_ [Cypress environment variables](/llm/markdown/app/guides/environment-variables.md)\n\nCypress needs to be able to authenticate properly when communicating to [Cypress Cloud](/llm/markdown/cloud/get-started/introduction.md). When connecting through a proxy, oftentimes a self signed certificate is used as a CA. In order to handle this configuration, Cypress automatically reads from npm config's [`cafile`](https://docs.npmjs.com/cli/v8/using-npm/config#cafile) and [`ca`](https://docs.npmjs.com/cli/v8/using-npm/config#ca) options and the [`NODE_EXTRA_CA_CERTS`](https://nodejs.org/api/cli.html#node_extra_ca_certsfile) node environment variable.\n\nTo mimic the behavior of npm and node, Cypress looks at `cafile` first and then `ca` and uses the corresponding certificate(s) as a replacement for the CA. For example, to use the CA at `/home/person/certs/ca.crt`, add the following to your `.npmrc`:\n\n```\ncafile=/home/person/certs/ca.crt\n```\n\nIf neither `cafile` nor `ca` are set, Cypress looks at the system environment variable `NODE_EXTRA_CA_CERTS` and uses the corresponding certificate(s) as an extension for the trusted CA.\n\nNote that the npm config is used as a replacement, and the node environment variable is used as an extension.\n",
      "section": "app",
      "anchors": [
        "using-a-custom-certificate-authority-ca"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 217
    },
    {
      "id": "app/references/proxy-configuration#view-unset-and-set-environment-variables",
      "doc_id": "app/references/proxy-configuration",
      "heading": "View, unset, and set environment variables",
      "heading_level": 2,
      "content_markdown": "## View, unset, and set environment variables\n\nIn order to properly configure your proxy configuration, it can be helpful to know how to view currently set environment variables, unset unwanted environment variables, and set environment variables depending on your operating system.\n\n### Linux or macOS\n\n#### Set an environment variable for the current session\n\n```\nexport SOME_VARIABLE=some-value\n```\n\n#### Unset an environment variable\n\n```\nunset SOME_VARIABLE\n```\n\n`echo` will print nothing after `unset`:\n\n```\necho $SOME_VARIABLE\n```\n\n#### See all the currently set environment variables\n\n**Avoid in CI environments**\n\nDo not print environment variables in CI runs where logs are captured and stored, as this can expose sensitive information like passwords, API keys, or tokens that may be stored in environment variables.\n\nPrint all env vars:\n\n```\nenv\n```\n\nPrint environment variables with `proxy` (case insensitive) in the name:\n\n```\nenv | grep -i proxy\n```\n\n### Windows\n\nSetting environment variables in Windows is different depending on if you're using _command prompt_ or _PowerShell_.\n\n#### Set an environment variable for current session\n\n_Command prompt:_\n\n```\nset SOME_VARIABLE=some-value\n```\n\n_PowerShell:_\n\n```\n$env:SOME_VARIABLE = \"some-value\"\n```\n\n#### Set environment variable globally for all future sessions\n\n```\nsetx SOME_VARIABLE some-value\n```\n\n#### Unset an environment variable in the current session\n\n_Command prompt:_\n\n```\nset SOME_VARIABLE=\n```\n\n_PowerShell:_\n\n```\nRemove-Item Env:\\SOME_VARIABLE\n```\n\n#### See all currently set environment variables\n\n_Command prompt:_\n\n```\nset\n```\n\n_PowerShell:_\n\n```\nGet-ChildItem Env:\n```\n",
      "section": "app",
      "anchors": [
        "view-unset-and-set-environment-variables"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 313
    },
    {
      "id": "app/references/proxy-configuration#linux-or-macos",
      "doc_id": "app/references/proxy-configuration",
      "heading": "Linux or macOS",
      "heading_level": 3,
      "content_markdown": "### Linux or macOS\n\n#### Set an environment variable for the current session\n\n```\nexport SOME_VARIABLE=some-value\n```\n\n#### Unset an environment variable\n\n```\nunset SOME_VARIABLE\n```\n\n`echo` will print nothing after `unset`:\n\n```\necho $SOME_VARIABLE\n```\n\n#### See all the currently set environment variables\n\n**Avoid in CI environments**\n\nDo not print environment variables in CI runs where logs are captured and stored, as this can expose sensitive information like passwords, API keys, or tokens that may be stored in environment variables.\n\nPrint all env vars:\n\n```\nenv\n```\n\nPrint environment variables with `proxy` (case insensitive) in the name:\n\n```\nenv | grep -i proxy\n```\n",
      "section": "app",
      "anchors": [
        "linux-or-macos"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 140
    },
    {
      "id": "app/references/proxy-configuration#see-all-the-currently-set-environment-variables",
      "doc_id": "app/references/proxy-configuration",
      "heading": "See all the currently set environment variables",
      "heading_level": 4,
      "content_markdown": "#### See all the currently set environment variables\n\n**Avoid in CI environments**\n\nDo not print environment variables in CI runs where logs are captured and stored, as this can expose sensitive information like passwords, API keys, or tokens that may be stored in environment variables.\n\nPrint all env vars:\n\n```\nenv\n```\n\nPrint environment variables with `proxy` (case insensitive) in the name:\n\n```\nenv | grep -i proxy\n```\n",
      "section": "app",
      "anchors": [
        "see-all-the-currently-set-environment-variables"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 92
    },
    {
      "id": "app/references/proxy-configuration#windows",
      "doc_id": "app/references/proxy-configuration",
      "heading": "Windows",
      "heading_level": 3,
      "content_markdown": "### Windows\n\nSetting environment variables in Windows is different depending on if you're using _command prompt_ or _PowerShell_.\n\n#### Set an environment variable for current session\n\n_Command prompt:_\n\n```\nset SOME_VARIABLE=some-value\n```\n\n_PowerShell:_\n\n```\n$env:SOME_VARIABLE = \"some-value\"\n```\n\n#### Set environment variable globally for all future sessions\n\n```\nsetx SOME_VARIABLE some-value\n```\n\n#### Unset an environment variable in the current session\n\n_Command prompt:_\n\n```\nset SOME_VARIABLE=\n```\n\n_PowerShell:_\n\n```\nRemove-Item Env:\\SOME_VARIABLE\n```\n\n#### See all currently set environment variables\n\n_Command prompt:_\n\n```\nset\n```\n\n_PowerShell:_\n\n```\nGet-ChildItem Env:\n```\n",
      "section": "app",
      "anchors": [
        "windows"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 119
    },
    {
      "id": "app/references/proxy-configuration#view-proxy-settings-in-cypress",
      "doc_id": "app/references/proxy-configuration",
      "heading": "View proxy settings in Cypress",
      "heading_level": 2,
      "content_markdown": "## View proxy settings in Cypress\n\nYour current proxy settings can be viewed from within Cypress. Follow these steps:\n\n1.  Open up your project in Cypress via `cypress open`.\n2.  Click the \"Settings\" tab.\n3.  Click the \"Proxy Settings\" section to expand it and view the proxy settings that Cypress is currently using.\n",
      "section": "app",
      "anchors": [
        "view-proxy-settings-in-cypress"
      ],
      "path": "/llm/json/chunked/app/references/proxy-configuration.json",
      "token_estimate": 71
    }
  ]
}