Keegan Turner
  • πŸ‘‹Hello World.
  • πŸ“šHow-To Guides
    • Integrating Git on your local host
    • βš–οΈLoad Balancing with HAProxy
    • πŸ‘¨β€πŸ’»Code Server - Self Hosted VSCode alternative
    • πŸ•ΈοΈWordPress + LAMP - Self Hosted CMS
    • ☁️Nextcloud - Self Hosted file sync & sharing solution
    • ⏳Grafana Cloud - Cloud Hosted Monitoring
    • βŒ›Prometheus + Grafana - Self Hosted monitoring stack solution
    • πŸ›³οΈPortainer + Docker - Self Hosted container management UI
    • 🐬MariaDB - Self Hosted database server
    • πŸ€–Let's Encrypt + Certbot - Secure your web services with SSL certificates
    • ◀️Nginx Proxy Manager - Self Hosted domain controller with LE SSL certificates
    • πŸ–₯️LXD - Linux OS containers
    • 🐧Linux basics: commands
    • 🐧Linux basics: file paths
    • 🐧Linux basics: SWAP file
  • 🚫Bytes of Caution
Powered by GitBook
On this page
  1. How-To Guides

Nginx Proxy Manager - Self Hosted domain controller with LE SSL certificates

2024-05-14

Nginx proxy is a powerful tool used to manage and route web traffic efficiently. By acting as a middleman between clients and servers, it enables tasks like load balancing, caching, and enhancing security.

Step 1

Prepare your environment.

My stack is as follows:

  • Cloudflare for DNS management

  • xneelo Cloud for my Ubuntu server

  • Docker & Portainer for containerization

Connect to your Linux server or instance via SSH and update the system

sudo apt update -y && sudo apt upgrade -y 

Once the system updates have completed, install Docker & Docker compose

sudo apt install docker.io docker-compose

Create and change directory into a new folder for the docker compose files

sudo mkdir nginx
cd nginx/

Create the docker compose file and add the NGINX container configuration

sudo nano docker-compose.yaml

add the code and save the file

version: '3.8'
services:
  app:
    image: 'docker.io/jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

Run the docker compose command in the same directory:

sudo docker-compose up -d

The container will start to create from the YAML file.

Ensure that port 81 is open for access on your network firewall. You can access the Nginx proxy manager by entering http://yourserverip:81. At this stage, I already have my domain name set to point to the server IP in Cloudflare where I manage my DNS.

Upon first login, use the following credentials:

Email:    admin@example.com
Password: changeme

Under proxy hosts, you can add the subdomains with the server IP and port number. When a request to access the added URL is received, the proxy will send the request to the respective port on your network.

PreviousLet's Encrypt + Certbot - Secure your web services with SSL certificatesNextLXD - Linux OS containers

Last updated 1 year ago

πŸ“š
◀️
Page cover image