The reset-password
command allows you to reset the initial administrator account's password to a randomly generated 12-character password that includes uppercase letters, lowercase letters, numbers, and special symbols.
To reset the initial user's password, run:
nginx-ui reset-password --config=/path/to/app.ini
The command will:
--config
: (Required) Path to the Nginx UI configuration file# Reset the password using the default config file location
nginx-ui reset-password --config=/path/to/app.ini
# The output will include the generated password
2025-03-03 03:24:41 INFO user/reset_password.go:52 confPath: ../app.ini
2025-03-03 03:24:41 INFO user/reset_password.go:59 dbPath: ../database.db
2025-03-03 03:24:41 INFO user/reset_password.go:92 User: root, Password: X&K^(X0m(E&&
If you installed Nginx UI using the Linux one-click installation script, the configuration file is located at:
/usr/local/etc/nginx-ui/app.ini
You can directly use the following command:
nginx-ui reset-password --config /usr/local/etc/nginx-ui/app.ini
If you're running Nginx UI in a Docker container, you need to use the docker exec
command:
docker exec -it <nginx-ui-container> nginx-ui reset-password --config=/etc/nginx-ui/app.ini
Replace <nginx-ui-container>
with your actual container name or ID.