This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
Change http port and offer non-automatic SSL option. #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some users have had issues with automatic SSL cert generation failing. We use certbot/letsencrypt in the "standalone" mode to get certs (https://www.digitalocean.com/community/tutorials/how-to-use-certbot-standalone-mode-to-retrieve-let-s-encrypt-ssl-certificates), which validates the cert by accessing your server on either port 443 or 80.
The ability to use 443 was recently removed due to a security issue: https://community.letsencrypt.org/t/important-what-you-need-to-know-about-tls-sni-validation-issues/50811. Port 80 doesn't work for us either because we are currently exposing the nginx container's port 80 as port 8055 on the host, therefore cert cannot be generated.
Also, some users don't have their server on a publicly accessible domain but would still like to use the docker install.
This PR changes the port for http from 8055 back to 80, which makes certbot/letsencrypt work again (tested on my VPS). The nginx config is already set up to redirect all traffic on 80 to https, except for traffic coming from localhost. I'd still like somebody else to review the nginx config and see if there's any security implication since it's now more likely http will be exposed, but it seemed OK to me.
This PR also provides an option via a switch in docker-compose.yml for providing your own SSL cert in a docker attached volume instead of using automatic cert generation. I also provided an option "none" for no SSL cert which only allows access from localhost but could be useful for evaluation / testing / etc, but I'm undecided on whether that's ultimately useful or should be left out.