https://github.com/larsensolutions/domeneshop-bots
DNS bot updater for domeneshop.no. Keep your dns records updated with correct ip for your self hosting sites and services
https://github.com/larsensolutions/domeneshop-bots
api bot dns dns-record-updater domeneshop package pip3 python-package
Last synced: about 2 months ago
JSON representation
DNS bot updater for domeneshop.no. Keep your dns records updated with correct ip for your self hosting sites and services
- Host: GitHub
- URL: https://github.com/larsensolutions/domeneshop-bots
- Owner: larsensolutions
- License: mit
- Created: 2020-02-28T12:08:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-20T21:59:23.000Z (about 2 years ago)
- Last Synced: 2025-12-16T09:19:17.517Z (6 months ago)
- Topics: api, bot, dns, dns-record-updater, domeneshop, package, pip3, python-package
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Domeneshop.no DNS boot
Bot for users of domeneshop.no. Keep your dns records updated with public ip for your self hosted sites and services.
**Only IP will be updated by the bot; record type, ttl and hostname will remain the same**
- Built upon [domeneshop.no's own python API](https://github.com/domeneshop/python-domeneshop).
- Using https://api.ipify.org to get the public IP
# Installation
```
pip3 install domeneshop-bots
```
## Usage
See the documentation at https://api.domeneshop.no/docs/ for help on how to acquire your API credentials.
### 1. Fill inn API credentials and domains to track
```json
{
"api": {
"token": "",
"secret": ""
},
"track": [
{
"domain": "yourdomainA.com",
"hosts": ["subdomainA", "subdomainB", "subdomainC"]
},
{ "domain": "yourdomainB.com", "hosts": ["@", "www"] },
{ "domain": "yourdomainC.com", "hosts": ["@", "www", "subdomain"] }
]
}
```
#### Hostname defaults
- "@" -> https://domain.com : domeneshop.no uses '@' to indicate root domain
- "www" -> https://www.domain.com : in case you have added a 'www' dns to root domain as well
- "subdomain" -> https://subdomain.domain.com : only subdomain should be specified
### 2. Fire the bot up, example loading json from file
```python
import json
from domeneshop_bots import DNSBot
if __name__ == "__main__":
with open("./config.json", 'r') as file:
config = json.loads(file.read())
bot = DNSBot(config)
bot.start()
```
### 3. Set up a cron job, and you are done!
Or not. In any case you know what to do!
### Docker container
You can also use this service as a container.
See docker-compose.yml for example
## Authors
- **Erik Larsen** - [Grizzlyfrog](https://grizzlyfrog.com)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Acknowledgments
Thanks to [domeneshop.no](https://domenesho.no) for creating an API!!