WATCH THE VIDEO
youtube.com/@123compose

What you need

  • A server or machine running Linux
  • Docker and Docker Compose installed
  • Ports 80 and 443 open on your firewall
  • A domain name (optional but recommended for SSL)

The compose file

Create a folder, drop this file in it as docker-compose.yml, and you're halfway there.

docker-compose.yml yaml
# nginx-proxy-manager/docker-compose.yml

services:

  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'      # Public HTTP
      - '81:81'      # Admin dashboard
      - '443:443'    # Public HTTPS
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - db

  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: 'changeme'
      MYSQL_DATABASE:      'npm'
      MYSQL_USER:         'npm'
      MYSQL_PASSWORD:     'changeme'
    volumes:
      - ./mysql:/var/lib/mysql
⚠ CHANGE THIS

Replace both changeme values with real passwords before running this in production.

Steps

01
Create the project folder
Make a directory and navigate into it.
mkdir nginx-proxy-manager && cd nginx-proxy-manager
02
Create the compose file
Paste the compose file above into a file named docker-compose.yml.
03
Run it
One command. That's it.
docker compose up -d
04
Open the dashboard
Go to http://your-server-ip:81 in your browser. Log in with the default credentials below, then change them immediately.
Email:    admin@example.com
Password: changeme
✔ THAT'S IT

You now have a full reverse proxy with a web UI. Go to Proxy Hosts → Add Proxy Host to start routing your domains. SSL certs from Let's Encrypt are one checkbox away.

Useful commands

terminal bash
# Check container status
docker compose ps

# View logs
docker compose logs -f app

# Stop everything
docker compose down

# Update to latest image
docker compose pull && docker compose up -d