##############################################################
# This is the main config file for dehydrated ACME client    #
#                                                            #
# It's recomended to keep this file intact and set local     #
# config values into conf.d/local.sh file, see CONFIG_D      #
# parameter for details.                                     #
#                                                            #
# If the parameter --domains is not given to dehydrated,     #
# it tries to get a list of domains from the file            #
# /etc/dehydrated/domains.txt .                              #
#                                                            #
# By default certificates and private keys for domains are   #
# stored in subdirectories located at                        #
# /var/lib/dehydrated/certs/                                 #
#                                                            #
# To install keys and certificates into web server hooks     #
# can be used, see /etc/dehydrated/hook.sh                   #
#                                                            #
# For http-01 challenge type ACME server need to check       #
# challenge file from the WELLKNOWN directory, by default    #
# /var/lib/dehydrated/acme-challenge/                        #
# Web server needs to be configured to serve this directory  #
# as  http://<domain.tld>/.well-known/acme-challenge/        #
#                                                            #
# Certificates issued by letsencrypt have a relative short   #
# time to live. It is advised to run a cronjob which call    #
# /usr/bin/dehydrated --cron [other specific options]        #
# on a regular basic to renew certificates.                  #
#                                                            #
# Dehydrated script can be run under unprivileged account,   #
# To use the default BASEDIR storage user should be included #
# into _dehydrated group, installing issued certificates and #
# web server reload can be done via sudo.                    #
#                                                            #
#                                                            #
# Default values of this config are in comments              #
##############################################################

# Resolve names to addresses of IP version only. (curl)
# supported values: 4, 6
# default: <unset>
#IP_VERSION=

# Path to certificate authority (default: https://acme-v01.api.letsencrypt.org/directory)
#CA="https://acme-v01.api.letsencrypt.org/directory"

# Path to certificate authority license terms redirect (default: https://acme-v01.api.letsencrypt.org/terms)
#CA_TERMS="https://acme-v01.api.letsencrypt.org/terms"

# Path to license agreement (default: <unset>)
#LICENSE=""

# Which challenge should be used? Currently http-01 and dns-01 are supported
#CHALLENGETYPE="http-01"

# Path to a directory containing additional config files, allowing to override
# the defaults found in the main configuration file. Additional config files
# in this directory needs to be named with a '.sh' ending.
# default: <unset>
CONFIG_D="/etc/dehydrated/conf.d"

# Base directory for account key, generated certificates and list of domains (default: $SCRIPTDIR -- uses config directory if undefined)
BASEDIR="/var/lib/dehydrated"

# File containing the list of domains to request certificates for (default: $BASEDIR/domains.txt)
DOMAINS_TXT="/etc/dehydrated/domains.txt"

# Output directory for generated certificates
#CERTDIR="${BASEDIR}/certs"

# Directory for account keys and registration information
#ACCOUNTDIR="${BASEDIR}/accounts"

# Output directory for challenge-tokens to be served by webserver or deployed in HOOK (default: /var/www/dehydrated)
WELLKNOWN="${BASEDIR}/acme-challenge"

# Default keysize for private keys (default: 4096)
#KEYSIZE="4096"

# Path to openssl config file (default: <unset> - tries to figure out system default)
#OPENSSL_CNF=

# Program or function called in certain situations
#
# After generating the challenge-response, or after failed challenge (in this case altname is empty)
# Given arguments: clean_challenge|deploy_challenge altname token-filename token-content
#
# After successfully signing certificate
# Given arguments: deploy_cert domain path/to/privkey.pem path/to/cert.pem path/to/fullchain.pem
#
# BASEDIR and WELLKNOWN variables are exported and can be used in an external program
# default: <unset>
HOOK="/etc/dehydrated/hook.sh"

# Chain clean_challenge|deploy_challenge arguments together into one hook call per certificate (default: no)
#HOOK_CHAIN="no"

# Minimum days before expiration to automatically renew certificate (default: 30)
#RENEW_DAYS="30"

# Regenerate private keys instead of just signing new certificates on renewal (default: yes)
#PRIVATE_KEY_RENEW="yes"

# Create an extra private key for rollover (default: no)
#PRIVATE_KEY_ROLLOVER="no"

# Which public key algorithm should be used? Supported: rsa, prime256v1 and secp384r1
#KEY_ALGO=rsa

# E-mail to use during the registration (default: <unset>)
#CONTACT_EMAIL=

# Lockfile location, to prevent concurrent access (default: $BASEDIR/lock)
LOCKFILE="${BASEDIR}/locks/lock"

# Option to add CSR-flag indicating OCSP stapling to be mandatory (default: no)
#OCSP_MUST_STAPLE="no"
