SeoNexus
TRENDING
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • Privacy Policy
No Result
View All Result
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • Privacy Policy
SUBSCRIBE
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • Privacy Policy
No Result
View All Result
SeoNexus
No Result
View All Result

Install Nginx Proxy Manager on Ubuntu Server 22.04

by Team Seonexus.
August 1, 2023
in Tutorials, Webhost, Websites
0
Install Nginx Proxy Manager on Ubuntu Server 22.04
0
SHARES
3.4k
VIEWS
Share on FacebookShare on Twitter

In this tutorial, we will guide you through the process of installing Nginx Proxy Manager on a Virtual Private Server (VPS) operating Ubuntu Server 22.04.

But first, what exactly is Nginx Proxy Manager?

It’s a reverse proxy management system that facilitates the creation of configuration files, the setup of security exceptions, streams, and SSL certificates, all via a user-friendly web interface. This article will help you navigate the installation process of Nginx Proxy Manager on a Docker-powered Ubuntu 22.04 server.

Step 1: Setup the Database and Data Directories

Create the Nginx Proxy Manager directory in a widely accessible location like /opt.

# mkdir /opt/nginxproxymanager

Under the directory, create a new databases subdirectory.

# mkdir /opt/nginxproxymanager/databases

Create a new SQLite database file using the following command.

# mkdir /opt/nginxproxymanager/databases/nginxproxy.db

Exit the SQLite database console.

Ctrl + d

Step 2: Install Nginx Proxy Manager

Create a custom Docker network.

# docker network create nginxproxyman

The Nginx Proxy Manager network allows management and monitoring of attached containers.

Using a text editor, create and edit a docker-compose.yml file in the main /opt/NginxProxy directory.

# nano /opt/nginxproxymanager/docker-compose.yml

Enter the following configurations to the file:

version: "3"
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    container_name: 'nginxproxymanager'
    restart: unless-stopped
    ports:
      - '80:80' 
      - '443:443' 
      - '81:81' 
    environment:
      DB_SQLITE_FILE: "/data/database.sqlite"

    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

networks:
  default:
    external:
      name: nginxproxyman

Nginx Proxy Manager listens on ports 80 and 443 for HTTP and HTTPS traffic, respectively. Port 81 provides access to the web management dashboard. To tighten server security, change the management port to a random combination.

Save and close the file.

Switch to the Nginx Proxy Manager directory.

# cd /opt/nginxproxymanager

Install Nginx Proxy Manager by starting docker-compose in detached mode.

# docker-compose up -d 

Verify that Nginx Proxy Manager is up and running.

# docker ps

The command output should look like the one below:

CONTAINER ID   IMAGE                             COMMAND                  CREATED             STATUS             PORTS                                            NAMES
f3a37d391293   jc21/nginx-proxy-manager:latest   "/init"                  33 minutes ago      Up 33 minutes      0.0.0.0:80-81->80-81/tcp, 0.0.0.0:443->443/tcp   nginxproxymanager

Step 3: Configure Firewall

If you use UFW (enabled by default), allow the following access ports through the server.

Allow HTTP

# ufw allow 80

Allow HTTPS

# ufw allow 443

Allow the Nginx Proxy Manager web management dashboard.

# ufw allow 81

Step 4: Setup Nginx Proxy Manager

Visit your server’s IP address and load the Nginx Proxy Manager web management dashboard on port 81.

http://Server_IP:81

Log in to the management dashboard with the following credentials:

  • USERNAME: admin@example.com
  • PASSWORD: changeme

Change your default username, email address, and password to secure the server.

To proxy and forward requests to a backend application, attach a docker container to the Nginx Proxy Manager network. For example, the following command creates a new ownCloud container attached to the nginxproxy network.

# docker run --network nginxproxyman --name owncloud -d owncloud:latest

Access the Nginx Proxy Manager web dashboard, and navigate to Hosts on the main navigation menu.

Step 5: Setup your domains

Click Add Proxy Host to enter a domain name, choose between HTTP or HTTPS scheme access, set up the target container name in the Forward Name/IP field, and toggle Save to continue.

Nginx Proxy Manager Dashboard

Related

ShareTweetPin

Related Posts

Personal WireGuard VPN Setup: Harnessing the Power of WireGuard

Personal WireGuard VPN Setup: Harnessing the Power of WireGuard

August 27, 2023
How to host your own private cloud storage like Google Drive
Tutorials

How to host your own private cloud storage like Google Drive

April 13, 2023
Host your static website for free on GitHub

Host your static website for free on GitHub

June 22, 2022
How to Change WordPress URLs in MySQL Database from phpMyAdmin

How to Change WordPress URLs in MySQL Database from phpMyAdmin

May 23, 2022
Easiest way to deploy a WordPress website on Web3
WordPress

Easiest way to deploy a WordPress website on Web3

May 18, 2022
Shared Hosting vs VPS Hosting: What one is best for you?

Shared Hosting vs VPS Hosting: What one is best for you?

May 7, 2022
Next Post
Host your static website for free on GitHub

Host your static website for free on GitHub

Leave a Reply Cancel reply

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

  • SEO
  • Tutorials
  • WordPress
  • Contact
  • Privacy Policy

SeoNexus.Tech – Everything web publishing.

No Result
View All Result
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • Privacy Policy