Setting up Nginx Proxy Manager and AdGuard Home on localhost configuration

Hi everyone,

I’m working on configuring Nginx Proxy Manager alongside AdGuard Home for local DNS rewrites on my Debian machine. Both services are running locally on the same laptop.

My setup includes NPM with SSL certificates via Cloudflare API token for my domain. I want to create proxy hosts for various containerized apps I’m running.

As an example, I have the Beszel service running on 127.0.0.1:8090. I’ve configured the proxy host settings in NPM correctly.

The issue is with AdGuard Home DNS rewrite configuration. I set monitor.example.com to point to 127.0.0.1 but this setup isn’t functioning properly.

I’ve done similar configurations before using Proxmox with different LXC containers and it worked fine. What could I be overlooking in this local setup? Any suggestions would be helpful.

I ran into something similar when setting up my homelab. The issue might be related to how AdGuard handles local DNS queries versus external ones. When you configure the DNS rewrite in AdGuard to point monitor.example.com to 127.0.0.1, AdGuard processes this correctly, but your browser or application might be bypassing the local DNS resolution for localhost addresses. Try checking if your containerized apps are using the host network mode or bridge mode - this can affect how they resolve DNS internally. Also worth testing the setup with dig or nslookup commands to verify that AdGuard is actually returning the correct IP for your domain. Sometimes the problem isn’t with the configuration but with how applications handle DNS caching or localhost resolution.

hey, it could be a loopback problem. try using your local LAN IP instead of 127.0.0.1 for the AdGuard DNS rewrites. that usually helps when both NPM and AdGuard are on the same device. good luck!

The localhost configuration can be tricky when running both services on the same machine. I encountered a similar issue and found that the problem often stems from DNS resolution conflicts. Since you’re using AdGuard Home as your DNS server, make sure your system is actually using AdGuard as the primary DNS resolver in your network settings. Check /etc/resolv.conf to confirm it points to your AdGuard instance. Also, verify that NPM is binding to the correct interface - sometimes it defaults to localhost only instead of all interfaces. You might need to adjust the binding configuration in NPM to listen on 0.0.0.0 rather than just 127.0.0.1. Another thing to check is whether your SSL certificates are properly configured for the domain you’re trying to proxy, as certificate issues can cause silent failures in local setups.