A Step-by-Step Guide to Setting Up Nginx Proxy Manager
In the world of web hosting and server management, Nginx stands out as a powerful and efficient web server solution. Nginx Proxy Manager takes this a step further by providing a user-friendly interface to manage Nginx as a reverse proxy. In this guide, we’ll walk through the steps to set up Nginx Proxy Manager and leverage its capabilities to manage your web traffic effectively.
Understanding Nginx Proxy Manager
Nginx Proxy Manager simplifies the process of configuring Nginx as a reverse proxy server. It allows you to manage multiple domains, subdomains, and services, all through an intuitive web interface. With Nginx Proxy Manager, you can easily route incoming traffic to the appropriate backend services, such as web servers, Docker containers, or other applications running on your server.
Prerequisites
Before diving into the installation process, ensure that you have the following prerequisites:
- Server: You’ll need a server running a Linux distribution such as Ubuntu or Debian. If you don’t already have one, you can get a VPS instance for as low as 1$/mo. Click here to signup
- Domain Name: Have a domain name configured and pointing to your server’s IP address.
- Docker: Install Docker on your server to run Nginx Proxy Manager in a containerized environment.
Installation Steps
Follow these steps to set up Nginx Proxy Manager on your server:
1. Install Docker
If Docker is not already installed on your server, you can install it by running the following commands:
sudo apt update
sudo apt install docker.io
2. Install Docker Compose
Docker Compose simplifies the process of managing Docker containers. Install Docker Compose using the following commands:
sudo apt install docker-compose
3. Create a Nginx Proxy Manager directory
Before we get to the setup part, lets first create a new directory named nginx-proxy-manager
mkdir nginx-proxy-manager
4. Navigate to the Directory
Change your working directory to the active one:
cd nginx-proxy-manager
5. Create a docker-compose.yml file
We will be running the setup via docker compose file, this way you can modify things if you want, like editing what port admin instance will run at. We recommend not to change the ports as there are chances you may forget what port you used for setup but if you wish to make that change, you are free to do it.
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format <host-port>:<container-port>
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
# Uncomment the next line if you uncomment anything in the section
# environment:
# Uncomment this if you want to change the location of
# the SQLite DB file within the container
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
You can modify this line and change ’81:81′ # Admin Web Port to whatever port you want and is available. Just make sure you change the first half XX:81 else Web GUI will not load.
6. Start Nginx Proxy Manager
sudo docker-compose up -d
7. Access the Web Interface
Once the containers are up and running, you can access the Nginx Proxy Manager web interface by navigating to http://your-domain.com:81. Log in with the default credentials ([email protected] / changeme) and change the password immediately.
Configuring Proxy Hosts
With Nginx Proxy Manager, you can easily configure proxy hosts to route traffic to backend services. Follow these steps to add a new proxy host:
- Login: Log in to the Nginx Proxy Manager web interface.
- Add Proxy Host: Click on the “Proxy Hosts” tab and then click “Add Proxy Host.”
- Enter Details: Enter the domain name, scheme (HTTP or HTTPS), and the IP address and port of the backend service.
- SSL Configuration: Configure SSL settings if required, including SSL certificates and advanced options.
- Save Changes: Click “Save” to create the proxy host.
Conclusion
Nginx Proxy Manager simplifies the process of managing Nginx as a reverse proxy, allowing you to efficiently route traffic to backend services. By following this guide, you can set up Nginx Proxy Manager on your server and start managing your web traffic with ease. Experiment with its features to optimize performance and security for your applications and websites.
At Kyra Web Studio, we’re passionate about helping businesses build a strong brand identity that drives growth and success. Our team of experts specializes in website design, ecommerce solutions, real estate design, web overhaul, responsive design, custom development, UI/UX design, paid advertising, branding, SEO, social media, content marketing, email marketing, hosting, maintenance, security, CMS implementation, backup & recovery, domain management, performance optimization, and website accessibility. Let us help you create a brand that stands out in the crowd and resonates with your target audience. Contact us today to learn more about our services and how we can help you achieve your business goals.


