mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 16:55:56 +03:00
[GH-ISSUE #1258] unable to login / reset the password. #688
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#688
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 @sbarex on GitHub (Jul 23, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1258
Describe the bug
I install nginx-ui on macos with homebrew.
After install and created a local user, I cannot login (password incorrect).
I cannot reset the password.
To Reproduce
on terminal:
Info (please complete the following information):
@0xJacky commented on GitHub (Jul 25, 2025):
Sorry, I cannot reproduce this issue. Can you try to reinstall nginx-ui or remove /opt/homebrew/etc/nginx-ui/app.ini and /opt/homebrew/etc/nginx-ui/database.db, then restart the service and try again?
@0xJacky commented on GitHub (Jul 25, 2025):
I understand. After installing via brew, you should access localhost:9000/#/install in your browser for the installation process, rather than using the password reset function directly.
@sbarex commented on GitHub (Jul 28, 2025):
I actually did the setup on first boot, but then authentication fails and I can't reset the password or start the setup again.
I deleted the
app.inifile and thedatabase.db, and reset the setup with the username and password. But then when I try to log in, it doesn't work: "password incorrect."@zhangxh-math commented on GitHub (Sep 5, 2025):
I think I'm encountering almost the same issue, and I hope my solution can help you. My device is a Mac mini M4. After installing nginx-ui via Homebrew, I started nginx-ui using brew services and ran into the same problems and error messages as you. However, if I run the following command directly in the terminal:
there are no issues at all.
After searching for answers on GitHub issues without success, I sent the error logs to DeepSeek. DeepSeek explained that this happens because when nginx-ui runs via brew services, the environment variables are different from those in the user's terminal. As a result, it fails to recognize the correct path to nginx, leading to errors such as "exec: no command", "pid path not found in nginx -V output", etc.
To resolve this, it's only necessary to add environment variables to the plist file. Specifically, add the following to
~/Library/LaunchAgents/homebrew.mxcl.nginx-ui.plistThen execute:
That should fix it. I don't come from a programming background, so my expression might not be entirely accurate - please forgive any imprecision. At the same time, I genuinely enjoy using nginx-ui and sincerely hope the developer can help incorporate this configuration.
我认为我遇到了几乎一样的问题, 我希望我自己的解决办法能够帮到你. 我使用的设备是 mac mini m4, 通过 Homebrew 安装 nginx-ui 后, 使用 brew service 启动 nginx-ui, 遇到了与你一样的问题与报错, 但是如果我直接在终端运行
并不会出现任何问题. 我在 github issue 寻找答案无果后, 就把报错的日志发送给 deepseek, deepseek 告诉我这是因为 nginx-ui 通过
brew services运行时, 环境变量与用户终端中的不同, 所以运行时没有识别到 nginx 的准确路径, 导致出现 "exec: no command"、"pid path not found in nginx -V output" 等错误. 为了解决这个问题, 只需要往 plist 中添加环境变量即可. 即在~/Library/LaunchAgents/homebrew.mxcl.nginx-ui.plist中加入再执行
即可. 我个人并不是编程出身, 表达有可能不太准确, 请见谅, 同时我也很喜欢 nginx-ui, 并真心希望作者帮忙加上这一段设置.