Skip to content

laofahai/certship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

certship

PyPI version CI License

中文说明 (Chinese README)

Author blog: https://laofahai.cool

A Python tool that uses acme.sh to automatically apply for certificates and deploy them to cloud platforms (such as Alibaba Cloud AliOSS).

Install dependencies

You can install certship directly from PyPI:

pip install certship

Or use poetry for development:

poetry install

Usage

You can run the tool via poetry:

poetry run certship --help

Or directly after pip install:

certship --help

Or with Python module:

python3 -m certship.cli --help

Example

certship \
  --domain <your domain> \
  --dns-provider <dns provider, default ali> \
  --platform alioss \
  --oss-bucket <OSS bucket name> \
  --oss-endpoint <OSS endpoint> \
  --ali-key <Aliyun AccessKeyId> \
  --ali-secret <Aliyun AccessKeySecret> \
  [--ecc] [--run] [--force] [--debug]

Arguments

  • --domain: The domain to apply for the certificate (required)
  • --dns-provider: DNS provider, default is ali (optional, any DNS plugin supported by acme.sh)
  • --platform: Target platform, currently only supports alioss or tencentcos (required)
  • --oss-bucket: Aliyun OSS bucket name (required for alioss)
  • --oss-endpoint: OSS endpoint (required for alioss)
  • --ali-key: Aliyun AccessKeyId (required for alioss)
  • --ali-secret: Aliyun AccessKeySecret (required for alioss)
  • --ecc: Use ECC certificate (optional)
  • --run: Issue and deploy certificate (optional, if not set, only deploys existing certificate)
  • --force: Force certificate renewal (optional)
  • --debug: acme.sh debug mode (optional)

Requirements

  • Python 3.8+
  • poetry
  • acme.sh (must be installed and configured, defaults to Let's Encrypt)
  • ossutil64 (must be installed and configured for AliOSS)

Typical workflow

  1. Install dependencies: poetry install
  2. Install acme.sh and configure DNS API
  3. Install and configure ossutil64 (requires yundun-cert:CreateSSLCertificate permission)
  4. Run the above command to automatically issue and bind the certificate

Supported platforms

  • Alibaba Cloud AliOSS
  • Tencent Cloud COS
  • Local Nginx
  • Qiniu Cloud

PRs are welcome!

About

自动申请和续期 Let’s Encrypt 证书,并支持将证书自动部署到阿里云 OSS 及多云平台的 Python 工具。

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages