Skip to main content

certbot-dns-timeweb

PyPI Python versions License

Timeweb Cloud DNS Authenticator plugin for Certbot.

It automates the dns-01 challenge by creating and then removing TXT records through the Timeweb Cloud API, which makes it possible to issue wildcard certificates.

Requirements

  • Python 3.10+
  • Certbot 2.8 or newer (including the 3.x, 4.x and 5.x lines)
  • A domain hosted on the Timeweb Cloud account the API key belongs to

The plugin depends only on certbot and requests, so installing it never forces a downgrade of certbot or of anything else in the same environment.

Installation

pip install certbot-dns-timeweb

The plugin has to live in the same Python environment as certbot itself. If certbot was installed from a distribution package or into a virtualenv, use that environment's pip:

/opt/certbot/bin/pip install certbot-dns-timeweb

There is no snap of this plugin, so a snap-installed certbot cannot load it — install certbot with pip instead.

For images that bundle certbot (nginx-proxy-manager, NPMplus and friends) the plugin is installed next to the bundled certbot and, since it no longer pins an upper bound on certbot, it will not downgrade the one already in the image.

Getting started

  1. Create an access token in the Timeweb Cloud control panel.

  2. Put it into a credentials file, for example /etc/letsencrypt/timeweb-creds.ini:

    dns_timeweb_api_key = XXXXXXXXXXXXXXXXXXX
    
  3. Restrict its permissions — certbot refuses to use world-readable credentials:

    chmod 600 /etc/letsencrypt/timeweb-creds.ini
    
  4. Issue a certificate:

    certbot certonly \
        --authenticator dns-timeweb \
        --dns-timeweb-credentials /etc/letsencrypt/timeweb-creds.ini \
        -d example.org -d '*.example.org'
    

Subdomains and wildcards on subdomains work the same way:

certbot certonly \
    --authenticator dns-timeweb \
    --dns-timeweb-credentials /etc/letsencrypt/timeweb-creds.ini \
    -d dev.example.org -d '*.dev.example.org'

The plugin looks up which of the domains on your account owns the name being validated, so only the parent domain (example.org here) has to be registered in Timeweb Cloud.

Plugin arguments

Argument Description Default
--dns-timeweb-credentials Path to the credentials INI file.
--dns-timeweb-propagation-seconds How long to wait for the TXT record to propagate before the ACME server checks it. 60

Troubleshooting

Unable to determine the Timeweb Cloud zone for ... — the domain is not present on the account the API key belongs to. Check timeweb.cloud/my/domains and make sure the domain's DNS is served by Timeweb.

Timeweb Cloud API returned HTTP 401 — the API key is wrong, expired or was revoked. Issue a new one.

The ACME server does not see the TXT record — increase --dns-timeweb-propagation-seconds.

To see exactly which API calls are made, add -v to the certbot command and look at /var/log/letsencrypt/letsencrypt.log.

Development

The project uses uv and ruff.

uv venv
uv pip install -e . --group dev

uv run pytest            # tests
uv run ruff check .      # lint
uv run ruff format .     # format

Debugging against the ACME staging environment

export TIMEWEB_API_KEY=XXXXXXXXXXXXXXXXXXX
uv run python scripts/debug_issue.py example.org '*.example.org'

The script runs certbot certonly --dry-run with all of its state confined to the git-ignored data/ directory.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

certbot_dns_timeweb-2.0.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

certbot_dns_timeweb-2.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file certbot_dns_timeweb-2.0.0.tar.gz.

File metadata

  • Download URL: certbot_dns_timeweb-2.0.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for certbot_dns_timeweb-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a8ca8c79c70281c4d057b2d8206962d037bb43d1a00552e372dce0320ed39a63
MD5 bbd29e4af1f8fa2e4890a0d95a596fca
BLAKE2b-256 ef08ed109ad03e9e333f96242a05ae2b0037e3ed43867bc79326ae4109b0e860

See more details on using hashes here.

Provenance

The following attestation bundles were made for certbot_dns_timeweb-2.0.0.tar.gz:

Publisher: cicd.yml on artrey/certbot-dns-timeweb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file certbot_dns_timeweb-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_dns_timeweb-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27f62d1d7087f0b2f16856a3dad21a04392b8e7ce755b708b477fc040a918b5c
MD5 c4cd2682ccf56993e3bf42d18ed843ca
BLAKE2b-256 24cdab8b414dcaa5d2a4508c46b2c970d40fc3b700e13c8b55a33532abe3ef63

See more details on using hashes here.

Provenance

The following attestation bundles were made for certbot_dns_timeweb-2.0.0-py3-none-any.whl:

Publisher: cicd.yml on artrey/certbot-dns-timeweb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

1.0.1

2 files

1.0.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page