Skip to content

Trust custom CA certificates

Experimental

View as Markdown

Set up your agent

Give your coding agent a Steel browser and the Steel skills, so that it browses and writes Steel code the right way. Learn more

Install the Steel CLI. It signs you in and installs the skills for your coding agents.

curl -fsS https://setup.steel.dev | sh

Or send this prompt to your coding agent, and it does the same:

Read https://setup.steel.dev/install.md and follow it to set up Steel for this coding client.
Then continue my requested task using the installed Steel skill.

Set up your agent →

A site with a certificate from a private certificate authority (CA) does not load in a session, because the browser does not trust that CA. Internal sites and test servers often use such certificates. The same thing happens when a proxy inspects HTTPS traffic and signs it with its own CA.

Pass the CA's certificate in caCertificates when you create the session, and the browser trusts it for that session.

Before you begin

Put your Steel API key in the STEEL_API_KEY environment variable, and install the Steel SDK for your language: TypeScript, Python, Go or Rust.

You also need the root certificate of the CA, in PEM format. The examples read it from a file named ca.pem.

Pass the CA certificates

Set caCertificates to a list of certificates. Each item is one root CA certificate in PEM format, the text that starts with -----BEGIN CERTIFICATE-----.

import { readFileSync } from "node:fs";

const session = await client.sessions.create({
  caCertificates: [readFileSync("ca.pem", "utf8")],
});

To trust more than one CA, add one item for each certificate.

If you bring your own proxy and it inspects HTTPS traffic, pass its CA certificate in caCertificates and its URL in proxyUrl in the same request.

Check that it worked

Open a page of the site in the session, and watch it in the live view. The page loads, and the browser shows no certificate warning.

Troubleshooting

net::ERR_CERT_AUTHORITY_INVALID

page.goto: net::ERR_CERT_AUTHORITY_INVALID at https://internal.example.com/

Cause: The browser does not trust the CA that signed the site's certificate. The session has no caCertificates, or it has a certificate from a different CA.

Fix: Create a new session with the root certificate of the CA that signed the site's certificate, in PEM format, in caCertificates.

Verify: Open the page again. It loads without the error.

Next steps

Reviewed November 26, 2026
Was this page helpful?