Torxed / python-glesys

A library and cli tool for interacting with Glesys.com API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glesys

A Python library to interact with the Glesys.com API endpoints.
It's also a CLI tool to access a subset of all those features as well as housing a LetsEncrypt certbot Authenticator plugin.

Small Disclaimer: I have no affiliation with Glesys, I just appreciate their API and services

Installation

$ pip install glesys

Usage

ℹ️ This assumes a valid glesys.toml configuration.

List all domains

$ glesys dns --all-domains

List all records for hvornum.se

$ glesys dns --all-records hvornum.se

LetsEncrypt challenge

⚠️ This assumes you have installed this library locally on the machine before running the certbot utility. This is because certbot will use plugin-discovery via Entry points for plugins. This also requires a valid glesys.toml.

Single certificate for all domains

$ sudo glesys lets-encrypt --all-domains

This will generate certificates for all domains hosted under the Glesys DNS server. This would be eqivilant of running certbot manually for hvornum.se and archlinux.life:

certbot -v certonly --non-interactive --authenticator dns-glesys --preferred-challenges dns --dry-run --server https://acme-staging-v02.api.letsencrypt.org/directory --work-dir /home/anton/github/python-glesys/certbot --logs-dir /home/anton/github/python-glesys/certbot --config-dir /home/anton/github/python-glesys/certbot --text --agree-tos --email anton@hvornum.se --expand --renew-by-default -d '*.hvornum.se,hvornum.se,*.archlinux.life,archlinux.life'

By default it will run against LetsEncrypt staging environment. Use --production to target glesys lets-encrypt against the production endpoint of LetsEncrypt and to remove the dryrun.

Separate certificate for all domains

TBD!

$ sudo glesys lets-encrypt --all-domains --individual

Separate certificate for selected domains

TBD!

$ sudo glesys lets-encrypt --individual --hostname '*.hvornum.se' --hostname 'hvornum.se'

Supported API Endpoints

As of 2023-05-03 API Doc Spec.

About

A library and cli tool for interacting with Glesys.com API

License:GNU Affero General Public License v3.0


Languages

Language:Python 100.0%