[GH-ISSUE #3716] Make "NPM automatically create custom DNS with pihole" an option. #2454

Open
opened 2026-02-26 07:35:37 +03:00 by kerem · 4 comments
Owner

Originally created by @Haui1112 on GitHub (Apr 22, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3716

I'm using nginx-proxy-manager and it is one of the greatest tools ever!

I would like to automate the creation of custom DNS Records in Pihole so users can have fully automatic domain creation in a closed off environment.

The API of pihole can do this, here's the documentation: github.com/pi-hole/web@6c320a4257/api.php

Is your feature request related to a problem? Please describe.
When I create a new proxy host and try it, my computer doesnt route to it since I'm in a closed off home network and pihole needs to know which IP belongs to the domain.

Describe the solution you'd like
I would love to have nginx proxy manager communicate any new, changed and deleted domains directly to pihole if the option is ticked and the contact info (web adress, docker adress, whatever is possible) is ticked.

Describe alternatives you've considered
An alternative would be to have pihole wildcard any subdomains of the base domain to the server IP but this leads to the issue of having to use different domains for different machines which isnt necessary with the above solution.

Additional context
I believe this is the entry of pihole API to talk to:

elseif(isset($_GET['customdns']) && $auth)
{
	if (isset($_GET["auth"])) {
		if ($_GET["auth"] !== $pwhash) {
			die("Not authorized!");
		}
	} else {
		// Skip token validation if explicit auth string is given
		check_csrf($_GET['token']);
	}

	switch ($_GET["action"]) {
		case 'get':
			$data = echoCustomDNSEntries();
			break;

		case 'add':
			$data = addCustomDNSEntry();
			break;

		case 'delete':
			$data = deleteCustomDNSEntry();
			break;

Again the above mentioned documentation: github.com/pi-hole/web@6c320a4257/api.php

Originally created by @Haui1112 on GitHub (Apr 22, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3716 I'm using nginx-proxy-manager and it is one of the greatest tools ever! I would like to automate the creation of custom DNS Records in Pihole so users can have fully automatic domain creation in a closed off environment. The API of pihole can do this, here's the documentation: https://github.com/pi-hole/web/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/api.php **Is your feature request related to a problem? Please describe.** When I create a new proxy host and try it, my computer doesnt route to it since I'm in a closed off home network and pihole needs to know which IP belongs to the domain. **Describe the solution you'd like** I would love to have nginx proxy manager communicate any new, changed and deleted domains directly to pihole if the option is ticked and the contact info (web adress, docker adress, whatever is possible) is ticked. **Describe alternatives you've considered** An alternative would be to have pihole wildcard any subdomains of the base domain to the server IP but this leads to the issue of having to use different domains for different machines which isnt necessary with the above solution. **Additional context** I believe this is the entry of pihole API to talk to: ``` elseif(isset($_GET['customdns']) && $auth) { if (isset($_GET["auth"])) { if ($_GET["auth"] !== $pwhash) { die("Not authorized!"); } } else { // Skip token validation if explicit auth string is given check_csrf($_GET['token']); } switch ($_GET["action"]) { case 'get': $data = echoCustomDNSEntries(); break; case 'add': $data = addCustomDNSEntry(); break; case 'delete': $data = deleteCustomDNSEntry(); break; ``` Again the above mentioned documentation: https://github.com/pi-hole/web/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/api.php
Author
Owner

@luca910 commented on GitHub (Jul 16, 2024):

#3876

<!-- gh-comment-id:2230484911 --> @luca910 commented on GitHub (Jul 16, 2024): #3876
Author
Owner

@github-actions[bot] commented on GitHub (Feb 18, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2664440015 --> @github-actions[bot] commented on GitHub (Feb 18, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@Haui1112 commented on GitHub (Mar 25, 2025):

So this was already a thing but never got pulled and then the repo was deleted.

<!-- gh-comment-id:2750696160 --> @Haui1112 commented on GitHub (Mar 25, 2025): So this was already a thing but never got pulled and then the repo was deleted.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 25, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:3573508748 --> @github-actions[bot] commented on GitHub (Nov 25, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2454
No description provided.