nginx-ui README

The project's README from github.com/0xJacky/nginx-ui. As one markdown file: README.md.

Nginx UI Logo

Nginx UI

MCP Toplist

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

DeepWiki Ask DeepWiki

Documentation

AtomGit  Proudly hosted on AtomGit — a part of the G-Star program.

AtomGit Stars

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

Docker Stars Docker Pulls Image Size

Featured|HelloGitHub

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

Sponsors

AxisNow

Protect and accelerate websites and APIs with consistent access performance across mainland China and worldwide, and extend acceleration and security to native and mobile apps through client SDKs — Self-hosted private CDN|Subscription-based anti-DDoS CDN|A self-controlled, flexibly composable CDN network.

Official Community Group

Join the official Nginx UI WeChat community group to discuss usage, deployment ideas, and troubleshooting with other community members.

Scan the QR code below to add us on WeChat, and include Nginx UI Community Group in your request. The administrator will invite you to the official community group.

Nginx UI WeChat Community QR Code

Your support helps us:

Tooling Support

JetBrains Logo

Thanks to JetBrains for supporting us with free open source licenses.

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

Features

Internationalization

We proudly offer official support for:

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:

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.
  3. If you are upgrading from an older image, see the Docker WebSocket fix guide for required conf.d/nginx-ui.conf updates.
Deploy with Docker
  1. Install Docker.

  2. Then deploy nginx-ui like this:

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
  1. When your docker container is running, Log in to nginx-ui panel with http://<your_server_ip>:8080/install. If you change the port mapping, access Nginx UI through the host port mapped to container port 80 instead.
Deploy with Docker-Compose
  1. Install Docker-Compose.

  2. Create a docker-compose.yml file like this:

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'
  1. Then creat your container by:
docker compose up -d
  1. When your docker container is running, Log in to nginx-ui panel with http://<your_server_ip>:8080/install. If you change the port mapping, access Nginx UI through the host port mapped to container port 80 instead.

Manual Build

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

Prerequisites

Build Frontend

Please execute the following command in app directory.

bun install
bun run 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.

nginx-ui (0xJacky/nginx-ui)

Searching Database…

11.6K ·GitHub
这是什么?Nginx UI 是一个基于网页的 Nginx 服务器管理面板,可以编辑站点配置、查看日志、签发 SSL 证书、监控服务器状态,所有操作都通过浏览器完成,无需使用命令行。
这是在我现有的 Nginx 上面加的图形界面编辑器,还是会完全取代 Nginx?它与 Nginx 运行在同一环境中(或运行在其内部),直接管理其配置文件;Docker 镜像基于 Nginx 官方镜像构建,因此可以在主机上完全取代 Nginx。
我该怎样让它跑起来?下载适用于你操作系统的预编译二进制文件并运行;通过 Linux 安装脚本将其安装为 systemd 服务;或者运行官方 uozi/nginx-ui:latest Docker 镜像(也可以使用 docker-compose),并映射 80/443 端口。
安装时有什么需要注意的问题吗?默认登录账号和密码是 admin/admin,应立即修改;它默认使用 9000(HTTP)和 9180(ACME 验证)端口,可能与现有服务冲突;它默认采用 Debian 风格的 sites-available/sites-enabled 目录结构,因此非 Debian 系统可能需要额外调整 nginx.conf。
它实际支持哪些平台?预编译二进制文件支持 macOS 11+、Windows 10+、Linux 2.6.23+(x86/amd64/arm64/mips/riscv64/loongarch64 架构),包括 Debian、Ubuntu、CentOS、Arch,另外还支持 FreeBSD、OpenBSD、Dragonfly BSD 和 OpenWrt。
它内置了 AI 助手吗?有的,内置了类似 ChatGPT 的在线助手,支持多种模型(包括显示思维链的 Deepseek-R1),可帮助编写和优化 Nginx 配置;另外还有集成 LLM 代码补全功能的 Ace 编辑器。
MCP 支持是用来做什么的?Nginx UI 提供了一个 Model Context Protocol(MCP)服务器,AI 智能体可以直接与其交互,实现自动化的配置管理和服务控制。
我能用它管理多台服务器吗?可以,它具备集群管理功能,能将配置操作同步镜像到多个节点,让多服务器环境更容易管理。
它能帮我处理 SSL 证书吗?可以,支持一键部署 Let's Encrypt 证书并自动续期。
Creator
0xJacky
Size
153.4 MB
Stars
11.6K
Age
5y
Commits · 90 Days