Skip to content

Instantly share code, notes, and snippets.

View rkaramandi's full-sized avatar

Rohan Karamandi rkaramandi

View GitHub Profile
@rkaramandi
rkaramandi / nginx-and-certbot-config.md
Last active June 25, 2024 13:23
Running NGINX and CertBot Containers on the Same Host

Running NGINX and CertBot Containers on the Same Host

The Problem

A lot of people run into the problem of running Let's Encrypt's CertBot Tool and an NGINX on the same container host. A big part of this has to do with CertBot needing either port 80 or 443 open for the tool to work as intended. This tends to conflict with NGINX as most people usually use port 80 (HTTP) or 443 (HTTPS) for their reverse proxy. Section 1 outlines how to configure NGINX to get this to work, and Section 2 is the Docker command to run CertBot.

1. NGINX Configuration

I use Docker Compose (docker-compose) for my NGINX server. My docker-compose.yml file looks something like this:

@rkaramandi
rkaramandi / install-kubernetes-flannel-centos7.md
Last active September 23, 2024 18:38
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine
@rkaramandi
rkaramandi / client-certificate-hass-nginx.md
Last active August 28, 2022 09:49
Client Certificate Generation with HomeAssistant and NGINX

Create Client Certificates with NGINX for use with HomeAssistant

0. Prerequisite: Install OpenSSL

Before we start, we want to make sure you have OpenSSL installed. You can check by running the command:

$ openssl version

If that returns you a version, you're good. If not, then install OpenSSL using