Update dnscrypt-proxy.md to fix systemctl editing and adding systemd-resolved optional support#1335
Open
JerbAcuch wants to merge 1 commit intopi-hole:masterfrom
Open
Update dnscrypt-proxy.md to fix systemctl editing and adding systemd-resolved optional support#1335JerbAcuch wants to merge 1 commit intopi-hole:masterfrom
JerbAcuch wants to merge 1 commit intopi-hole:masterfrom
Conversation
…resolved optional support Guide had manual editing of a systemctl service (socket) file instead of the designed `systemctl edit` override method. Implemented the `systemctl edit` method. Also added a new (optional) section on setting the pihole to itself as a DNS resolver, and configuring systemd-resolved to work at the same time in case the pihole is not functioning / race condition on start. Signed-off-by: JerbAcuch <113802182+JerbAcuch@users.noreply.github.com>
✅ Deploy Preview for pihole-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
rdwebdesign
requested changes
Feb 11, 2026
| The following settings in `/usr/lib/systemd/system/dnscrypt-proxy.socket`, let `dnscrypt-proxy` listen on localhost on port 5053: | ||
| ```bash | ||
| sudo systemctl edit dnscrypt-proxy.socket | ||
| ``` |
Member
There was a problem hiding this comment.
Add blank line after ```
Suggested change
| ``` | |
| ``` | |
|
|
||
| #### Pihole bind restrictions | ||
|
|
||
| Pihole must not bind to `0.0.0.0:53` so that `dnscrypt-proxy.socket` may also bind on port 53, as systemd-resolved is unable to use DNS servers with non-standard ports and `/etc/resolv.conf` has this restriction as well. Configure `pihole-FTL` to bind to a specific interface. The interface is the identifier given by the network manager. For netplan, you may use `sudo netplan status` to view all the connections and the names. |
Member
There was a problem hiding this comment.
Remove trailing space:
Suggested change
| Pihole must not bind to `0.0.0.0:53` so that `dnscrypt-proxy.socket` may also bind on port 53, as systemd-resolved is unable to use DNS servers with non-standard ports and `/etc/resolv.conf` has this restriction as well. Configure `pihole-FTL` to bind to a specific interface. The interface is the identifier given by the network manager. For netplan, you may use `sudo netplan status` to view all the connections and the names. | |
| Pihole must not bind to `0.0.0.0:53` so that `dnscrypt-proxy.socket` may also bind on port 53, as systemd-resolved is unable to use DNS servers with non-standard ports and `/etc/resolv.conf` has this restriction as well. Configure `pihole-FTL` to bind to a specific interface. The interface is the identifier given by the network manager. For netplan, you may use `sudo netplan status` to view all the connections and the names. |
| sudo netstat -lvnp | grep pihole-FTL | grep :53 | ||
| ``` | ||
|
|
||
| ### Further modify `dnscrypt-proxy.socket` |
Member
There was a problem hiding this comment.
Add a blank line after a heading:
Suggested change
| ### Further modify `dnscrypt-proxy.socket` | |
| ### Further modify `dnscrypt-proxy.socket` | |
| sudo systemctl restart dnscrypt-proxy.service | ||
| ``` | ||
|
|
||
| #### `systemd-resolved` configuration |
Member
There was a problem hiding this comment.
Add a blank line after a heading:
Suggested change
| #### `systemd-resolved` configuration | |
| #### `systemd-resolved` configuration | |
Member
|
Thanks for your PR. Part of the information you wanted to add has been implemented already by #1343 |
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guide had manual editing of a systemctl service (socket) file instead of the designed
systemctl editoverride method. Implemented thesystemctl editmethod.Also added a new (optional) section on setting the pihole to itself as a DNS resolver, and configuring systemd-resolved to work at the same time in case the pihole is not functioning / race condition on start.
Thank you for your contribution to the Pi-hole Community!
Please read the comments below to help us consider your Pull Request.
We are all volunteers and completing the process outlined will help us review your commits quicker.
Please make sure you
What does this PR aim to accomplish?:
Better aligned systemctl service (socket) modification with how the system is expected to modify these files. Current method would break when the maintainer updated the file and the user would have to re-implement the fix from this guide. Using the
systemctl editoverride method, this is much less likely.Added an optional section on dual-configuration of systemd-resolved and pihole, including the pihole configuring itself as a primary DNS for self-logging and using systemctl-resolved as a backup/guarantee in case the worst should happen to FTLDNS
How does this PR accomplish the above?:
Lots of effort with two piholes at home and documenting configuration changes.
By submitting this pull request, I confirm the following:
git rebase)