Skip to main content

CLI Reference

The easy-haproxy command is the native binary installed via pip or uv. Every option can be set as a CLI flag or an environment variable. CLI flags take precedence over environment variables.

easy-haproxy [OPTIONS]

For installation instructions, see Native install.

Core

FlagEnvironment VariableDefaultDescription
--discover MODEEASYHAPROXY_DISCOVERrequiredDiscovery mode: static, docker, swarm, kubernetes
--base-path PATHEASYHAPROXY_BASE_PATH/etc/easyhaproxy (root) ~/easyhaproxy (non-root)Base directory for all EasyHAProxy files
--label-prefix PREFIXEASYHAPROXY_LABEL_PREFIXeasyhaproxyLabel/annotation prefix used to discover services
--ssl-mode MODEEASYHAPROXY_SSL_MODEdefaultTLS policy: strict, default, or loose
--refresh-conf SECONDSEASYHAPROXY_REFRESH_CONF10Polling interval for configuration changes
--customer-errors BOOLHAPROXY_CUSTOMERRORSfalseEnable custom HAProxy HTML error pages

Logging

FlagEnvironment VariableDefaultDescription
--log-level LEVELEASYHAPROXY_LOG_LEVELDEBUGEasyHAProxy log level
--haproxy-log-level LEVELHAPROXY_LOG_LEVELINFOHAProxy process log level
--certbot-log-level LEVELCERTBOT_LOG_LEVELDEBUGCertbot log level

Valid levels: TRACE, DEBUG, INFO, WARN, ERROR, FATAL

Stats Dashboard

FlagEnvironment VariableDefaultDescription
--haproxy-password PASSWORDHAPROXY_PASSWORD(disabled)Enable stats dashboard with this password
--haproxy-username USERNAMEHAPROXY_USERNAMEadminStats dashboard username
--haproxy-stats-port PORTHAPROXY_STATS_PORT1936Stats dashboard port
--haproxy-stats-cors-origin ORIGINHAPROXY_STATS_CORS_ORIGIN(none)Allowed CORS origin for the stats dashboard
tip

The stats dashboard is only enabled when --haproxy-password (or HAPROXY_PASSWORD) is set.

ACME / Certbot (SSL certificates)

FlagEnvironment VariableDefaultDescription
--certbot-email EMAILEASYHAPROXY_CERTBOT_EMAIL(none)Contact email — enables ACME when set
--certbot-autoconfig CAEASYHAPROXY_CERTBOT_AUTOCONFIG(none)Well-known CA shorthand: letsencrypt, letsencrypt_test, buypass, buypass_test, sslcom_rca, sslcom_ecc, google, google_test, zerossl
--certbot-server URLEASYHAPROXY_CERTBOT_SERVER(none)Custom ACME server directory URL
--certbot-eab-kid KIDEASYHAPROXY_CERTBOT_EAB_KID(none)External Account Binding key ID
--certbot-eab-hmac-key KEYEASYHAPROXY_CERTBOT_EAB_HMAC_KEY(none)External Account Binding HMAC key
--certbot-retry-count NEASYHAPROXY_CERTBOT_RETRY_COUNT60Iterations before retrying after a rate limit
--certbot-preferred-challenges TYPEEASYHAPROXY_CERTBOT_PREFERRED_CHALLENGEShttpACME challenge type
--certbot-manual-auth-hook SCRIPTEASYHAPROXY_CERTBOT_MANUAL_AUTH_HOOK(none)Path to a manual auth hook script for certbot

See the full ACME documentation for details.

Plugins

FlagEnvironment VariableDefaultDescription
--plugins-enabled LISTEASYHAPROXY_PLUGINS_ENABLED(none)Comma-separated list of plugins to enable
--plugins-abort-on-error BOOLEASYHAPROXY_PLUGINS_ABORT_ON_ERRORfalseAbort startup if a plugin fails to load

See the plugins guide for available plugins.

Kubernetes

FlagEnvironment VariableDefaultDescription
--update-ingress-status BOOLEASYHAPROXY_UPDATE_INGRESS_STATUStrueUpdate Ingress status with load-balancer IP
--deployment-mode MODEEASYHAPROXY_DEPLOYMENT_MODEautoDeployment mode: auto, single, cluster
--external-hostname HOSTNAMEEASYHAPROXY_EXTERNAL_HOSTNAME(none)External hostname reported in Ingress status
--ingress-status-update-interval SECONDSEASYHAPROXY_STATUS_UPDATE_INTERVAL30Interval to update Ingress status