doctl compute certificate create

Go to Navigation

Usage

doctl compute certificate create [flags]

Aliases

c

Description

This command allows you to create a certificate. There are two supported certificate types: Let’s Encrypt certificates, and custom certificates.

Let’s Encrypt certificates are free and will be auto-renewed and managed for you by DigitalOcean.

To create a Let’s Encrypt certificate, you’ll need to add the domain(s) to your account at cloud.digitalocean.com, or via doctl compute domain create, then provide a certificate name and a comma-separated list of the domain names you’d like to associate with the certificate:

doctl compute certificate create --type lets_encrypt --name mycert --dns-names example.org

To upload a custom certificate, you’ll need to provide a certificate name, the path to the certificate, the path to the private key for the certificate, and the path to the certificate chain, all in PEM format:

doctl compute certificate create --type custom --name mycert --leaf-certificate-path cert.pem --certificate-chain-path fullchain.pem --private-key-path privkey.pem

Flags

Option Description
--certificate-chain-path The path to a full PEM-formatted trust chain between the certificate authority’s certificate and your domain’s SSL certificate.
--dns-names Comma-separated list of domains for which the certificate will be issued. The domains must be managed using DigitalOcean’s DNS.
--help , -h Help for this command
--leaf-certificate-path The path to a PEM-formatted public SSL certificate.
--name Certificate name (required)
--private-key-path The path to a PEM-formatted private-key corresponding to the SSL certificate.
--type Certificate type [custom|lets_encrypt]
Command Description
doctl compute certificate Display commands that manage SSL certificates and private keys

Global Flags

Option Description
--access-token, -t API V2 access token
--api-url, -u Override default API endpoint
--config, -c Specify a custom config file
Default:
  • macOS: ${HOME}/Library/Application Support/doctl/config.yaml
  • Linux: ${XDG_CONFIG_HOME}/doctl/config.yaml
  • Windows: %APPDATA%\doctl\config.yaml
--context Specify a custom authentication context name
--output, -o Desired output format [text|json]
Default: text
--trace Show a log of network activity while performing a command
Default: false
--verbose, -v Enable verbose output
Default: false