https://github.com/royborgen/domeneshop_certbot
A script designed to be used with Certbot for DNS challenge when DNS is hosted by domeneshop (www.domeneshop.no)
https://github.com/royborgen/domeneshop_certbot
certbot certbot-dns domeneshop
Last synced: about 1 month ago
JSON representation
A script designed to be used with Certbot for DNS challenge when DNS is hosted by domeneshop (www.domeneshop.no)
- Host: GitHub
- URL: https://github.com/royborgen/domeneshop_certbot
- Owner: royborgen
- License: gpl-2.0
- Created: 2024-04-01T20:20:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-20T20:46:49.000Z (over 1 year ago)
- Last Synced: 2025-04-07T06:49:59.460Z (over 1 year ago)
- Topics: certbot, certbot-dns, domeneshop
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Domeneshop Certbot DNS Authentication Script
This Python script automates the process of setting up DNS authentication for SSL certificate renewal using Certbot. It integrates with the Domeneshop API to manage DNS records for the specified domain.
## Features
- Automatically creates or updates DNS TXT records required for Certbot DNS authentication.
- Integrates with Domeneshop API for DNS management.
## Prerequisites
Before using this script, ensure you have the following:
- Python 3 installed on your system.
- Certbot installed and configured for DNS authentication.
- Access to the Domeneshop API with necessary permissions.
## Installation
1. Clone or download the repository to your local machine.
2. Ensure you have the required Python dependencies installed:
- Python 3
- time library installed
- os library installed
- requests library installed
- json library installed
## Set up API credentials for Domeneshop:
1. Obtain an API token and secret from Domeneshop: https://domene.shop/admin?view=api
2. For security is is recommended to set API credentials as enviroment variables **DOMENESHOP_API_TOKEN** and **DOMENESHOP_API_SECRET**.
## Configuration
Modify the script variables according to your domain setup:
- **ROOT_DOMAIN:** The root domain for which the SSL certificate is being renewed.
- **SUBDOMAIN:** The subdomain used for Certbot DNS authentication.
- **TTL:** Time-to-live for DNS records (in seconds).
## Usage
Make sure the script (domeneshop_certbot.py) has execute permissions:
```
chmod +x domeneshop_certbot.py
```
Run the script integrate with Certbot:
```
sudo certbot certonly --manual --preferred-challenges dns --manual-auth-hook /path/to/domeneshop_certbot.py -d subdomain.domain
```