Skip to content

devlanes is in beta and not ready for production use.Report an issue

Trust the devlanes CA

Follow these steps when a browser or a program on your machine rejects the certificate of a lane hostname.

devlanes signs each certificate with the devlanes CA, a certificate authority devlanes creates on your machine. The setup command adds the CA to the stores your user config lists, and to the system store when it lists none.

macOS

The system store is your login keychain, which Safari, Chrome and Edge read, and Firefox with its default settings. Nothing to add.

Linux

Browsers on Linux keep stores of their own, so list them next to the system store. Both need the NSS tools, libnss3-tools on Debian and Ubuntu.

~/.devlanes/config.yaml
tls:
trust: [system, chrome, firefox]

Windows

The system store is your user’s store, which Chrome and Edge read, and Firefox with its default settings. Nothing to add.

tls.trust lists every store. Inside WSL the store to add is windows, as Run devlanes in WSL shows.

Run the setup command in your own terminal, since your system asks for a password or a confirmation:

Terminal window
$ devlanes setup

Then check that each store trusts the CA. The doctor prints a fix under any store that does not.

Terminal window
$ devlanes doctor

Node, Bun, Deno, Python, Rust, Go and Java services that devlanes starts already trust the CA. For commands you start yourself, open a shell with the same variables from the worktree:

Terminal window
$ devlanes env shell

Or set them in your shell profile:

bash

~/.bashrc
export NODE_EXTRA_CA_CERTS="$HOME/.devlanes/ca/ca.pem"
export DENO_CERT="$HOME/.devlanes/ca/ca.pem"
export SSL_CERT_FILE="$HOME/.devlanes/ca/bundle.pem"
export REQUESTS_CA_BUNDLE="$HOME/.devlanes/ca/bundle.pem"
export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:+$JAVA_TOOL_OPTIONS }-Djavax.net.ssl.trustStore=\"$HOME/.devlanes/ca/truststore.p12\" -Djavax.net.ssl.trustStoreType=PKCS12 -Djavax.net.ssl.trustStorePassword=changeit"

zsh

~/.zshrc
export NODE_EXTRA_CA_CERTS="$HOME/.devlanes/ca/ca.pem"
export DENO_CERT="$HOME/.devlanes/ca/ca.pem"
export SSL_CERT_FILE="$HOME/.devlanes/ca/bundle.pem"
export REQUESTS_CA_BUNDLE="$HOME/.devlanes/ca/bundle.pem"
export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:+$JAVA_TOOL_OPTIONS }-Djavax.net.ssl.trustStore=\"$HOME/.devlanes/ca/truststore.p12\" -Djavax.net.ssl.trustStoreType=PKCS12 -Djavax.net.ssl.trustStorePassword=changeit"

PowerShell

$PROFILE
$env:NODE_EXTRA_CA_CERTS = "$env:USERPROFILE\.devlanes\ca\ca.pem"
$env:DENO_CERT = "$env:USERPROFILE\.devlanes\ca\ca.pem"
$env:SSL_CERT_FILE = "$env:USERPROFILE\.devlanes\ca\bundle.pem"
$env:REQUESTS_CA_BUNDLE = "$env:USERPROFILE\.devlanes\ca\bundle.pem"
$env:JAVA_TOOL_OPTIONS = "$env:JAVA_TOOL_OPTIONS -Djavax.net.ssl.trustStore=`"$env:USERPROFILE\.devlanes\ca\truststore.p12`" -Djavax.net.ssl.trustStoreType=PKCS12 -Djavax.net.ssl.trustStorePassword=changeit".Trim()

bundle.pem holds the system’s root certificates plus the devlanes CA, and truststore.p12 holds the same certificates for Java. Every JVM prints a Picked up JAVA_TOOL_OPTIONS line when it starts. Go programs read SSL_CERT_FILE on Linux and the system store on macOS and Windows. The curl of macOS and Linux uses the system store and needs nothing.

devlanes adds its trust store to JAVA_TOOL_OPTIONS after the value from your shell, mise or direnv. A JAVA_TOOL_OPTIONS in the project file’s env, global_env or a profile replaces it, and the start shows a note. Put JVM flags in the command itself, in -Dspring-boot.run.jvmArguments for spring-boot:run, or in MAVEN_OPTS or JAVA_OPTS where your build reads them.

A JAVA_TOOL_OPTIONS that sets javax.net.ssl.trustStore itself is kept as it is. Use that for a program that needs its own trust store, such as one that relies on roots someone imported into the JDK’s cacerts, which the devlanes trust store does not hold.

If curl.exe rejects the certificate on Windows

Section titled “If curl.exe rejects the certificate on Windows”

curl.exe checks for a revocation list, which the devlanes CA does not publish. Add a flag that skips that check and still verifies the certificate:

Terminal window
$ curl.exe --ssl-revoke-best-effort https://myapp.localhost/

devlanes can sign with mkcert’s CA instead of its own, so browsers that trust mkcert need nothing new:

~/.devlanes/config.yaml
tls:
ca: mkcert
Terminal window
$ devlanes daemon restart

mkcert’s CA can sign any name, unlike the devlanes CA; Security has what that changes.