Skip to content

Commit 2c25b2d

Browse files
committed
docs: add zone import/export configuration and module Docker env vars
1 parent 136550b commit 2c25b2d

3 files changed

Lines changed: 100 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Zone Import/Export Configuration
2+
3+
## Overview
4+
5+
Poweradmin includes zone import/export functionality that allows users to import zones from BIND zone files and export zones as zone files. This is useful for migrating zones between DNS servers or for backup purposes.
6+
7+
## Configuration Options
8+
9+
Zone import/export settings can be configured in the `config/settings.php` file under the `modules` > `zone_import_export` section.
10+
11+
| Setting | Default | Description |
12+
|---------|---------|-------------|
13+
| `enabled` | `false` | Enable zone import/export functionality |
14+
| `auto_ttl_value` | `300` | Default TTL in seconds for records when importing zone files |
15+
| `max_file_size` | `1048576` | Maximum allowed file upload size in bytes (default: 1 MB) |
16+
17+
## Configuration Example
18+
19+
### PHP Configuration
20+
21+
```php
22+
return [
23+
'modules' => [
24+
'zone_import_export' => [
25+
'enabled' => true,
26+
'auto_ttl_value' => 300,
27+
'max_file_size' => 1048576,
28+
],
29+
],
30+
];
31+
```
32+
33+
### Docker Environment Variables
34+
35+
```bash
36+
docker run -d --name poweradmin -p 80:80 \
37+
-e PA_MODULE_ZONE_IMPORT_EXPORT_ENABLED=true \
38+
-e PA_MODULE_ZONE_IMPORT_EXPORT_AUTO_TTL=300 \
39+
-e PA_MODULE_ZONE_IMPORT_EXPORT_MAX_FILE_SIZE=1048576 \
40+
poweradmin/poweradmin
41+
```
42+
43+
| Variable | Description | Default |
44+
|----------|-------------|---------|
45+
| `PA_MODULE_ZONE_IMPORT_EXPORT_ENABLED` | Enable zone import/export module | `false` |
46+
| `PA_MODULE_ZONE_IMPORT_EXPORT_AUTO_TTL` | Default TTL for imported records (seconds) | `300` |
47+
| `PA_MODULE_ZONE_IMPORT_EXPORT_MAX_FILE_SIZE` | Max upload file size in bytes | `1048576` |
48+
49+
## Usage
50+
51+
When enabled, zone import/export features are available from:
52+
53+
1. **Zone Export** - Export any zone as a BIND zone file from the zone management page
54+
2. **Zone Import** - Import zones from BIND zone files via the Tools menu
55+
56+
### Zone Export
57+
58+
1. Navigate to any zone in Poweradmin
59+
2. Click the **Export** button or icon
60+
3. Select **Zone File** format
61+
4. The zone file will be downloaded in BIND format
62+
63+
### Zone Import
64+
65+
1. Navigate to **Tools** > **Zone Import** in the navigation menu
66+
2. Upload a BIND-format zone file
67+
3. Review the parsed records
68+
4. Confirm the import
69+
70+
### Supported Features
71+
72+
- BIND zone file format
73+
- DNSSEC record types
74+
- IDN (Internationalized Domain Names) support
75+
- Record comment synchronization
76+
- Automatic TTL assignment for records without explicit TTL values
77+
78+
## Security Considerations
79+
80+
- Zone import requires appropriate user permissions
81+
- File uploads are limited by the `max_file_size` setting
82+
- Imported records are validated before being added to the database

docs/installation/docker.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,23 @@ docker logs poweradmin | grep -i password
242242
| `PA_PDNS_API_URL` | - | PowerDNS API URL |
243243
| `PA_PDNS_API_KEY` | - | PowerDNS API key |
244244

245+
### Modules
246+
247+
| Variable | Default | Description |
248+
|----------|---------|-------------|
249+
| `PA_MODULE_CSV_EXPORT_ENABLED` | true | Enable CSV export module |
250+
| `PA_MODULE_ZONE_IMPORT_EXPORT_ENABLED` | false | Enable zone import/export module |
251+
| `PA_MODULE_ZONE_IMPORT_EXPORT_AUTO_TTL` | 300 | Default TTL for imported records (seconds) |
252+
| `PA_MODULE_ZONE_IMPORT_EXPORT_MAX_FILE_SIZE` | 1048576 | Max upload file size in bytes |
253+
| `PA_MODULE_WHOIS_ENABLED` | false | Enable WHOIS lookup module |
254+
| `PA_MODULE_WHOIS_RESTRICT_TO_ADMIN` | true | Restrict WHOIS to administrators |
255+
| `PA_MODULE_RDAP_ENABLED` | false | Enable RDAP lookup module |
256+
| `PA_MODULE_RDAP_RESTRICT_TO_ADMIN` | true | Restrict RDAP to administrators |
257+
| `PA_MODULE_EMAIL_PREVIEWS_RESTRICT_TO_ADMIN` | true | Restrict email previews to administrators |
258+
| `PA_MODULE_DNS_WIZARDS_TYPES` | DMARC,SPF,DKIM,CAA,TLSA,SRV | Comma-separated list of DNS wizard types |
259+
260+
For detailed module configuration, see the [Configuration](../configuration/zone-import-export.md) section.
261+
245262
### Authentication
246263

247264
| Variable | Default | Description |

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ nav:
8484
- API Configuration: configuration/api.md
8585
- WHOIS Configuration: configuration/whois.md
8686
- RDAP Configuration: configuration/rdap.md
87+
- Zone Import/Export: configuration/zone-import-export.md
8788
- User Agreements: configuration/user-agreements.md
8889
- Username Recovery: configuration/username-recovery.md
8990
- Avatar System: configuration/avatars.md

0 commit comments

Comments
 (0)