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: set INITIAL_ADMIN_EMAIL and skip the Nginx Proxy Manager setup screen

Docker
~/tips/tip-nginxproxymanager-initial-admin

environment:

Creates the first Nginx Proxy Manager admin from your compose file, so there is no setup screen.

Every fresh Nginx Proxy Manager container greets you with a screen where you create the first admin. Fine once. Annoying when I rebuild a test setup from a compose file and want it ready without clicking.

The docs have two environment variables for this. Put them under environment in your compose file:

environment:
  INITIAL_ADMIN_EMAIL: '[email protected]'
  INITIAL_ADMIN_PASSWORD: 'a-long-unique-password'

On startup NPM then creates that admin user for you and the first-user setup screen is skipped. You open the admin page and log in straight away. That suits scripted installs and anyone who keeps the whole stack in version control.

The caveat is the obvious one. The password now sits in plain text in your compose file, and probably in a git repo or a backup. Use a throwaway password here, then change it in the admin UI after the first login. I would also keep the compose file out of any public repository. The docs only describe the creation of the first user, so do not expect changing these variables later to rename or reset an account that already exists.

Further reading: Nginx Proxy Manager: Advanced Configuration, On this site: IP_RANGES_FETCH_ENABLED skips a startup download in Nginx Proxy Manager, 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