Skip to content

Wizard fails during installation #1412

@enwikuna

Description

@enwikuna

Describe the bug
The initial setup wizard (“Self Check” screen) in uozi/nginx-ui:latest never finishes and never allows proceeding to the actual UI. It always reports failing checks like “PID path not exist”, “Config directory not exist”, “Sites-available directory not exist”, even though Nginx is actually running in the container, the config directory is mounted correctly, and all required paths and files exist.

Because the wizard never turns green, there is no way to complete installation through the normal flow.

Additionally, /install does not present a normal “create admin user” wizard. Instead, calling / or /install returns {"message":"not found"} until the Self Check is passed — which in this case is impossible.

It looks like the wizard fails to parse live Nginx info even though Nginx is there and working.

To Reproduce

  1. Start nginx-ui using the official uozi/nginx-ui:latest image with a bind-mount for /etc/nginx and /etc/nginx-ui, plus published ports 8080→80 and 8443→443.
  2. Make sure /etc/nginx (on host we mount /opt/system/nginx-ui/nginx) is populated with a normal Nginx config:
    • nginx.conf with pid /var/run/nginx.pid;
    • conf.d/, sites-available/, sites-enabled/, etc.
  3. Browse to http://SERVER_IP:8080 or via SSH tunnel (ssh -L 8080:127.0.0.1:8080 root@SERVER_IP) and let nginx-ui show the installer “Self Check”.
  4. The Self Check shows multiple ❌ items:
    • “Config directory not exist”
    • “Sites-available directory not exist”
    • “Failed to read nginx.conf”
    • “PID path not exist”
  5. Click “Attempt to fix” on each item. The UI still reports ❌.
  6. Click “Recheck”. Still ❌.
  7. You cannot advance past this screen.

Meanwhile, inside the running nginx-ui container:

  • The config dir and files exist and are readable:
    docker exec -it nginx-ui ls /etc/nginx
    # conf.d  fastcgi_params  mime.types  modules  nginx.conf  scgi_params
    # sites-available  sites-enabled  streams-available  streams-enabled  uwsgi_params
  • The PID path exists and contains the actual master PID:
    docker exec -it nginx-ui sh -c 'cat /etc/nginx/nginx.conf | grep pid'
    # pid        /var/run/nginx.pid;
    
    docker exec -it nginx-ui ls -l /run /var/run
    # /var/run -> /run
    # /run/nginx.pid (present, contains PID)
  • nginx -V from inside the container clearly shows correct build flags:
    --conf-path=/etc/nginx/nginx.conf
    --pid-path=/run/nginx.pid
    --error-log-path=/var/log/nginx/error.log
    --http-log-path=/var/log/nginx/access.log
    

But nginx-ui logs spam errors like:

ERROR ... internal/nginx/resolve_path.go:91    nginx.GetConfEntryPath len(match) < 1
ERROR ... internal/nginx/resolve_path.go:67    nginx.GetConfPath len(match) < 1
ERROR ... internal/nginx/resolve_path.go:109   pid path not found in nginx -V output
...
PID path not exist

So nginx-ui fails to “see” the exact same paths it just printed from nginx -V. It never marks the PID path as valid, and because of that the wizard refuses to continue. The admin user screen is never reachable.

Expected behavior

  • The installer should accept a valid, already-running Nginx config when:
    • /etc/nginx/nginx.conf exists and is readable,
    • /etc/nginx/sites-available and /etc/nginx/sites-enabled exist (they do),
    • the PID file path in nginx.conf exists and contains a PID (/var/run/nginx.pid -> /run/nginx.pid exists).
  • Clicking “Attempt to fix” should populate any missing internal settings so that “Recheck” turns green and allows proceeding.
  • If Nginx is already running and we’re just attaching nginx-ui to manage it, the wizard should not block forever.

