alpacon csr create
Create a certificate signing request (CSR).
Usage
alpacon csr create [flags]
Key facts
- Supply
--domainor--ipto run non-interactively. - Use
--keyand--outto choose the private-key and CSR file paths. - Omit
--valid-days, or leave its interactive prompt blank, to use the certificate authority’s default validity.
Flags
| Flag | Type | Description | Default |
|---|---|---|---|
-d, --domain | string | Comma-separated domain list (e.g., a.com,b.com) | — |
-h, --help | bool | Show command help. | false |
-i, --ip | string | Comma-separated IP list (e.g., 192.168.1.1) | — |
-k, --key | string | Path for the private key file | — |
-o, --out | string | Path for the CSR output file | — |
--valid-days | int | Certificate validity in days. Specify a positive integer. | CA’s default validity when omitted |
--output | string | Output format: table or json. Inherited by all commands. | table |
Validity and recovery
The requested validity must be between 1 day and the certificate authority’s Max Valid Days shown by alpacon authority ls. A value above that maximum returns 400 cert_invalid_period. Specify a value within the maximum, or omit --valid-days to use the authority’s default. If the omitted value is also refused, the authority’s default exceeds its maximum; ask the authority’s owner to correct its settings or specify a valid value.
Examples
Create a CSR non-interactively
alpacon csr create --domain test.example.com