nginx

1.30.6-r0-ls381

nginx is an HTTP web server, reverse proxy, content cache, load balancer, TCP/UDP proxy server, and mail proxy server.

docker pull lscr.io/linuxserver/nginx:latest

Quick start

Generated from the image's own configuration. Replace the /path/to folders with real paths on your host.

---
services:
  nginx:
    image: lscr.io/linuxserver/nginx:latest
    container_name: nginx
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - NGINX_AUTORELOAD= # optional
      - NGINX_AUTORELOAD_WATCHLIST= # optional
    volumes:
      - /path/to/nginx/config:/config
    ports:
      - 80:80
      - 443:443
    restart: unless-stopped

Parameters

Ports
PortFunctionRequired
80:80httprequired
443:443httpsrequired
Environment variables
VariableFunctionRequired
PUID=1000User IDrequired
PGID=1000Group IDrequired
TZ=Etc/UTCTimezonerequired
NGINX_AUTORELOAD=Set to `true` to enable automatic reloading of confs on change without stopping/restarting nginx. Your filesystem must support inotify. This functionality was previously offered [via mod](https://github.com/linuxserver/docker-mods/tree/swag-auto-reload).optional
NGINX_AUTORELOAD_WATCHLIST=A [pipe](https://en.wikipedia.org/wiki/Vertical_bar)-separated list of additional folders for auto reload to watch in addition to `/config/nginx`optional
Volumes
PathFunctionRequired
/configPersistent config filesrequired

Architectures

Pulling :latest picks the right one for your host automatically.

  • x86_64amd64-latest
  • arm64arm64v8-latest

Tags

  • :latestStable releases

Changelog

  1. Rebase to Alpine 3.24 with PHP 8.5.

  2. Fixed auto-reload functionality.

  3. Rebase to Alpine 3.22 with PHP 8.4. Add [Auto Reload](https://github.com/linuxserver/docker-mods/tree/swag-auto-reload) functionality. Drop PHP bindings for mcrypt as it is no longer maintained.

Writing

Posts about nginx

2 min read

Introducing SWAG Dashboard

SWAG Dashboard is a mod powered by GoAccess that provides a comprehensive overview of SWAG's operation. Follow latest the instructions on the mod's readme to set it up. Navigate…

Related

Browse all

swag

5.8.0-ls494

SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.

616K pulls per month3.7K GitHub starsarm64