Skip to main content

ionic ssl generate

Generates an SSL key & certificate

$ ionic ssl generate [options]

Uses OpenSSL to create a self-signed certificate for localhost (by default).

After the certificate is generated, you will still need to add it to your system or browser as a trusted certificate.

The default directory for --key-path and --cert-path is .ionic/ssl/.

Options#

--key-path =<path>

Description

Destination of private key file

Default./.ionic/ssl/key.pem

--cert-path =<path>

Description

Destination of certificate file

Default./.ionic/ssl/cert.pem

Advanced Options#

--country-name =<C>

Description

The country name (C) of the SSL certificate

DefaultUS

--state-or-province-name =<ST>

Description

The state or province name (ST) of the SSL certificate

DefaultWisconsin

--locality-name =<L>

Description

The locality name (L) of the SSL certificate

DefaultMadison

--organization-name =<O>

Description

The organization name (O) of the SSL certificate

DefaultIonic

--common-name =<CN>

Description

The common name (CN) of the SSL certificate

Defaultlocalhost

--bits =<bits>

Description

Number of bits in the key

Aliases-b
Default2048