Additionally:
If the project has moved to a “headless install” flow (env vars like NGINX_UI_NODE_SKIP_INSTALLATION, NGINX_UI_PREDEFINED_USER_NAME, etc.), then the wizard should either:

  • honour those env vars and skip itself entirely, OR
  • surface a login page directly, instead of trapping the user on Self Check.

Right now, the wizard is a dead end for me.

Screenshots

  • Wizard Self Check screen shows many ❌ such as:
    • “Config directory not exist”
    • “Sites-available directory not exist”
    • “Nginx PID path exists: PID path not exist”
      even though /etc/nginx contains full config and /run/nginx.pid exists in the container.
  • Clicking “Attempt to fix” does not flip them to ✅.
Image

Info (please complete the following information):

  • Server OS: Ubuntu 22.04 LTS (x86_64)
  • Server Arch: x86_64
  • Nginx UI Version: uozi/nginx-ui:latest as of 2025-10-28
  • Your Browser: Firefox latest on desktop
  • Docker runtime: compose v2, container runs in a custom external network proxy-tier

Relevant container logs at startup:

ERROR ... internal/nginx/resolve_path.go:91    nginx.GetConfEntryPath len(match) < 1
ERROR ... internal/nginx/resolve_path.go:67    nginx.GetConfPath len(match) < 1
ERROR ... internal/nginx/resolve_path.go:109   pid path not found in nginx -V output
DEBUG ... nginx version: nginx/1.29.1
...
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx
 --conf-path=/etc/nginx/nginx.conf
 --error-log-path=/var/log/nginx/error.log
 --http-log-path=/var/log/nginx/access.log
 --pid-path=/run/nginx.pid
...
PID path not exist

As you can see, nginx-ui itself prints --pid-path=/run/nginx.pid from nginx -V, and /var/run/nginx.pid actually exists (with /var/run symlinked to /run), but the wizard still errors “PID path not exist” and never proceeds.

Additional context
Below is our docker-compose.yml snippet we use to run nginx-ui side-by-side with an existing nginx proxy. We mount empty host dirs into /etc/nginx and /etc/nginx-ui, then nginx-ui populates them. Ports 8080/8443 are for testing before we swap it to :80/:443 in production:

  nginx-ui:
    image: uozi/nginx-ui:latest
    container_name: nginx-ui
    restart: always
    environment:
      - TZ=Europe/Berlin
      # (we also tried without predefined vars, and with predefined vars)
      # - NGINX_UI_PREDEFINED_USER_NAME=enwikuna
      # - NGINX_UI_PREDEFINED_USER_PASSWORD=SuperSecret123!
      # - NGINX_UI_NGINX_CONTAINER_NAME=nginx-ui
    ports:
      - "8080:80"
      - "8443:443"
    volumes:
      - /opt/system/nginx-ui/nginx:/etc/nginx
      - /opt/system/nginx-ui/ui:/etc/nginx-ui
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - proxy-tier

networks:
  proxy-tier:
    external: true

Inside nginx-ui, after first start, /etc/nginx looks like this (bind-mounted from host):

conf.d
fastcgi_params
mime.types
modules
nginx.conf
scgi_params
sites-available
sites-enabled
streams-available
streams-enabled
uwsgi_params

nginx.conf contains:

pid        /var/run/nginx.pid;
...
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.conf;

And /run/nginx.pid exists and holds the current master PID.

TL;DR

  • nginx-ui installer refuses to accept a perfectly valid running Nginx.
  • It never advances past the Self Check.
  • It incorrectly reports “PID path not exist” even though /var/run/nginx.pid (→ /run/nginx.pid) is present.
  • There is no way to reach the login / dashboard without manually setting a bunch of undocumented env vars to skip the installation wizard.

It would help if:

  • the wizard accepted /var/run symlinking to /run, or
  • the wizard let us continue after manual confirmation, or
  • these config paths could be entered in the wizard UI directly, or
  • the documented env vars for non-interactive install were mentioned prominently so we can bypass the wizard cleanly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions