brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: DISABLE_RESOLVER makes Nginx Proxy Manager use your own DNS settings

Network and access
~/tips/tip-nginxproxymanager-disable-resolver

environment:

Stops Nginx Proxy Manager from adding its own DNS resolver, so lookups use hosts and resolv.conf.

Nginx does not use the system resolver the way most programs do. It wants a resolvers directive, and NPM writes one for you.

If you want to switch that off, there is a variable:

environment:
  DISABLE_RESOLVER: true

The docs say NPM then stops generating a resolvers directive, and DNS lookups go through /etc/hosts first and then /etc/resolv.conf. That fits a setup where hostnames only exist in /etc/hosts, or where you want the container to follow the DNS of the machine it runs on.

It is a niche setting. My advice: leave it alone until a proxy host to an internal name fails to resolve, and then try it. The caveat is that you now depend on those two files being right. A typo in /etc/hosts becomes a 502, and the generated resolver that used to hide a bad DNS server is gone. Test one host before you rely on it.

If you want to look at what changed, the generated config lives under /data/nginx in the folder you mount, so you can read it without entering the container.

Further reading: Nginx Proxy Manager: Advanced Configuration, On this site: pin the Nginx Proxy Manager image version, upgrade on purpose, On this site: Nginx Proxy Manager has a health check, you just have to switch it on, On this site: Guide: put Nextcloud behind Nginx Proxy Manager with HTTPS and the right headers

Going deeper: Guide: fix a 502 Bad Gateway in Nginx Proxy Manager, with a checklist that finds the cause

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link