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: IP_RANGES_FETCH_ENABLED skips a startup download in Nginx Proxy Manager

Docker
~/tips/tip-nginxproxymanager-ip-ranges

environment:

Stops Nginx Proxy Manager downloading CDN IP ranges at startup, which helps when internet access is limited.

On startup NPM fetches the IP ranges of CloudFront and Cloudflare. If the container has limited internet access, that is a wait for nothing.

Turn the fetch off with one variable:

environment:
  IP_RANGES_FETCH_ENABLED: 'false'

The docs say it skips that startup fetch, and name two reasons to do it: restricted internet access and faster startup. If your container sits behind a firewall that only allows what you list, this keeps the first minutes of the log clean.

The caveat is what you lose. Those ranges are there so NPM can recognise traffic that comes through the two CDNs. If you do use Cloudflare in front of your hosts, leave the fetch on. I would only switch it off for a purely local setup where nothing comes through a CDN, and I would check the log once after a restart to see that startup is quicker.

The variable is read at startup, so you need a recreate for it to count. Nothing in the UI changes, so the proof is the log and how long the admin page takes to answer.

Further reading: Nginx Proxy Manager: Advanced Configuration, On this site: set INITIAL_ADMIN_EMAIL and skip the Nginx Proxy Manager setup screen, On this site: pin the Nginx Proxy Manager image version, upgrade on purpose, 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 Docker tips ONBUILD RUN /usr/local/bin/python-build --dir /app/src SHELL ["/bin/bash", "-c"] docker commit <container> myname/testimage:version3 docker import /path/to/exampleimage.tgz docker compose events All Docker tips (192) All topics

Link