在线查看服务器 CPU、内存、系统负载、磁盘使用率等指标
在线 ChatGPT 助理
一键申请和自动续签 Let's encrypt 证书
在线编辑 Nginx 配置文件,编辑器支持 Nginx 配置语法高亮
在线查看 Nginx 日志
使用 Go 和 Vue 开发,发行版本为单个可执行的二进制文件
保存配置后自动测试配置文件并重载 Nginx
基于网页浏览器的高级命令行终端
支持深色模式
自适应网页设计

0xJacky 29b83da8cb fix(restore): skipping symlinks outside allowed paths during restore #1371 преди 1 ден
.claude de0467b9e7 feat: allow disabling proxy targets availability test #1327 преди 2 дни
.cursor d64990ec4f feat(config): supports delete file or directory преди 3 месеца
.devcontainer a982c04898 enhance: llm and code completion преди 1 месец
.github e5c9153ce8 chore(deps): update dependency macos to v15 (#1360) преди 1 седмица
.idea 2db7f02c76 chore(idea): exclude go-path преди 8 месеца
.vscode 28cc1dad64 refactor(event): use WebSocket event bus instead of SSE #1197 преди 3 месеца
api e71293cd76 feat: add deploy_mode field to namespace and implement sandbox testing for nginx config #1350 преди 1 ден
app 29b83da8cb fix(restore): skipping symlinks outside allowed paths during restore #1371 преди 1 ден
cmd de0467b9e7 feat: allow disabling proxy targets availability test #1327 преди 2 дни
docs ccedb94880 chore: clean up codes преди 2 дни
internal 29b83da8cb fix(restore): skipping symlinks outside allowed paths during restore #1371 преди 1 ден
mcp c355cb8e65 feat: add llm sessions and update related logic преди 1 месец
model e71293cd76 feat: add deploy_mode field to namespace and implement sandbox testing for nginx config #1350 преди 1 ден
query e71293cd76 feat: add deploy_mode field to namespace and implement sandbox testing for nginx config #1350 преди 1 ден
resources 9aa5a260b6 feat(nginx_log): add advanced indexing settings преди 1 месец
router 6567d929eb feat(nginx_log): add index_path configuration for custom index storage преди 4 дни
settings ccedb94880 chore: clean up codes преди 2 дни
template b63dbe1e50 refactor: refresh 25.04 преди 5 месеца
.air.toml 4b26a559ed enhance: gracefully restart, logging, nginx_log analytics преди 1 месец
.dockerignore 00f4855dce feat: use devconatiner преди 8 месеца
.editorconfig 4f25a0c670 chore: migrate to ESlint v9 преди 11 месеца
.gitignore fc968a3b39 refactor(nginx-log): optimized parser, indexer, searcher and analyzer преди 1 месец
.weblate.ini 43fb701425 enhance: new integration method with Weblate to reduce issues with merging changes преди 1 година
CLAUDE.md 8d15d1fcab enhance(nginx_log): indexing status management преди 1 месец
CODE_OF_CONDUCT.md 4edf8bd82b chore: create CODE_OF_CONDUCT.md преди 8 месеца
CONTRIBUTING.md 4215d2f6f9 chore: Create CONTRIBUTING.md преди 2 години
Dockerfile 17c3d21f6e feat: use working directory from environment variable for `risefront` преди 5 месеца
LICENSE 2cf7bdf19b Create LICENSE преди 3 години
README.md 9aa5a260b6 feat(nginx_log): add advanced indexing settings преди 1 месец
SECURITY.md 66639e0d19 chore: create SECURITY.md преди 8 месеца
app.example.ini 6567d929eb feat(nginx_log): add index_path configuration for custom index storage преди 4 дни
demo.Dockerfile 876e58d49b chore(demo): add our prime sponsor преди 5 месеца
docker-compose-demo.yml 38a019720b enhance(demo): ban Internet преди 11 месеца
go.mod 22e3c69371 chore(deps): update dependencies and improve error handling преди 3 дни
go.sum 22e3c69371 chore(deps): update dependencies and improve error handling преди 3 дни
install.sh 634d9c9b33 chore: update install.sh преди 2 месеца
main.go 4b26a559ed enhance: gracefully restart, logging, nginx_log analytics преди 1 месец
qodana.yaml 03fbd9be4c perf: introduced cache for user, site_config, node преди 1 месец
version.sh 82da0ef05e chore: use go generate преди 5 месеца

README.md

Nginx UI Logo

Nginx UI

Yet another Nginx Web UI, developed by 0xJacky, Hintay and Akino.

DeepWiki Ask DeepWiki

Build and Publish GitHub license Release Version GitHub Star GitHub Fork Repo Size GitHub Fork

Docker Stars Docker Pulls Image Size

Translated Status

Documentation

To check out docs, visit nginxui.com.

Sponsor

If you find this project helpful, please consider sponsoring us to support ongoing development and maintenance.

GitHub Sponsors Afdian

Your support helps us:

  • 🚀 Accelerate the development of new features
  • 🐛 Fix bugs and improve stability
  • 📚 Enhance documentation and tutorials
  • 🌐 Provide better community support
  • 💻 Maintain infrastructure and demo servers

Stargazers over time

Stargazers over time

English | Español | 简体中文 | 繁體中文 | Tiếng Việt | 日本語

Table of Contents
  1. About The Project
  2. Getting Started
  3. Manual Build
  4. Script for Linux
  5. Example of Nginx Reverse Proxy Configuration
  6. Contributing
  7. License

About The Project

Dashboard

Demo

URL:https://demo.nginxui.com

  • Username:admin
  • Password:admin

Features

  • Online statistics for server indicators such as CPU usage, memory usage, load average, and disk usage.
  • Automatic configuration backup after changes, with version comparison and restore capabilities
  • Cluster management supporting mirroring operations to multiple nodes, making multi-server environments easy to manage
  • Export encrypted Nginx / Nginx UI configurations for quick deployment and recovery to new environments
  • Enhanced online ChatGPT assistant supporting multiple models, including Deepseek-R1's chain-of-thought display to help you better understand and optimize configurations
  • MCP (Model Context Protocol) provides special interfaces for AI agents to interact with Nginx UI, enabling automated configuration management and service control.
  • One-click deployment and automatic renewal Let's Encrypt certificates.
  • Online editing websites configurations with our self-designed NgxConfigEditor which is a user-friendly block editor for nginx configurations or Ace Code Editor which supports LLM Code Completion and highlighting nginx configuration syntax.
  • Online view Nginx logs
  • Written in Go and Vue, distribution is a single executable binary.
  • Automatically test configuration file and reload nginx after saving configuration.
  • Web Terminal
  • Dark Mode
  • Responsive Web Design

Internationalization

We proudly offer official support for:

  • English
  • Simplified Chinese
  • Traditional Chinese

As non-native English speakers, we strive for accuracy, but we know there's always room for improvement. If you spot any issues, we'd love your feedback!

Thanks to our amazing community, additional languages are also available! Explore and contribute to translations on Weblate.

Getting Started

Before Use

The Nginx UI follows the Debian web server configuration file standard. Created site configuration files will be placed in the sites-available folder that under the Nginx configuration folder (auto-detected). The configuration files for an enabled site will create a soft link to the sites-enabled folder. You may need to adjust the way the configuration files are organised.

For non-Debian (and Ubuntu) systems, you may need to change the contents of the nginx.conf configuration file to the Debian style as shown below.

http {
	# ...
	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}

For more information: debian/conf/nginx.conf

Installation

Nginx UI is available on the following platforms:

  • macOS 11 Big Sur and later (amd64 / arm64)
  • Windows 10 and later (amd64 / arm64)
  • Linux 2.6.23 and later (x86 / amd64 / arm64 / armv5 / armv6 / armv7 / mips32 / mips64 / riscv64 / loongarch64)
    • Including but not limited to Debian 7 / 8, Ubuntu 12.04 / 14.04 and later, CentOS 6 / 7, Arch Linux
  • FreeBSD
  • OpenBSD
  • Dragonfly BSD
  • Openwrt

You can visit latest release to download the latest distribution, or just use installation scripts for Linux.

Usage

In the first runtime of Nginx UI, please visit http://<your_server_ip>:<listen_port> in your browser to complete the follow-up configurations.

From Executable

Run Nginx UI in Terminal

nginx-ui -config app.ini

Press Control+C in the terminal to exit Nginx UI.

Run Nginx UI in Background

nohup ./nginx-ui -config app.ini &

Stop Nginx UI with the follow command.

kill -9 $(ps -aux | grep nginx-ui | grep -v grep | awk '{print $2}')

With Systemd

If you are using the installation script for Linux, the Nginx UI will be installed as nginx-ui service in systemd. Please use the systemctl command to control it.

Start Nginx UI

systemctl start nginx-ui

Stop Nginx UI

systemctl stop nginx-ui

Restart Nginx UI

systemctl restart nginx-ui

With Docker

Our docker image uozi/nginx-ui:latest is based on the latest nginx image and can be used to replace the Nginx on the host. By publishing the container's port 80 and 443 to the host, you can easily make the switch.

Note
  1. When using this container for the first time, ensure that the volume mapped to /etc/nginx is empty.
  2. If you want to host static files, you can map directories to container.
Deploy with Docker 1. [Install Docker.](https://docs.docker.com/install/) 2. Then deploy nginx-ui like this: ```bash docker run -dit \ --name=nginx-ui \ --restart=always \ -e TZ=Asia/Shanghai \ -v /mnt/user/appdata/nginx:/etc/nginx \ -v /mnt/user/appdata/nginx-ui:/etc/nginx-ui \ -v /var/run/docker.sock:/var/run/docker.sock \ -p 8080:80 -p 8443:443 \ uozi/nginx-ui:latest ``` 3. When your docker container is running, Log in to nginx-ui panel with `http://:8080/install`.
Deploy with Docker-Compose 1. [Install Docker-Compose.](https://docs.docker.com/compose/install/) 2. Create a docker-compose.yml file like this: ```yml services: nginx-ui: stdin_open: true tty: true container_name: nginx-ui restart: always environment: - TZ=Asia/Shanghai volumes: - '/mnt/user/appdata/nginx:/etc/nginx' - '/mnt/user/appdata/nginx-ui:/etc/nginx-ui' - '/var/www:/var/www' - '/var/run/docker.sock:/var/run/docker.sock' ports: - 8080:80 - 8443:443 image: 'uozi/nginx-ui:latest' ``` 3. Then creat your container by: ```bash docker compose up -d ``` 4. When your docker container is running, Log in to nginx-ui panel with `http://:8080/install`.

Manual Build

On platforms that do not have an official build version, they can be built manually.

Prerequisites

  • Make

  • Golang 1.23+

  • node.js 21+

    npx browserslist@latest --update-db
    

Build Frontend

Please execute the following command in app directory.

pnpm install
pnpm build

Build Backend

Please build the app first, and then execute the following command in the project root directory.

go generate
go build -tags=jsoniter -ldflags "$LD_FLAGS -X 'github.com/0xJacky/Nginx-UI/settings.buildTime=$(date +%s)'" -o nginx-ui -v main.go

Script for Linux

Basic Usage

Install and Upgrade

bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ install

The default listening port is 9000, and the default HTTP Challenge port is 9180. If there is a port conflict, please modify /usr/local/etc/nginx-ui/app.ini manually, then use systemctl restart nginx-ui to reload the Nginx UI service.

Remove Nginx UI, except configuration and database files

bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ remove

More Usage

bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ help

Example of Nginx Reverse Proxy Configuration

server {
    listen          80;
    listen          [::]:80;

    server_name     <your_server_name>;
    rewrite ^(.*)$  https://$host$1 permanent;
}

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen  443       ssl;
    listen  [::]:443  ssl;
    http2   on;

    server_name         <your_server_name>;

    ssl_certificate     /path/to/ssl_cert;
    ssl_certificate_key /path/to/ssl_cert_key;

    location / {
        proxy_set_header    Host                $host;
        proxy_set_header    X-Real-IP           $remote_addr;
        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto   $scheme;
        proxy_http_version  1.1;
        proxy_set_header    Upgrade             $http_upgrade;
        proxy_set_header    Connection          $connection_upgrade;
        proxy_pass          http://127.0.0.1:9000/;
    }
}

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is provided under a GNU Affero General Public License v3.0 license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.