### Context - Before Source: https://github.com/go-acme/lego/blob/main/docs/content/migration/library.md Example of how context was handled before v5. ```go // Before client.Certificate.Obtain(request) ``` -------------------------------- ### Context - After Source: https://github.com/go-acme/lego/blob/main/docs/content/migration/library.md Example of how context is handled in v5. ```go // After client.Certificate.Obtain(context.TODO(), request) ``` -------------------------------- ### Example CLI usage Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_manual.md Demonstrates starting lego with the manual DNS provider and the initial prompts. ```console $ lego run --dns manual -d example.com No key found for account you@example.com. Generating a P256 key. Saved key to ./.lego/accounts/acme-v02.api.letsencrypt.org/you@example.com/keys/you@example.com.key Please review the TOS at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf Do you accept the TOS? Y/n ``` -------------------------------- ### Snap Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs lego using snap. ```bash sudo snap install lego ``` -------------------------------- ### Docker Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs and runs the lego Docker image to display its help message. ```bash docker run goacme/lego -h ``` -------------------------------- ### Account Configuration Example Source: https://github.com/go-acme/lego/blob/main/docs/content/references/ref-file/_index.md Example of how to configure an account within the lego configuration file. ```yaml accounts: # The ID/Name of the account. # # Required. myAccount: # The ACME server. # # It can be: # 1. a URL # 2. a short code (see the shortcode section) # 3. a reference to the ID of a server defined in the servers configuration section # # Default: https://acme-v02.api.letsencrypt.org/directory server: https://example.com/dir # The account email. # # Optional. email: foo@example.com # The key type used to generate the account private key. # # Default: EC256 keyType: RSA2048 # The acceptance of the terms of service. # # Default: false acceptsTermsOfService: true # The External Account Binding (EAB) configuration. # # Optional. eab: # The External Account Binding (EAB) KID. # # Required. kid: foo # The External Account Binding (EAB) HMAC key. # # Required. hmacKey: foo ``` -------------------------------- ### Example bash command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_manual.md An example of how to run lego with the manual DNS provider. ```bash lego run --dns manual -d '*.example.com' -d example.com ``` -------------------------------- ### Install from sources (latest version) Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs the latest version of lego from source using go install. ```bash go install github.com/go-acme/lego/v5@latest ``` -------------------------------- ### Logging Configuration Example Source: https://github.com/go-acme/lego/blob/main/docs/content/references/ref-file/_index.md Example of how to configure logging in the lego configuration file. ```yaml log: # The logging level. # # Default: info level: debug # The logging format. # # Supported: # - text # - json # - colored # # Default: colored format: json ``` -------------------------------- ### Example Usage Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_dnshomede.md Example bash commands demonstrating how to use the dnsHome.de provider with lego. ```bash DNSHOMEDE_CREDENTIALS=example.org:password \ lego run --dns dnshomede -d '*.example.com' -d example.com DNSHOMEDE_CREDENTIALS=my.example.org:password1,demo.example.org:password2 \ lego run --dns dnshomede -d my.example.org -d demo.example.org ``` -------------------------------- ### Systemd Timer Example Source: https://github.com/go-acme/lego/blob/main/docs/content/advanced/tips.md Example of how to configure systemd timers with a random delay for certificate renewals. ```ini [Unit] Description=Renew certificates [Timer] Persistent=true # avoid: #OnCalendar=*-*-* 00:00:00 #OnCalendar=daily # instead, use a randomly chosen time: OnCalendar=*-*-* 3:35 # add extra delay, here up to 1 hour: RandomizedDelaySec=1h [Install] WantedBy=timers.target ``` -------------------------------- ### AUR Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs lego from the AUR using yay. ```bash yay -S lego-bin ``` -------------------------------- ### Example Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_manageengine.md This is an example bash command to run lego with the ManageEngine CloudDNS provider. ```bash MANAGEENGINE_CLIENT_ID="xxx" \ MANAGEENGINE_CLIENT_SECRET="yyy" \ lego run --dns manageengine -d '*.example.com' -d example.com ``` -------------------------------- ### Gentoo Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs lego on Gentoo after enabling the GURU repository. ```bash emerge app-crypt/lego ``` -------------------------------- ### dns.la CLI Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_dnsla.md Example bash command to run lego with the dns.la provider. ```bash DNSLA_API_SECRET="xxx" \ DNSLA_API_SECRET="yyy" \ lego run --dns dnsla -d '*.example.com' -d example.com ``` -------------------------------- ### Server Configuration Example Source: https://github.com/go-acme/lego/blob/main/docs/content/references/ref-file/_index.md Example of how to configure ACME servers in the lego configuration file. ```yaml servers: # The ID/Name of the server. # # Required. myServer: # The ACME server URL. # # Required. url: https://example.com/dir # ACME overall requests limit. # # Default: 18 overallRequestLimit: 7 # Skip the TLS verification of the ACME server. # # Default: false tlsSkipVerify: true # The HTTP timeout value to a specific value in seconds. # # Default: 30 httpTimeout: 60 # The certificate timeout value to a specific value in seconds. # Only used when getting certificates. # # Default: 30 certTimeout: 60 ``` -------------------------------- ### OpenBSD Ports Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs lego on OpenBSD using pkg_add. ```bash pkg_add lego ``` -------------------------------- ### LuaDNS Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_luadns.md Example bash command using the LuaDNS provider. ```bash LUADNS_API_USERNAME=youremail \ LUADNS_API_TOKEN=xxxxxxxx \ lego run --dns luadns -d '*.example.com' -d example.com ``` -------------------------------- ### HTTP Request Example Source: https://github.com/go-acme/lego/blob/main/providers/dns/internal/clientdebug/testdata/headers.txt An example of an HTTP GET request with various headers and a JSON body. ```http [HTTP Request] GET /path-aaaa-aaaa?foo=query-aaaa-aaaa HTTP/1.1 Host: {{ .Host }} User-Agent: Go-http-client/1.1 Content-Length: 37 Api-Key: *** Auth-Token: *** Authorization: *** Secret-Request-Header: *** Super-Secret-Request-Header: *** Token: *** X-Api-Key: *** X-Api-Secret: *** X-Auth-Token: *** X-Authorization: not-redacted X-Token: *** Accept-Encoding: gzip { "foo": "request-body-aaaa-aaaa" } ``` -------------------------------- ### Bluecat Provider Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_bluecat.md Example bash command for using the Bluecat provider with lego. ```bash BLUECAT_PASSWORD=mypassword \ BLUECAT_DNS_VIEW=myview \ BLUECAT_USER_NAME=myusername \ BLUECAT_CONFIG_NAME=myconfig \ BLUECAT_SERVER_URL=https://bam.example.com \ BLUECAT_TTL=30 \ lego run --dns bluecat -d '*.example.com' -d example.com ``` -------------------------------- ### Get Zones Response Example Source: https://github.com/go-acme/lego/blob/main/providers/dns/netnod/internal/Netnod-Primary-DNS-API.md Example JSON response for a successful request to retrieve zones. ```json { "data": [ { "id": "example.com.", "name": "example.com.", "notified_serial": 2025110401 }, { "id": "test.com.", "name": "test.com.", "notified_serial": 2025110402 } ], "offset": 0, "limit": 50, "total": 2 } ``` -------------------------------- ### Get Zones Request Example Source: https://github.com/go-acme/lego/blob/main/providers/dns/netnod/internal/Netnod-Primary-DNS-API.md Example of a curl request to retrieve a paginated list of zones. ```shell curl -X GET "https://primarydnsapi.netnod.se/api/v1/zones?offset=0&limit=50" \ -H "Authorization: Token " ``` -------------------------------- ### Get Zone Details Response Source: https://github.com/go-acme/lego/blob/main/providers/dns/netnod/internal/Netnod-Primary-DNS-API.md Example JSON response for a successful GET /api/v1/zones/{zoneId} request. ```json { "id": "example.com.", "name": "example.com.", "notified_serial": 2025110401, "also_notify": ["1.2.3.4"], "allow_transfer_keys": ["netnod-something-key1.", "netnod-something-key2."], "endcustomer": "customer123", "rrsets": [ { "name": "example.com.", "type": "SOA", "ttl": 3600, "records": [ { "content": "ns1.example.com. hostmaster.example.com. 2025110401 10800 3600 604800 3600", "disabled": false } ] }, { "name": "example.com.", "type": "NS", "ttl": 3600, "records": [ { "content": "ns1.example.com.", "disabled": false }, { "content": "ns2.example.com.", "disabled": false } ] } ] } ``` -------------------------------- ### Hooks Configuration Example Source: https://github.com/go-acme/lego/blob/main/docs/content/references/ref-file/_index.md Example of how to configure pre, deploy, and post hooks in the lego configuration file. ```yaml hooks: # The pre-hook. # # Optional. pre: # The command to execute. # # Required. command: "./my-pre-hook.sh" # The timeout of the command. # # optional. # Default: 2 minutes. timeout: 3s # The deploy-hook. # # Optional. deploy: # The command to execute. # # Required. command: "./my-deploy-hook.sh" # The timeout of the command. # # optional. # Default: 2 minutes. timeout: 3s # The post-hook. # # Optional. post: # The command to execute. # # Required. command: "./my-post-hook.sh" # The timeout of the command. # # optional. # Default: 2 minutes. timeout: 3s ``` -------------------------------- ### Example Hook Script Source: https://github.com/go-acme/lego/blob/main/docs/content/advanced/hooks.md An example script demonstrating how to use environment variables passed to hooks to install and reload certificates for a mail server. ```bash #!/bin/bash # copy certificates to a directory controlled by Postfix postfix_cert_dir="/etc/postfix/certificates" # our Postfix server only handles mail for @example.com domain if [ "$LEGO_HOOK_CERT_NAME" = "example.com" ]; then install -u postfix -g postfix -m 0644 "$LEGO_HOOK_CERT_PATH" "$postfix_cert_dir" install -u postfix -g postfix -m 0640 "$LEGO_HOOK_CERT_KEY_PATH" "$postfix_cert_dir" systemctl reload postfix@-service fi ``` -------------------------------- ### HTTP Request Example Source: https://github.com/go-acme/lego/blob/main/providers/dns/internal/clientdebug/testdata/values.txt An example of an HTTP GET request with various headers and a JSON body, demonstrating redacted sensitive information. ```http [HTTP Request] GET /***?foo=*** HTTP/1.1 Host: {{ .Host }} User-Agent: Go-http-client/1.1 Content-Length: 37 Api-Key: *** Auth-Token: *** Authorization: *** Secret-Request-Header: request-header-aaaa-aaaa Super-Secret-Request-Header: env-aaaa-aaaa Token: *** X-Api-Key: *** X-Api-Secret: *** X-Auth-Token: *** X-Authorization: not-redacted X-Token: *** Accept-Encoding: gzip { "foo": "***" } ``` -------------------------------- ### With a Configuration File Source: https://github.com/go-acme/lego/blob/main/docs/content/obtain/dnspersist01.md Create a .lego.yml file with the following content and execute lego. ```yaml certificates: foo: challenge: dns-persist-01 domains: - example.com ``` ```bash lego ``` -------------------------------- ### Get Zones Request Example with End Customer Filter Source: https://github.com/go-acme/lego/blob/main/providers/dns/netnod/internal/Netnod-Primary-DNS-API.md Example of a curl request to retrieve zones filtered by a specific end customer. ```shell curl -X GET "https://primarydnsapi.netnod.se/api/v1/zones?endcustomer=customer123" \ -H "Authorization: Token " ``` -------------------------------- ### Get DNS Record Source: https://github.com/go-acme/lego/blob/main/providers/dns/derak/internal/readme.md Example of how to retrieve a single DNS record using curl. ```bash curl -X GET --user "api:YOUR_API_KEY" \ https://api.derak.cloud/v1.0/zones/47c0ecf6c91243308c649ad1d2d618dd/dnsrecords/:recordId ``` -------------------------------- ### Build from sources (local clone) Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Clones the lego repository and builds it locally. ```bash git clone git@github.com:go-acme/lego.git cd lego make # tests + doc + build make build # only build ``` -------------------------------- ### Remove TXT record Source: https://github.com/go-acme/lego/blob/main/providers/dns/dnshomede/internal/readme.md Example URL for removing a TXT record from dnshome.de. Supports GET or POST. ```bash https://:@www.dnshome.de/dyndns.php?acme=rm ``` -------------------------------- ### Alibaba Cloud DNS Provider Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_alidns.md Example bash commands for setting up Alibaba Cloud DNS provider with lego, using either instance RAM role or explicit credentials. ```bash # Setup using instance RAM role ALICLOUD_RAM_ROLE=lego \ lego run --dns alidns -d '*.example.com' -d example.com # Or, using credentials ALICLOUD_ACCESS_KEY=abcdefghijklmnopqrstuvwx \ ALICLOUD_SECRET_KEY=your-secret-key \ ALICLOUD_SECURITY_TOKEN=your-sts-token \ lego run --dns alidns - -d '*.example.com' -d example.com ``` -------------------------------- ### Add TXT record Source: https://github.com/go-acme/lego/blob/main/providers/dns/dnshomede/internal/readme.md Example URL for adding a TXT record to dnshome.de. Supports GET or POST. ```bash https://:@www.dnshome.de/dyndns.php?acme=add&txt= ``` -------------------------------- ### Leaseweb CLI Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_leaseweb.md Example bash command to run lego with the Leaseweb DNS provider. ```bash LEASEWEB_API_KEY="xxxxxxxxxxxxxxxxxxxxx" \ lego run --dns leaseweb -d '*.example.com' -d example.com ``` -------------------------------- ### List DynDNS-enabled Labels (GET /api/v1/zones/{zoneId}/dyndns) Source: https://github.com/go-acme/lego/blob/main/providers/dns/netnod/internal/Netnod-Primary-DNS-API.md Example of listing all DynDNS-enabled labels for a zone. ```shell curl -X GET "https://primarydnsapi.netnod.se/api/v1/zones/example.com./dyndns" \ -H "Authorization: Token " ``` -------------------------------- ### TLS-ALPN-01 Source: https://github.com/go-acme/lego/blob/main/docs/content/advanced/file-configuration.md Minimal example for a certificate (Let's Encrypt). ```yaml # .lego.yml certificates: my-cert: challenge: tls-alpn-01 domains: - example.com ``` -------------------------------- ### Get Zone Details Source: https://github.com/go-acme/lego/blob/main/providers/dns/netnod/internal/Netnod-Primary-DNS-API.md Example of how to retrieve detailed information about a specific DNS zone using curl. ```shell curl -X GET "https://primarydnsapi.netnod.se/api/v1/zones/example.com." -H "Authorization: Token " ``` -------------------------------- ### CLI Command Migration Example Source: https://github.com/go-acme/lego/blob/main/docs/content/migration/cli.md Demonstrates the change in command structure from v4 to v5, where global flags are moved to command-specific flags. ```bash # Before lego --dns foo -d '*.example.com' -d example.com run ``` ```bash # After lego run --dns foo -d '*.example.com' -d example.com ``` -------------------------------- ### With a Configuration File Source: https://github.com/go-acme/lego/blob/main/docs/content/obtain/dns01.md Create a .lego.yml file with the following content and execute lego to point lego at an external authoritative server for the zone using the resolvers parameter. ```yaml challenges: cf: dns: provider: cloudflare resolvers: - 9.9.9.9:53 certificates: foo: domains: - example.org - '*.example.org' ``` ```bash CLOUDFLARE_EMAIL='you@example.com' \ CLOUDFLARE_API_KEY='yourprivatecloudflareapikey' \ lego ``` -------------------------------- ### Bluecat v2 Example Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_bluecatv2.md Example bash command to run lego with the Bluecat v2 DNS provider. ```bash BLUECATV2_SERVER_URL="https://example.com" \ BLUECATV2_USERNAME="xxx" \ BLUECATV2_PASSWORD="yyy" \ BLUECATV2_CONFIG_NAME="myConfiguration" \ BLUECATV2_VIEW_NAME="myView" \ lego run --dns bluecatv2 -d '*.example.com' -d example.com ``` -------------------------------- ### Homebrew Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs lego on macOS using Homebrew. ```bash brew install lego ``` ```bash pkg install lego ``` -------------------------------- ### DNS Made Easy Example Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_dnsmadeeasy.md Example bash command to run lego with the DNS Made Easy provider. ```bash DNSMADEEASY_API_KEY=xxxxxx \ DNSMADEEASY_API_SECRET=yyyyy \ lego run --dns dnsmadeeasy -d '*.example.com' -d example.com ``` -------------------------------- ### WEDOS Example Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_wedos.md An example bash command demonstrating how to use the WEDOS DNS provider with lego to obtain SSL certificates. ```bash WEDOS_USERNAME=xxxxxxxx \ WEDOS_WAPI_PASSWORD=xxxxxxxx \ lego run --dns wedos -d '*.example.com' -d example.com ``` -------------------------------- ### HTTP-01 Source: https://github.com/go-acme/lego/blob/main/docs/content/advanced/file-configuration.md Minimal example for a certificate (Let's Encrypt). ```yaml # .lego.yml certificates: my-cert: challenge: http-01 domains: - example.com ``` -------------------------------- ### BookMyName CLI Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_bookmyname.md Example bash command to run lego with the BookMyName DNS provider. ```bash BOOKMYNAME_USERNAME="xxx" \ BOOKMYNAME_PASSWORD="yyy" \ lego run --dns bookmyname -d '*.example.com' -d example.com ``` -------------------------------- ### FreeBSD Ports Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs lego on FreeBSD using pkg. ```bash pkg install lego ``` -------------------------------- ### Arch Linux Installation Source: https://github.com/go-acme/lego/blob/main/docs/content/install/_index.md Installs lego on Arch Linux using pacman. ```bash pacman -S lego ``` -------------------------------- ### Example Usage Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_dnsservices.md This command demonstrates how to use the DNS.services provider with lego to obtain a certificate for a domain. ```bash DNSSERVICES_USERNAME="xxxxxxxxxxxxxxxxxxxxx" \ DNSSERVICES_PASSWORD="xxxxxxxxxxxxxxxxxxxxx" \ lego run --dns dnsservices -d '*.example.com' -d example.com ``` -------------------------------- ### Selectel v2 Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_selectelv2.md Example bash command for using the Selectel v2 DNS provider with lego. ```bash SELECTELV2_USERNAME= trex \ SELECTELV2_PASSWORD=xxxxx \ SELECTELV2_ACCOUNT_ID=1234567 \ SELECTELV2_PROJECT_ID=111a11111aaa11aa1a11aaa11111aa1a \ lego run --dns selectelv2 -d '*.example.com' -d example.com ``` -------------------------------- ### Example TXT record instruction Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_manual.md Shows the TXT record that needs to be created for the DNS-01 challenge. ```text _acme-challenge.example.com. 120 IN TXT "hX0dPkG6Gfs9hUvBAchQclkyyoEKbShbpvJ9mY5q2JQ" ``` -------------------------------- ### Install Pebble Source: https://github.com/go-acme/lego/blob/main/e2e/readme.md Installs the Pebble ACME server and its challenge test server using go install. ```bash go install github.com/letsencrypt/pebble/v2/cmd/pebble@v2.10.1 go install github.com/letsencrypt/pebble/v2/cmd/pebble-challtestsrv@v2.10.1 ``` -------------------------------- ### SPF Record Source: https://github.com/go-acme/lego/blob/main/providers/dns/artfiles/internal/fixtures/txt_record.txt Example of an SPF TXT record. ```dns @ "v=spf1 a mx ~all" ``` -------------------------------- ### Syse Provider Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_syse.md Example bash commands demonstrating how to use the Syse DNS provider with lego. ```bash SYSE_CREDENTIALS=example.com:password \ lego run --dns syse -d '*.example.com' -d example.com SYSE_CREDENTIALS=example.org:password1,example.com:password2 \ lego run --dns syse -d '*.example.org' -d example.org -d '*.example.com' -d example.com ``` -------------------------------- ### MTA-STS Record Source: https://github.com/go-acme/lego/blob/main/providers/dns/artfiles/internal/fixtures/txt_record.txt Example of an MTA-STS TXT record. ```dns _mta-sts "v=STSv1;id=yyyymmddTHHMMSS;" ``` -------------------------------- ### Run linters, tests, and build Source: https://github.com/go-acme/lego/blob/main/CONTRIBUTING.md Commands to run the project's linters, tests, and build process. ```bash # Linters make checks # Tests make test # Compile make build ``` -------------------------------- ### Domeneshop Example Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_domeneshop.md Example bash command to run lego with the Domeneshop DNS provider. ```bash DOMENESHOP_API_TOKEN= \ DOMENESHOP_API_SECRET= \ lego run --dns domeneshop -d '*.example.com' -d example.com ``` -------------------------------- ### DMARC Record Source: https://github.com/go-acme/lego/blob/main/providers/dns/artfiles/internal/fixtures/txt_record.txt Example of a DMARC TXT record. ```dns _dmarc "v=DMARC1;p=reject;sp=reject;adkim=r;aspf=r;pct=100;rua=mailto:someone@in.mailhardener.com,mailto:postmaster@example.tld;ri=86400;ruf=mailto:someone@in.mailhardener.com,mailto:postmaster@example.tld;fo=1;rf=afrf" ``` -------------------------------- ### Example Bash Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_ipv64.md A bash command demonstrating how to use the lego CLI with the IPv64 DNS provider to obtain certificates for multiple domains. ```bash IPV64_API_KEY=xxxxxx \ lego run --dns ipv64 -d '*.example.com' -d example.com ``` -------------------------------- ### OpusDNS Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_opusdns.md Example bash command using the OpusDNS provider. ```bash OPUSDNS_API_KEY=opk_xxxxxxxxxxxxxxxxxxxxxxxx \ lego run --dns opusdns -d '*.example.com' -d example.com ``` -------------------------------- ### EasyDNS Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_easydns.md Here is an example bash command using the EasyDNS provider: ```bash EASYDNS_TOKEN=xxx \ EASYDNS_KEY=yyy \ lego run --dns easydns -d '*.example.com' -d example.com ``` -------------------------------- ### Example Bash Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_hostingnl.md This command demonstrates how to use the lego CLI with the Hosting.nl DNS provider to obtain a certificate for a domain. ```bash HOSTINGNL_API_KEY="xxxxxxxxxxxxxxxxxxxxx" \ lego run --dns hostingnl -d '*.example.com' -d example.com ``` -------------------------------- ### DNSimple Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_dnsimple.md Example bash command using the DNSimple provider. ```bash DNSIMPLE_OAUTH_TOKEN=1234567890abcdefghijklmnopqrstuvwxyz \ lego run --dns dnsimple -d '*.example.com' -d example.com ``` -------------------------------- ### Example command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_dnsexit.md Here is an example bash command using the DNSExit provider: ```bash DNSEXIT_API_KEY="xxxxxxxxxxxxxxxxxxxxx" \ lego run --dns dnsexit -d '*.example.com' -d example.com ``` -------------------------------- ### VinylDNS Provider Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_vinyldns.md Example bash command using the VinylDNS provider. ```bash VINYLDNS_ACCESS_KEY=xxxxxx \ VINYLDNS_SECRET_KEY=yyyyy \ VINYLDNS_HOST=https://api.vinyldns.example.org:9443 \ lego run --dns vinyldns -d '*.example.com' -d example.com ``` -------------------------------- ### PowerDNS Provider Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_pdns.md Example bash command using the PowerDNS provider. ```bash PDNS_API_URL=http://pdns-server:80/ \ PDNS_API_KEY=xxxx \ lego run --dns pdns -d '*.example.com' -d example.com ``` -------------------------------- ### Error Response Example Source: https://github.com/go-acme/lego/blob/main/providers/dns/ispconfig/internal/readme.md Example of an error response from the ISPConfig API. ```json { "code": "", "message": "", "response": false } ``` -------------------------------- ### Example Usage Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_ionoscloud.md This example demonstrates how to use the lego CLI with the Ionos Cloud DNS provider to obtain certificates for a domain and its wildcard. ```bash IONOSCLOUD_API_TOKEN="xxxxxxxxxxxxxxxxxxxxx" \ lego run --dns ionoscloud -d '*.example.com' -d example.com ``` -------------------------------- ### Dinahosting Example Command Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_dinahosting.md Example bash command to obtain a certificate using the Dinahosting DNS provider. ```bash DINAHOSTING_USERNAME="xxx" \ DINAHOSTING_PASSWORD="yyy" \ lego run --dns dinahosting -d '*.example.com' -d example.com ``` -------------------------------- ### Bindman Provider Example Source: https://github.com/go-acme/lego/blob/main/docs/content/dns/zz_gen_bindman.md Example bash command to run the lego client with the Bindman DNS provider. ```bash BINDMAN_MANAGER_ADDRESS= \ lego run --dns bindman -d '*.example.com' -d example.com ``` -------------------------------- ### ACME Challenge Record Source: https://github.com/go-acme/lego/blob/main/providers/dns/artfiles/internal/fixtures/txt_record.txt Example of an ACME challenge TXT record. ```dns _acme-challenge "TheAcmeChallenge" ```