Skip to content

Initial Admin Email and Password don't work on new installations #4860

@switchback028

Description

@switchback028

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
When creating a new instance of NPM using docker compose, the container attempts to create the user and password (Using INITIAL_ADMIN_EMAIL and INITIAL_ADMIN_PASSWORD) however on container start the following errors are printed:
[11/7/2025] [7:37:54 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite
[11/7/2025] [7:37:55 PM] [Migrate ] › ℹ info Current database version: none
[11/7/2025] [7:37:55 PM] [Setup ] › ℹ info Creating a new user: admin@snip.com with password: snip
[11/7/2025] [7:37:55 PM] [Global ] › ✖ error Startup Error: email is not defined ReferenceError: email is not defined
at setupDefaultUser (file:///app/setup.js:40:11)

Admin login page does not load properly, reporting an unhealthy API. Likely due to the initial configuration failing due to above error.

Nginx Proxy Manager Version
N/A, see above.

To Reproduce
Steps to reproduce the behavior:

  1. Create a docker compose file with following settings:
    services:
    app:
    container_name: nginx-proxy-manager
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    network_mode: host
    environment:
    INITIAL_ADMIN_EMAIL: 'admin@snip.com'
    INITIAL_ADMIN_PASSWORD: 'snip'
    volumes:
    • /opt/nginxproxy/data:/data
    • /opt/nginxproxy/letsencrypt:/etc/letsencrypt`
  2. Execute the command: docker compose up (Or docker-compose up depending on docker version)
  3. Execute the command to view logs: docker logs nginx-proxy-manager

Expected behavior
NPM Docker Container starts successfully and initial user/password is created for unattended installation.

Operating System
Debian 13.1

Additional context
Docker Engine 28.5.2 (Community)
Docker Compose 2.40.3

EDIT: Looked at setup.js line 40 (As the error reports), it appears that the variable email is legacy and the correct variable should be initialAdminEmail. Also appears the password variable is incorrect as well on line 56.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions