explaingit

steveltn/https-portal

4,688RubyAudience · ops devopsComplexity · 2/5Setup · easy

TLDR

A Docker container that automatically sets up and renews HTTPS certificates for your website using Let's Encrypt, add a few lines to your docker-compose.yml and HTTPS is handled for you.

Mindmap

mindmap
  root((https-portal))
    What it does
      Auto HTTPS setup
      Certificate renewal
      Reverse proxy
    Tech used
      Docker Nginx
      Lets Encrypt
    Use cases
      Single domain HTTPS
      Multi-domain proxy
      Static file serving
    Configuration
      Environment variables
      Domain redirects
      IP restrictions
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add HTTPS to any Docker-based web app by adding a few lines to your docker-compose.yml, no manual certificate setup needed.

USE CASE 2

Put multiple websites behind a single HTTPS-PORTAL instance, each pointing to a different backend service.

USE CASE 3

Redirect www to non-www (or vice versa) without changing your application code at all.

USE CASE 4

Password-protect or IP-restrict any web service without modifying the service itself.

Tech stack

DockerRubyNginxLet's Encrypt

Getting it running

Difficulty · easy Time to first run · 30min

Use Let's Encrypt staging mode during testing to avoid rate limits on real certificate issuance.

In plain English

HTTPS-PORTAL is a Docker container that automatically handles the setup of HTTPS for any website or web application. HTTPS is the secure version of the standard web protocol, and setting it up normally requires obtaining an SSL certificate, configuring a web server, and renewing the certificate before it expires. HTTPS-PORTAL does all of this automatically by connecting to a free certificate service called Let's Encrypt and running the Nginx web server internally. The idea is that instead of configuring HTTPS yourself, you add HTTPS-PORTAL as one container in a Docker Compose file and tell it which domain names to handle. It then sits in front of your application, accepts incoming web traffic on the standard HTTP and HTTPS ports, fetches the certificate, renews it when needed, and forwards requests to your actual application. The whole setup can be added with a few lines of configuration next to your existing app definition. Beyond the basic case, the tool supports several common scenarios. You can redirect one domain to another, for example sending all traffic from the www version of a site to the non-www version. You can put multiple domains behind a single HTTPS-PORTAL instance, each pointing to a different backend service. It also supports serving static files directly, adding password protection to a site, restricting access by IP address, and working with apps that are not running in Docker at all. For testing before going live, there is a local mode that creates a self-signed certificate so you can verify your setup without involving Let's Encrypt. The README recommends using staging mode during testing because Let's Encrypt enforces rate limits on how many real certificates can be issued per domain in a short period. Configuration is done entirely through environment variables in the Docker Compose file, and the Nginx configuration templates can be overridden if the defaults do not fit your needs. There is a note in the README warning against the automatic container discovery feature, which requires giving the container access to the Docker socket, because doing so grants it elevated privileges on the host system.

Copy-paste prompts

Prompt 1
Show me how to add https-portal to my existing docker-compose.yml to enable HTTPS for my web app at example.com.
Prompt 2
I have two services in Docker Compose and want both to use HTTPS with different domains, how do I configure https-portal for this?
Prompt 3
How do I set up https-portal in staging mode to test my HTTPS config before going live so I don't hit Let's Encrypt rate limits?
Prompt 4
How do I redirect all www.example.com traffic to example.com using https-portal?
Prompt 5
How do I override the default Nginx config templates in https-portal to add a custom response header?
Open on GitHub → Explain another repo

← steveltn on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.