docu: updated readme

This commit is contained in:
SSVC Admin 2025-03-11 09:34:49 +01:00
parent 935e213f27
commit 7c38733ab7
3 changed files with 89 additions and 5 deletions

View File

@ -8,7 +8,7 @@ PDNS_WEBSERVER_PASSWORD=secure_webserver_password
PDNS_DEFAULT_TTL=1500
# PowerDNS Admin Konfiguration
PDNS_ADMIN_PORT=8080
PDNS_ADMIN_PORT=8080s
PDNS_ADMIN_DB_NAME=powerdnsadmin
PDNS_ADMIN_DB_PASSWORD=secure_pdns_admin_password
PDNS_ADMIN_SALT=$2b$12$DCzILDEfKfpieQRKd9U6Q. #python3 -c 'import bcrypt; print(bcrypt.gensalt().decode("utf-8"));'
PDNS_ADMIN_SALT=$2b$12$DCzILDEfKfpieQRKd9U6Q.

View File

View File

@ -1,4 +1,88 @@
# Readme
# PowerDNS Docker Setup
## Get verison
docker exec pdns pdns_server --version
This repository contains a Docker Compose configuration for running PowerDNS with MySQL/MariaDB backend and PowerDNS Admin web interface.
## Features
- PowerDNS authoritative DNS server with MySQL backend
- PowerDNS Admin web interface for easy domain management
- Separate MariaDB databases for PowerDNS and PowerDNS Admin
- Secure by default with dedicated database users
- Automatic container restart on failure
## Requirements
- Docker and Docker Compose
- Linux/macOS (Windows users may need to adjust volume paths)
- Port 53 available (or modify the configuration to use a different port)
## Quick Start
1. Clone this repository:
```bash
git clone https://git.jeanavril.com/jean/powerdns-docker
cd powerdns-docker
```
2. Generate secure passwords and create your environment file:
```bash
./set-dot-env.sh
```
3. Start the containers:
```bash
docker-compose up -d
```
4. Access PowerDNS Admin at http://your-server-ip:8080
## Configuration
All configuration is handled through environment variables in the `.env` file. A sample file is provided as `.env.sample`.
Key configurations:
- `PDNS_PORT`: DNS server port (default: 53)
- `PDNS_API_KEY`: API key for PowerDNS (used by Admin interface)
- `PDNS_WEBSERVER_PORT`: Port for PowerDNS API webserver
- `PDNS_ADMIN_PORT`: Port for PowerDNS Admin web interface
## Initial PowerDNS Admin Setup
1. Access the PowerDNS Admin web interface at http://your-server-ip:8080
2. Create a new admin user account
3. Configure the PowerDNS server connection:
- URL: http://pdns:8081/
- API Key: The value of `PDNS_API_KEY` from your `.env` file
## Security Notes
- Default configuration allows API access from all IP addresses
- For production use, restrict `PDNS_webserver_allow_from` to specific IPs
- All passwords are stored in the `.env` file - keep this file secure
- Database files are stored as Docker volumes in the project directory
## Backup
To backup your DNS data:
1. Backup the MariaDB data directories:
```bash
tar czf pdns-backup-$(date +%Y%m%d).tar.gz pdns-mysql-data pdns-admin-mysql-data
```
## Troubleshooting
- If you can't access the PowerDNS Admin interface, check if port 8080 is open
- If DNS resolution fails, verify that port 53 is not in use by another service
- Check container logs with `docker-compose logs pdns` or `docker-compose logs pdns-admin`
## Maintenance
To update containers to the latest version:
```bash
docker-compose pull
docker-compose up -d
```
---
This setup is configured for ease of use. For production environments, consider implementing additional security measures and backup strategies.