Back to rankings

nginx-proxy/nginx-proxy

Python

Automated Nginx Reverse Proxy for Docker

nginxdockerdocker-genreverse-proxy
Star Growth
Stars
19.9k
Forks
3k
Weekly Growth
Issues
281
5k10k15k
Jan 2023Mar 2024May 2025Jul 2026
ArtifactsPyPIpip install nginx-proxy
README
ZeroSSL

nginx-proxy

Test GitHub release nginx 1.31.3 Docker Image Size Docker stars Docker pulls

nginx-proxy sets up a container running nginx and docker-gen. docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped.

See Automated Nginx Reverse Proxy for Docker for why you might want to use this.

Usage

To run it:

docker run --detach \
    --name nginx-proxy \
    --publish 80:80 \
    --volume /var/run/docker.sock:/tmp/docker.sock:ro \
    nginxproxy/nginx-proxy:1.11

Then start any containers (here an nginx container) you want proxied with an env var VIRTUAL_HOST=subdomain.yourdomain.com

docker run --detach \
    --name your-proxied-app \
    --env VIRTUAL_HOST=foo.bar.com \
    nginx

Provided your DNS is setup to resolve foo.bar.com to the host running nginx-proxy, a request to http://foo.bar.com will then be routed to a container with the VIRTUAL_HOST env var set to foo.bar.com (in this case, the your-proxied-app container).

The containers being proxied must :

  • expose the port to be proxied, either by using the EXPOSE directive in their Dockerfile or by using the --expose flag to docker run or docker create.
  • share at least one Docker network with the nginx-proxy container: by default, if you don't pass the --net flag when your nginx-proxy container is created, it will only be attached to the default bridge network. This means that it will not be able to connect to containers on networks other than bridge.

Note: providing a port number in VIRTUAL_HOST isn't suported, please see virtual ports or custom external HTTP/HTTPS ports depending on what you want to achieve.

Image variants

The nginx-proxy images are available in two flavors.

Debian based version

This image is based on the nginx:mainline image, itself based on the debian slim image.

docker pull nginxproxy/nginx-proxy:1.11

Alpine based version (-alpine suffix)

This image is based on the nginx:alpine image.

docker pull nginxproxy/nginx-proxy:1.11-alpine

Dockergen version (-dockergen suffix)

This image is meant to be used in a separate containers setup with the official nginx image.

docker pull nginxproxy/nginx-proxy:1.11-dockergen

[!IMPORTANT]

A note on latest, alpine and dockergen tags:

It is not recommended to use the latest (nginxproxy/nginx-proxy, nginxproxy/nginx-proxy:latest), alpine (nginxproxy/nginx-proxy:alpine) or dockergen (nginxproxy/nginx-proxy:dockergen) tag for production setups.

Those tags point to the latest commit in the main branch. They do not carry any promise of stability, and using them will probably put your nginx-proxy setup at risk of experiencing uncontrolled updates to non backward compatible versions (or versions with breaking changes). You should always specify the version you want to use explicitly to ensure your setup doesn't break when the image is updated.

Additional documentation

Please check the docs section.

Powered by

GoLand logo PyCharm logo

About this repository

[!NOTE] This repository is officially maintained by ZeroSSL as part of our commitment to secure and reliable SSL/TLS solutions.
We welcome contributions and feedback from the community!
For more information about our services, including free and paid SSL/TLS certificates, visit https://zerossl.com.

ZeroSSL

Related repositories
0voice/interview_internal_reference

2025年最新总结,阿里,腾讯,百度,美团,头条等技术面试题目,以及答案,专家出题人分析汇总。

PythonPyPInetworkredis
37.2k9.4k
NginxProxyManager/nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface

TypeScriptnpmMIT Licensenginxnginx-proxy
nginxproxymanager.com
33.6k3.8k
nginx/nginx

The official NGINX Open Source repository.

CBSD 2-Clause "Simplified" Licensecontent-cacheload-balancer
nginx.org
31.2k8.1k
digitalocean/nginxconfig.io

⚙️ NGINX config generator on steroids 💉

JavaScriptnpmMIT Licensenginxnginx-configuration
do.co/nginxconfig
28.3k2k
mack-a/v2ray-agent

Xray、Tuic、hysteria2、sing-box 八合一一键脚本

ShellGNU Affero General Public License v3.0cloudflarenginx
v2ray-agent.com
21.5k5.5k
allinurl/goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.

CMIT Licensegoaccessc
goaccess.io
20.7k1.2k
kubernetes/ingress-nginx

Ingress NGINX Controller for Kubernetes

GoGo ModulesApache License 2.0ingress-controllerkubernetes
kubernetes.github.io/ingress-nginx/
19.5k8.6k
apache/apisix

The Cloud-Native API Gateway and AI Gateway

LuaApache License 2.0cloud-nativenginx
apisix.apache.org/blog/
16.9k2.9k
caprover/caprover

Scalable PaaS (automated Docker+nginx) - aka Heroku on Steroids

TypeScriptnpmOtherwebserverdocker
caprover.com
15.1k984
trimstray/nginx-admins-handbook

How to improve NGINX performance, security, and other important things.

ShellMIT Licensenginxnginx-proxy
14.2k1.1k
alibaba/tengine

A distribution of Nginx with some advanced features

CBSD 2-Clause "Simplified" Licensetenginenginx
tengine.taobao.org
13.3k2.5k
0voice/expert_readed_books

2021年最新总结,推荐工程师合适读本,计算机科学,软件技术,创业,思想类,数学类,人物传记书籍

redisbooks
12.2k3.5k