How to Set Up Nginx Proxy Manager on Ubuntu 24: A Step-by-Step Guide

NGINX Proxy Manager on Ubuntu 24: Step-by-Step Setup

Quick Answer: The nginx proxy manager default port configuration utilizes port 81 for the administrative web management UI, port 80 for standard incoming HTTP traffic, and port 443 for encrypted HTTPS traffic. When deploying via Docker on Ubuntu 24.04, ensure host firewall rules permit traffic across ports 80 and 443 publicly while restricting administrative port 81 to trusted internal IP addresses.

Managing reverse proxies for containerized web applications, self-hosted dashboards, and microservices often becomes a maintenance bottleneck when configuring raw NGINX configuration files manually. NGINX Proxy Manager (NPM) solves this by pairing the robust routing capabilities of NGINX with an intuitive, container-based web interface. On modern Linux distributions like Ubuntu 24.04 LTS (Noble Numbat), deploying NPM via Docker Compose delivers an enterprise-grade ingress controller with automated Let’s Encrypt SSL lifecycle management.

NGINX Proxy Manager Default Port Architecture: 80, 81, and 443

Understanding port bindings is critical before exposing services to external traffic. The core nginx proxy manager default port structure encompasses three distinct network channels:

Port Number Protocol Purpose Recommended Exposure
Port 80 HTTP Public web ingress and ACME HTTP-01 challenge validation Public (Internet / Router forwarded)
Port 443 HTTPS Encrypted web traffic with TLS termination Public (Internet / Router forwarded)
Port 81 HTTP (Admin) NPM Web Administration Dashboard Restricted (LAN / Tailscale / WireGuard VPN only)

Security Directive: Never expose port 81 to the open internet. The management panel should only be accessible through local subnet IPs or a secure overlay network like WireGuard or Tailscale.

Docker Compose Deployment Configuration on Ubuntu 24.04 LTS

To deploy NGINX Proxy Manager with an isolated SQLite or MariaDB database backend, establish a structured compose environment:

# compose.yaml for NGINX Proxy Manager
version: '3.8'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'      # Public HTTP Traffic
      - '81:81'      # Admin Web UI
      - '443:443'    # Public HTTPS Traffic
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    environment:
      DISABLE_IPV6: 'true'

On Ubuntu 24.04, execute the deployment with standard Docker commands:

# Update repositories and install Docker
sudo apt update && sudo apt install -y docker.io docker-compose-v2

# Create directory and deploy NPM container
mkdir -p ~/npm && cd ~/npm
nano compose.yaml
docker compose up -d

# Verify container status
docker ps

Once running, access the administrative console by navigating to http://your-server-ip:81. The default initial login credentials are admin@example.com with password changeme. You will be prompted immediately to set a secure administrator email and password.

Configuring SSL Certificates and Let’s Encrypt Wildcard Records

One of the greatest operational strengths of NGINX Proxy Manager is automated certificate lifecycle management:

  1. HTTP-01 Challenge: For single domain records (e.g., app.yourdomain.com), NPM provisions free Let’s Encrypt certificates automatically, automatically renewing them 30 days prior to expiration.
  2. DNS-01 Challenge for Wildcards: For multi-service deployments (e.g., *.yourdomain.com), configure DNS API integration (Cloudflare, DigitalOcean, Route53). This eliminates the need to expose individual internal ports to the internet during certificate generation.
  3. Enforce Strict Transport Security (HSTS): In the SSL tab of each proxy host, toggle Force SSL and HSTS Enabled to prevent man-in-the-middle downgrade attacks.

UFW Firewall Configuration on Ubuntu 24.04

Secure your host operating system using the Uncomplicated Firewall (UFW):

# Allow SSH, HTTP, and HTTPS
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Restrict Admin Port 81 to local subnet only
sudo ufw allow from 192.168.1.0/24 to any port 81 proto tcp

# Enable firewall
sudo ufw enable
sudo ufw status
Make ChrisberGen.Blog a Preferred Source

Get our latest guides, news, and insights highlighted in your Google Search & AI Overviews.

✓ Preferred Source Added

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *