Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Writes the public key of the root certificate that Dev Proxy uses for decrypting SSL traffic to a file. Creates the certificate if it doesn't exist. Doesn't require a running Dev Proxy instance.
Synopsis
devproxy cert export [options]
Options:
--file <path> Path of the file to write the certificate to
--format <pem|crt|der> Certificate format: pem, crt (PEM-encoded) or der (binary)
--log-level <level> Logging level: trace|debug|information|warning|error
--output <format> Output format: text|json (default: text)
-h, --help Show help
Usage
devproxy cert export
Arguments
None
Options
| Name | Description | Allowed values | Default |
|---|---|---|---|
--file <path> |
Path of the file to write the certificate to. Supports ~ for your home folder. Dev Proxy creates missing folders and overwrites the file if it exists. |
file path | dev-proxy-ca.<format> in the current folder |
--format <format> |
Certificate format. pem and crt write the PEM-encoded certificate. der writes the binary DER-encoded certificate. |
pem, crt, der |
Format matching the --file extension (.crt, .der), otherwise pem |
--log-level <loglevel> |
Level of messages to log | trace, debug, information, warning, error |
information |
--output <format> |
Output format | text, json |
text |
-?, -h, --help |
Show help and usage information | n/a | n/a |
Examples
Write the certificate to dev-proxy-ca.pem
devproxy cert export
Write the certificate as a .crt file
devproxy cert export --file dev-proxy-ca.crt
Because the file has the .crt extension, Dev Proxy writes the certificate in the crt format.
Write the certificate in the DER format
devproxy cert export --format der
Dev Proxy writes the certificate to dev-proxy-ca.der in the current folder.
Use the path of the exported certificate in a script
CA=$(devproxy cert export)
NODE_EXTRA_CA_CERTS=$CA node index.js
Get the result as JSON
devproxy cert export --output json
The JSON output contains the path and format properties.
Remarks
The command writes only the public certificate. It never writes the private key. Use the exported certificate to trust Dev Proxy in tools and environments that don't use your operating system's certificate store, such as Node.js, Docker containers, WSL, or CI/CD runners.
The command prints only the absolute path of the written file to standard output, so you can capture it in a script. Dev Proxy writes log messages to standard error.
If the root certificate doesn't exist, the command creates it in the same way as cert ensure, but doesn't trust it. If Dev Proxy can't save the root certificate, for example, because it can't write to the folder where it stores the certificate, the command fails, because Dev Proxy would create a different certificate on its next run.
Each Dev Proxy installation uses its own root certificate. If you recreate the certificate, for example, using cert remove and cert ensure, export it again.
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Dev Proxy couldn't create, save, or export the certificate |
2 |
Invalid input or usage |