Skip to content

DEPTH_ZERO_SELF_SIGNED_CERT: self signed certificate #54685

Closed as not planned
Closed as not planned

Description

@heiheiheidexiaohei

the opencode always shows this error ,it doesnot work!

Activity

  1. opencode-agent commented on Oct 12, 2026

    @opencode-agent
    Contributor

    Thanks for the report, @heiheiheidexiaohei!

    We need a few details to look into this:

    1. The output of opencode --version, and how you installed it (npm opencode-ai, npm @opencode/cli, standalone binary, or desktop app). Versions 1.x and 2.x are separate implementations.
    2. Your operating system, and whether you use the CLI or the desktop app.
    3. Which provider and model you are using (e.g. OpenCode Go/Zen, or another provider with its own base URL).
    4. When the error appears: at startup, on every prompt, or during opencode upgrade. Please include the full error text or a screenshot.
    5. The result of curl -v https://opencode.ai (and of your provider's API URL, if it's a different provider), run from the same machine and network.

    Some background: DEPTH_ZERO_SELF_SIGNED_CERT means the server your machine reached sent back a self-signed certificate. That usually comes from the network, for example a company proxy, antivirus or firewall that intercepts HTTPS. If your network uses its own root certificate, you can save it as a .pem file and start OpenCode with NODE_EXTRA_CA_CERTS pointing to it. Please tell us whether that helps.

    You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.

    These issues look related, ordered from most to least likely to be the same problem:

  2. opencode-agent commented on Oct 15, 2026

    @opencode-agent
    Contributor

    We're closing this for now because we haven't heard back with the details we asked for: your OpenCode version, OS and install method, which provider and model you use, and the full error or the curl -v https://opencode.ai output. DEPTH_ZERO_SELF_SIGNED_CERT is often caused by the network rather than by OpenCode, so we can't tell what's going wrong without them.

    If you're still seeing this, please reply with those details and we'll take another look. Meanwhile, #54525 tracks the same error with the OpenCode Go plan, and if your network uses its own root certificate, starting OpenCode with NODE_EXTRA_CA_CERTS pointing to that certificate may help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions