This stack runs Nginx Proxy Manager (NPM) for simple TLS reverse proxying and GoAccess for live proxy log charts. Configuration is driven by an environment file you create by renaming env.txt to .env.
- Nginx Proxy Manager
- Publishes ports 80, 81 (admin UI), and 443 on the host
- Persists config and certificates on a named volume
- GoAccess for Nginx Proxy Manager
- Publishes port 7880 (HTML dashboard) on the host
- Reads NPM proxy logs and renders a real‑time report
See port mappings, volumes, and networks in docker-compose.yml.
git clone https://github.com/iamjavadali/nginx-reverse-proxy.git
cd nginx-reverse-proxymv env.txt .env
nano .envMinimum changes in .env:
TZ→ your timezone, e.g.America/New_YorkBASIC_AUTH=Trueto protect the GoAccess dashboard (recommended)BASIC_AUTH_USERNAMEandBASIC_AUTH_PASSWORD→ set your own credentials- Optional tuning:
HTML_REFRESH,KEEP_LAST,PROCESSING_THREADS,DEBUG,SKIP_ARCHIVED_LOGS
Variables are documented in the providedenv.txt.
Note: the GoAccess image documents
BASIC_AUTH,BASIC_AUTH_USERNAME, andBASIC_AUTH_PASSWORDas standard environment variables. If you prefer using a Docker secret file, passBASIC_AUTH_PASSWORD_FILEin your compose; otherwise passBASIC_AUTH_PASSWORD.
docker compose up -dThis launches:
- NPM on host ports 80/443 and the admin UI on 81
- GoAccess on host port 7880
Confirm via the compose port mappings.
Open the admin UI at:
http://<your-host>:81/
Default first‑login credentials (change immediately):
- Email:
admin@example.com - Password:
changeme
You’ll be prompted to update the admin details on first sign‑in. The official setup guide covers adding proxy hosts and enabling free Let’s Encrypt certificates.
Open:
http://<your-host>:7880/
If BASIC_AUTH=True, you’ll be asked for the username/password you set in .env. The GoAccess image reads NPM logs from the mounted volume and renders a live HTML dashboard; see the image README and GoAccess manual for behavior and tuning flags like refresh interval and days kept.
- Ports
- NPM:
80:80,81:81,443:443 - GoAccess:
7880:7880
- NPM:
- Volumes
npm_databound to/data- Let’s Encrypt data mapped at
/etc/letsencrypt - NPM logs mounted read‑only into GoAccess at
/opt/log goaccess_datafor the GoAccess database/output
- Networks
- Both services join the
proxynetwork (anextcloudnetwork may also be defined for separate stacks).
All of the above are defined directly in this compose file.
- Both services join the
The .env file controls GoAccess. The template includes:
# Timezone
TZ=America/New_York
# Log parser behavior
LOG_TYPE=NPM
SKIP_ARCHIVED_LOGS=False
DEBUG=False
HTML_REFRESH=5
KEEP_LAST=30
PROCESSING_THREADS=1
# Dashboard basic auth
BASIC_AUTH=True
BASIC_AUTH_USERNAME=admin
BASIC_AUTH_PASSWORD=Password123$Edit each value to suit your environment before starting the stack.
# Tail logs
docker compose logs -f npm
docker compose logs -f goaccess
# Restart services
docker compose restart npm goaccess
# Stop and remove containers (keeps volumes)
docker compose down- Change the default NPM admin credentials on first login.
- Keep port 81 reachable only to trusted networks; only 80/443 need public exposure for proxying.
- Protect the GoAccess dashboard with basic auth and strong credentials, or restrict by IP.
- Back up the NPM data volume (config and certs) and the GoAccess data volume regularly.
- Nginx Proxy Manager: official setup and first‑login docs.
- GoAccess for NPM image: environment variables and usage.
- GoAccess manual: real‑time HTML report details.