SSL Certificates

Install Snap and Certbot

sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo snap set certbot trust-plugin-with-root=ok
sudo snap install certbot-dns-cloudflare

Get your credential API Token

To obtain your Cloudflare API token, follow these steps:

  1. Log in to your Cloudflare account.

  2. Go to the Profile section.

  3. Select API Tokens.

  4. Click on Create Token.

  5. For this case, you only need "Edit zone DNS" permissions.

  6. Once you've configured the token, click Continue to summary and then Create Token.

  7. Make sure to copy your new API token and securely store it; you won’t be able to see it again.

echo "dns_cloudflare_api_token = <your-cloudflare-api>" > ~/certbot.ini
certbot certonly \
  --dns-cloudflare \
  --dns-cloudflare-credentials ~/certbot.ini \
  -d *.provewithryd.xyz

Last updated