Skip to main content

ACME HTTP Connector

Publish ACME challenges and deploy certificates through your HTTP APIs.

PyPI Python License

Documentation · Source code · Issues · Certbot adapter

What it does

ACME HTTP Connector connects your certificate automation to an existing HTTP API. Use it to publish an HTTP-01 challenge, remove it after validation, and send issued certificates to the service that needs them.

Operation What your API receives
Publish a challenge The challenge path and key authorization text
Clean up a challenge The challenge path to remove
Deploy a certificate The domain, certificate, private key and optional chain

The library works independently of Certbot. Your ACME client remains responsible for requesting certificates and completing validation; your HTTP service exposes the challenge to the certificate authority.

Installation

Requires Python 3.10 or newer. Core 0.2.2 requires Sonicprobe 0.3.66 or newer; it remains independent of Certbot.

python -m pip install acme-http-connector

Using Certbot? Install certbot-httpreq instead. It includes this library and provides the Certbot plugins.

Dehydrated hook

The package installs acme-http-dehydrated, a Dehydrated 0.7.2 HTTP-01 hook that publishes and cleans single or chained challenges and deploys issued certificates. No Certbot installation is required. The hook is included starting with core 0.2.0.

Set Dehydrated HOOK to the command's absolute path and CHALLENGETYPE="http-01". Configure API endpoints in /etc/acme-http-connector.yml, or set ACME_HTTP_CONNECTOR_CONFIG to another YAML path. See Dehydrated setup for directory setup, issuance and renewal.

Unknown lifecycle hooks succeed without action. Action hooks return nonzero on argument, configuration, file or HTTP errors; messages omit sensitive exception details. Failed batches stop at the first HTTP error without automatic retry or rollback. DNS-01 and TLS-ALPN-01 are not supported.

Quick start

1. Connect your API

from acme_http_connector import HTTPConnector

connector = HTTPConnector({
    "perform": {
        "uri": "https://api.example.com",
        "path": "/challenges",
        "param_validation": "value",
    },
    "cleanup": {
        "uri": "https://api.example.com",
        "path": "/challenges",
    },
    "deploy": {
        "uri": "https://api.example.com",
        "path": "/certificates",
    },
})

Replace the example endpoints with your own API. By default, publication uses PUT, cleanup uses DELETE, and deployment uses POST with JSON payloads.

2. Publish and remove a challenge

Pass the full challenge path and key authorization supplied by your ACME client:

challenge_path = "/.well-known/acme-challenge/TOKEN"
connector.publish(challenge_path, "TOKEN.ACCOUNT_THUMBPRINT")

# Run your ACME client's validation here, then remove the challenge.
connector.cleanup(challenge_path)

With the configuration above, the API receives a request at /challenges/.well-known/acme-challenge/TOKEN with {"value": "TOKEN.ACCOUNT_THUMBPRINT"}. Your service must make that value available at the domain's public HTTP-01 URL.

3. Deploy the issued certificate

connector.deploy_files(
    domain="example.com",
    cert_path="cert.pem",
    key_path="privkey.pem",
    chain_path="chain.pem",
)

Already have the PEM contents in memory? Use connector.deploy(domain, cert, key, chain="") instead. The chain is optional in both methods.

Configuration at a glance

Each operation has its own settings, so challenge publication and certificate deployment can use different endpoints and credentials.

Setting Purpose Default
uri, path API origin and request path http://localhost; phase-specific path
method HTTP method PUT / DELETE / POST
format JSON or form body json
headers Authentication and custom HTTP headers None
timeout Positive socket timeout in seconds 30
verify TLS verification or CA bundle path true
param_challenge Send the full challenge path in a query parameter Append to API path
param_validation Wrap key authorization in a named body field Send the text directly
body_params Rename certificate deployment fields domain, cert, key, chain

See the complete configuration reference for allowed methods, environment variables and payload formats.

Integration notes

  • No Certbot dependency. Import HTTPConnector directly from Python or use the Dehydrated HTTP-01 hook. Other client adapters remain on the roadmap.
  • Explicit errors. Invalid settings raise ConfigurationError. HTTP, network and file errors propagate to your application. Successful operations return None.
  • Configuration stays yours. The library copies the supplied mapping. Use the phases argument to initialize only the operations your integration needs.
  • Protected transport by default. TLS verification is enabled and requests have a 30-second socket timeout. Use HTTPS for remote deployment: it sends the private key.

Project

Report an issue · Release history · Roadmap

Copyright © 2019–2026 Adrien Delle Cave. Licensed under GPL-3.0-or-later.

HTTP redirects are refused for publish, cleanup and deployment. Configure the final API URL directly; redirects do not trigger another request or count as success.

Metadata

Release files for acme-http-connector 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acme-http-connector 0.2.2
File Size Uploaded Provenance Actions
acme_http_connector-0.2.2.tar.gz 22.3 kB With provenance Details for acme_http_connector-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acme-http-connector 0.2.2
File Interpreter ABI Platform Actions
acme_http_connector-0.2.2-py3-none-any.whl Python 3 none any Details for acme_http_connector-0.2.2-py3-none-any.whl

Total release size: 44.2 kB

Release files / acme_http_connector-0.2.2.tar.gz

Download URL acme_http_connector-0.2.2.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2763ab192ad9989f49696304e5ccfc7f2bf2d53994702ebc6a03ae516b9e0f1e
BLAKE2b-256 checksum
How to use checksums
0944fc09fb5421c266313a4dc18a5981c814ad45f2bf110798e57af0701c9c20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / acme_http_connector-0.2.2-py3-none-any.whl

Download URL acme_http_connector-0.2.2-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
448ae18e2cb36180ac7feb6e10af176eab3d4c6e78a97de7b1e631f9b8377be6
BLAKE2b-256 checksum
How to use checksums
081e522b1efcc58b5c262169dd0116a0f71831a17d0e7bcf6303bfbe8081b3f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for acme-http-connector 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for acme_http_connector-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page