This installation method is designed for Windows users who have the Windows Package Manager (winget) available.
If you don't have winget installed, you can install it from the Microsoft Store or download it from the GitHub releases page.
winget install 0xJacky.nginx-ui
This command will:
%LOCALAPPDATA%\Microsoft\WinGet\Packages\0xJacky.nginx-ui__DefaultSource\
Note: The installation process does not create any configuration files. You will need to create the configuration manually or let Nginx UI create it on first run.
After installation, you can verify that Nginx UI is installed correctly:
nginx-ui --version
WinGet installs Nginx UI to the user's local directory:
%LOCALAPPDATA%\Microsoft\WinGet\Packages\0xJacky.nginx-ui__DefaultSource\
%LOCALAPPDATA%\Microsoft\WinGet\Packages\0xJacky.nginx-ui__DefaultSource\nginx-ui.exe
You can access this directory using:
cd "%LOCALAPPDATA%\Microsoft\WinGet\Packages\0xJacky.nginx-ui__DefaultSource\"
On Windows, Nginx UI can be run as a Windows Service or manually started from the command line.
Since Nginx UI doesn't have built-in Windows service management, you need to manually register it using sc.exe
:
# Create the service (run as Administrator)
# Note: WinGet installs to user's local directory
sc create nginx-ui binPath= "%LOCALAPPDATA%\Microsoft\WinGet\Packages\0xJacky.nginx-ui__DefaultSource\nginx-ui.exe serve" start= auto
# Start the service
sc start nginx-ui
You can manage the service using Windows Service Manager or PowerShell:
# Start the service
Start-Service nginx-ui
# Stop the service
Stop-Service nginx-ui
# Restart the service
Restart-Service nginx-ui
# Check service status
Get-Service nginx-ui
The service is already configured to start automatically with start= auto
in the creation command above. To change this later:
Set-Service -Name nginx-ui -StartupType Automatic
If you prefer to run Nginx UI manually instead of as a service:
# Run in foreground
nginx-ui
# Run with custom config
nginx-ui serve -config C:\path\to\your\app.ini
# Run directly from installation directory
"%LOCALAPPDATA%\Microsoft\WinGet\Packages\0xJacky.nginx-ui__DefaultSource\nginx-ui.exe" serve
# Run in background (using Start-Job)
Start-Job -ScriptBlock { nginx-ui serve }
The configuration file needs to be created manually or will be created on first run. It should be located at:
%LOCALAPPDATA%\nginx-ui\app.ini
C:\ProgramData\nginx-ui\app.ini
Data is typically stored in:
%LOCALAPPDATA%\nginx-ui\
C:\ProgramData\nginx-ui\
You can either:
To create the configuration directory and file manually:
# Create the configuration directory
New-Item -ItemType Directory -Force -Path "$env:LOCALAPPDATA\nginx-ui"
# Create a basic configuration file
@"
[app]
PageSize = 10
[server]
Host = 0.0.0.0
Port = 9000
RunMode = release
[cert]
HTTPChallengePort = 9180
[terminal]
StartCmd = cmd
"@ | Out-File -FilePath "$env:LOCALAPPDATA\nginx-ui\app.ini" -Encoding utf8
The default configuration includes:
[app]
PageSize = 10
[server]
Host = 0.0.0.0
Port = 9000
RunMode = release
[cert]
HTTPChallengePort = 9180
[terminal]
StartCmd = cmd
winget upgrade nginx-ui
winget upgrade --all
# Stop the service first
sc stop nginx-ui
# Delete the service
sc delete nginx-ui
# Uninstall the package
winget uninstall nginx-ui
::: warning
This will permanently delete all your configurations, sites, certificates, and data. Make sure to backup any important data before proceeding.
:::
# Remove configuration and data directories
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\nginx-ui"
Remove-Item -Recurse -Force "$env:PROGRAMDATA\nginx-ui"
If you encounter port conflicts (default port is 9000), you need to modify the configuration file:
Edit the configuration file:
notepad "$env:LOCALAPPDATA\nginx-ui\app.ini"
Change the port in the [server]
section:
[server]
Host = 0.0.0.0
Port = 9001
RunMode = release
Restart the service:
Restart-Service nginx-ui
If you have issues accessing Nginx UI from other devices, you may need to configure Windows Firewall:
# Allow Nginx UI through Windows Firewall (TCP and UDP)
New-NetFirewallRule -DisplayName "Nginx UI TCP" -Direction Inbound -Protocol TCP -LocalPort 9000 -Action Allow
New-NetFirewallRule -DisplayName "Nginx UI UDP" -Direction Inbound -Protocol UDP -LocalPort 9000 -Action Allow
To troubleshoot service issues, you can view logs:
eventvwr.msc
)If Nginx UI is configured to write logs to files:
# View log files (if configured)
Get-Content "$env:LOCALAPPDATA\nginx-ui\logs\nginx-ui.log" -Tail 50
If you encounter permission issues:
If the service fails to start:
Check service status:
Get-Service nginx-ui
Verify configuration file exists (create if needed):
Test-Path "$env:LOCALAPPDATA\nginx-ui\app.ini"
# If it returns False, create the configuration directory and file first
Try running manually to see error messages:
nginx-ui serve -config "$env:LOCALAPPDATA\nginx-ui\app.ini"
# Or run directly from installation directory:
& "$env:LOCALAPPDATA\Microsoft\WinGet\Packages\0xJacky.nginx-ui__DefaultSource\nginx-ui.exe" serve -config "$env:LOCALAPPDATA\nginx-ui\app.ini"
Check for port conflicts:
# Check if port 9000 is already in use
netstat -an | findstr :9000
If you encounter any issues:
After installation, you can:
http://localhost:9000