mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 00:36:08 +03:00
[GH-ISSUE #1412] Wizard fails during installation #7904
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#7904
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @enwikuna on GitHub (Oct 28, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1412
Describe the bug
The initial setup wizard (“Self Check” screen) in
uozi/nginx-ui:latestnever 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,
/installdoes not present a normal “create admin user” wizard. Instead, calling/or/installreturns{"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
nginx-uiusing the officialuozi/nginx-ui:latestimage with a bind-mount for/etc/nginxand/etc/nginx-ui, plus published ports 8080→80 and 8443→443./etc/nginx(on host we mount/opt/system/nginx-ui/nginx) is populated with a normal Nginx config:nginx.confwithpid /var/run/nginx.pid;conf.d/,sites-available/,sites-enabled/, etc.http://SERVER_IP:8080or via SSH tunnel (ssh -L 8080:127.0.0.1:8080 root@SERVER_IP) and let nginx-ui show the installer “Self Check”.Meanwhile, inside the running
nginx-uicontainer:nginx -Vfrom inside the container clearly shows correct build flags:But nginx-ui logs spam errors like:
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
/etc/nginx/nginx.confexists and is readable,/etc/nginx/sites-availableand/etc/nginx/sites-enabledexist (they do),nginx.confexists and contains a PID (/var/run/nginx.pid->/run/nginx.pidexists).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:Right now, the wizard is a dead end for me.
Screenshots
even though
/etc/nginxcontains full config and/run/nginx.pidexists in the container.Info (please complete the following information):
uozi/nginx-ui:latestas of 2025-10-28proxy-tierRelevant container logs at startup:
As you can see, nginx-ui itself prints
--pid-path=/run/nginx.pidfromnginx -V, and/var/run/nginx.pidactually exists (with/var/runsymlinked to/run), but the wizard still errors “PID path not exist” and never proceeds.Additional context
Below is our
docker-compose.ymlsnippet we use to run nginx-ui side-by-side with an existing nginx proxy. We mount empty host dirs into/etc/nginxand/etc/nginx-ui, then nginx-ui populates them. Ports 8080/8443 are for testing before we swap it to :80/:443 in production:Inside
nginx-ui, after first start,/etc/nginxlooks like this (bind-mounted from host):nginx.confcontains:And
/run/nginx.pidexists and holds the current master PID.TL;DR
/var/run/nginx.pid(→/run/nginx.pid) is present.It would help if:
/var/runsymlinking to/run, or@enwikuna commented on GitHub (Oct 28, 2025):
I hope this can be fixed fast. I'm not able to setup a server. If there is no fix, I sadly need to go with the plain NGINX which would be mad because I always love effort in this kind of projects.
@enwikuna commented on GitHub (Oct 29, 2025):
Hi there,
here is additional context from my environment that might help you reproduce the installer issue.
Summary
The first-time installation wizard (“Self Check”) never lets me proceed. It keeps showing red ❌ for things like:
Even though:
/etc/nginxexists and is mounted/etc/nginx/nginx.confexists and is readable/etc/nginx/conf.dand/etc/nginx/sites-enabledexist/var/run/nginx.pidexists and contains the running Nginx PIDBecause the wizard never turns green, I never reach the actual UI unless I skip the wizard using environment variables.
Possibly relevant: parsing logic
From looking at
internal/nginx/resolve_path.go, functions likeGetConfPath(),GetConfEntryPath(), andGetPIDPath()try to detect paths by parsing the output ofnginx -Vusing regex.Example from the code:
and:
In my logs I repeatedly get:
nginx.GetConfPath len(match) < 1nginx.GetConfEntryPath len(match) < 1pid path not found in nginx -V outputAfter that, the wizard reports the checks as failed and will not continue.
The important part
Inside the container,
nginx -Vreturns:So
--conf-path=/etc/nginx/nginx.confand--pid-path=/run/nginx.pidare clearly present.But the current regex logic in
GetConfPath(),GetConfEntryPath(), andGetPIDPath()still fails to detect them and returns"", which then causes the installer UI to say these paths don’t exist.As a result:
/var/run/nginx.pidexists (/var/run→/runsymlink )./etc/nginx/nginx.confexists and includes:Practical impact
Because these functions return
""instead of falling back to sane defaults (like/etc/nginx,/etc/nginx/nginx.conf,/var/run/nginx.pid), the wizard is effectively a dead-end. You cannot reach the login screen or dashboard.The only way I can currently use Nginx UI is to skip the installer completely and inject all paths + an admin user via environment variables, e.g.:
That works (I get a login form and can use the UI), but it bypasses the installer entirely.
What would fix this (from my perspective)
It would probably be enough to make the detection functions more forgiving:
In
GetConfPath():--conf-path=([^\s]+)to grab the full value (e.g./etc/nginx/nginx.conf) and thenfilepath.Dir(...)./etc/nginxinstead of returning"".In
GetConfEntryPath():--conf-path=...the same way.<ConfPath>/nginx.conf.In
GetPIDPath():--pid-path=([^\s]+)./var/run/nginx.pidand/run/nginx.pidbefore returning""(on my system/var/run/nginx.pidexists and contains the PID).This way the wizard would be able to continue with sane defaults, instead of blocking forever.
So in short:
resolve_path.gofails to parsenginx -V, and when that happens it returns""instead of providing a fallback.Hope this helps, and thank you for building this project.
@enwikuna commented on GitHub (Oct 29, 2025):
Please see our fix #1414
Build locally and deployed to our server. Path is now resolving successfully.
With the latest image:
025-10-29 13:03:57.414 ERROR github.com/0xJacky/Nginx-UI/internal/nginx/resolve_path.go:67 nginx.GetConfPath len(match) < 1With the fix:
2025-10-29 13:05:24.171 DEBUG github.com/0xJacky/Nginx-UI/internal/nginx/resolve_path.go:80 nginx.GetConfPath fallback used base /etc/nginx@Yanik39 commented on GitHub (Nov 4, 2025):
I have similar problems. They came after update. Everything working just fine except self check.
@enwikuna commented on GitHub (Nov 4, 2025):
It’s a bug. I can confirm it since I fixed it myself locally with a Docker build. I you want I can provide a fixed version of the latest one to you until the guy of this is repo finds time to merge and release our two fix-pull-requests. I you want the fixed version, write me an email to: info[at]enwikuna.de and i will reply with an OneDrive link incl. short tutorial how to use it. Please note that you need to change the image At some point when the fix is merged to receive updates in the future.
@Yanik39 commented on GitHub (Nov 4, 2025):
Thanks for your response. All my system is working. There is no effect to my sites etc. So its not urgent for me and would like to wait for official release. Thanks a lot for your suggestion.
@0xJacky commented on GitHub (Nov 11, 2025):
I'm still curious about this issue. Using the latest image and starting directly, nginx-ui can function normally and successfully passed the self-check.
@0xJacky commented on GitHub (Nov 11, 2025):
Docker version 28.3.3, build 980b856
@0xJacky commented on GitHub (Nov 11, 2025):
just click the "attampt fix" button to resolve the issues.
In additional, if the self check reports that sbin path is not exists, you can check the output of "nginx -V" if the
--sbin-pathis exists. Otherwise, you should modify the configuation of nginx-ui, to set the sbin path of nginx manually (https://nginxui.com/guide/config-nginx.html#sbinpath)@0xJacky commented on GitHub (Nov 11, 2025):
@enwikuna Could you please provide the output of
docker inspect nginx-ui?@enwikuna commented on GitHub (Nov 11, 2025):
I did used the attempt fix button but no success. Only applying the fix I've told you about fixed the issue. This is the output you've asked for:
Also, check this: