How to setup the Nginx Proxy Manager Docker example

How to configure the Nginx Reverse Proxy Manager

To setup, configure and install the Docker-based, Nginx Proxy Manager so you can mange reverse proxy servers, streams and redirection hosts, follow these steps:

  1. Ensure Docker and docker-compose are installed
  2. Create a docker-compose file to configure the Nginx Proxy Manager image
  3. Run docker-compose up to download, install and start the Nginx Proxy Manager
  4. Login to the Nginx Proxy Manager’s web interface
  5. Create a Proxy Host and point a domain name to a backend server
  6. Optionally configure custom Nginx locations and sub-folder forwarding
  7. Access your backend resources through the reverse proxy servers the Nginx Proxy Manager has configured

Simple Nginx Proxy Manager docker-compose file

The Nginx Proxy Manager can be configured to store its data internally inside the container in which it runs, or it can be configured to externalize config data on the file system or in a relational or NoSQL database.

All of those configurations make sense for an enterprise deployment, but for this Nginx Proxy Manager tutorial, we will use the simplest configuration possible and allow all of the config data to be maintained inside the Nginx Proxy Manager’s Docker container.

The simplest docker-compose file to setup an Nginx Proxy Manager Docker container is as follows:

version: '3'
services:
  app: 
    image: 'jc21/nginx-proxy-manager:latest'
    container_name: nginx-proxy-manager
    ports:
      - '80:80'
      - '81:81'
      - '443:443'

How to run the Nginx Proxy Manager Docker image

With the docker-compose file edited and saved, the following command will download and install the Nginx Proxy Manager and start the service in a Docker container:

docker compose up
Docker container nginx proxy manager created
Setup of nginx proxy manager configuration complete
Reloading nginx reverse proxy manager config

When the Nginx Proxy Manager setup is complete, the administrative console will be accessible on port 81 of the localhost address.

What is the default Nginx Proxy Manager login and password?

When the Nginx Proxy Manager first starts, log in with the following username and password:

  • Default Proxy Manager username: [email protected]
  • Default Proxy Manager password: changeme

The default Nginx Proxy manager username and password can only be used once. When you log in, you will be asked to update and change your credentials.

How to setup a reverse proxy with the Proxy Manager

To setup a reverse proxy with the Nginx Proxy Manager, simply click on the ‘Proxy Hosts’ link on the admin console’s dashboard and click the ‘Add Proxy Hosts’ button.

nginx reverse proxy manager

Simply fill out the Proxy Host input form to configure a reverse proxy with the Nginx Proxy Manager.

In the ‘Edit Proxy Host’ form that appears, simply fill out the domain name associated with the reverse proxy request, the IP address and the port number of the backend server to handle the request and click ‘Save.’

As soon as the save button is clicked, the Nginx Proxy Manager activates the reverse proxy.

Nginx Proxy Manager custom location settings

The Nginx Proxy Manager also allows for custom locations to be easily configured.

For example, sub-folder forwarding can be easily setup by mapping a location’s subfolder to a path on the backend server.

nginx proxy manager location

The Nginx Proxy Manager simplifies complex tasks like reverse proxy folder forwarding.

Simple Nginx Proxy Manager Tutorial

This Nginx Proxy Manager tutorial shows you the easiest way to get up and running with the Proxy Manager, along with the steps to take to quickly setup Nginx as a reverse proxy. However, the features demonstrated here are merely a small subset of the Nginx Proxy Manager’s capabilities.

Nginx Proxy Manager features

Other Nginx Proxy Manager features include:

  • Virtual host management
  • Ability to cache assets
  • Blocking of common exploits
  • Websocket support
  • Access list configuration
  • SSL and HTTP/2 support
  • Host redirection with HTTP code configuration
  • TCP and UDP stream support
  • User management
  • Nginx Proxy Manager log auditing

Nginx is an extremely powerful web server and reverse proxy. The Nginx Proxy Manager is full-featured tool that helps to lower the barriers to entry for users who are interested in learning and working with the Nginx server.

 

SearchAppArchitecture
SearchSoftwareQuality
SearchCloudComputing
SearchSecurity
SearchAWS
Close