Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pihole & Unbound: Installation for Pihole V6 (read description) #2505

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

MickLesk
Copy link
Member

Pi-hole v6 Migration Guide

Overview

With the release of Pi-hole v6, significant changes have been introduced, particularly in the way configurations are managed. This guide outlines the key changes and provides a migration path for users, especially those utilizing Unbound as their upstream DNS resolver.


Key Changes in Pi-hole v6

  1. Migration to TOML Configuration

    • Pi-hole now uses /etc/pihole/pihole.toml instead of setupVars.conf for settings.
    • The migration is automatically handled by Pi-hole and does not require manual intervention.
  2. Updated Unbound Configuration Handling

    • Previous configurations using setupVars.conf or dnsmasq.d/01-pihole.conf for upstream DNS must be adjusted.
    • The new method involves setting upstream DNS in pihole.toml.
  3. DHCP Server Defaults Changed

    • The built-in DHCP server is disabled by default.
    • Users who rely on Pi-hole’s DHCP functionality must manually enable it.
  4. NTP Sync Changes

    • NTP synchronization is enabled by default but can be disabled in pihole.toml.
  5. New Command-Line Configuration Options

    • Some settings can now be modified dynamically via pihole-FTL --config.

Migration Steps

1. Verify Migration

Pi-hole v6 automatically migrates existing configurations and stores previous versions in:

/etc/pihole/migrations_v6

After updating, check the migration log to ensure a smooth transition.

2. Adjust Upstream DNS (for Unbound Users)

If you previously modified setupVars.conf, update /etc/pihole/pihole.toml as follows:

Modify the [dns] section:

[dns]
  upstreams = ["127.0.0.1#5335"]
  domainNeeded = true
  expandHosts = true

Restart Pi-hole:

systemctl restart pihole-FTL

3. Ensure DHCP Settings (if used)

For those using Pi-hole as a DHCP server, ensure it is enabled in pihole.toml:

[dhcp]
  active = true

Apply the changes:

systemctl restart pihole-FTL

4. Disable NTP Sync (if needed)

By default, NTP sync is active. To disable it, modify:

[ntp.sync]
  active = false
  interval = 0

Apply the change:

pihole-FTL --config ntp.sync.active false

Common Issues & Fixes

Issue: no upstream servers configured

Fix: Ensure upstreams is properly set in pihole.toml and restart Pi-hole:

[dns]
  upstreams = ["127.0.0.1#5335", "8.8.8.8"]
systemctl restart pihole-FTL

Issue: DHCP Not Working After Update

Fix: Verify that [dhcp] active = true is set and restart Pi-hole.


Summary

Pi-hole v6 introduces automatic configuration migration but requires manual updates for Unbound users. Ensure your DNS settings are correctly configured in pihole.toml, verify DHCP settings, and adjust NTP synchronization if necessary.

For further details, refer to the official Pi-hole documentation.

🔗 Related PR / Discussion / Issue

Link: #2485

✅ Prerequisites

Before this PR can be reviewed, the following must be completed:

  • Self-review performed – Code follows established patterns and conventions.
  • Testing performed – Changes have been thoroughly tested and verified.

🛠️ Type of Change

Select all that apply:

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.

@MickLesk MickLesk requested a review from a team as a code owner February 20, 2025 08:12
@github-actions github-actions bot added the update script A change that updates a script label Feb 20, 2025
@MickLesk MickLesk added the breaking change A change that is not backward compatible label Feb 20, 2025
@michelroegl-brunner michelroegl-brunner merged commit 049afa9 into main Feb 20, 2025
2 checks passed
@MickLesk MickLesk deleted the fix_pihole branch February 20, 2025 13:04
csaller pushed a commit to csaller/ProxmoxVE that referenced this pull request Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change that is not backward compatible update script A change that updates a script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants