Giter Club home page Giter Club logo

easywildcard's Introduction

Easywildcard - Easy wildcard certs from Let's Encrypt

This extension of certbot is intended to be a docker container that makes it easy for anyone to get a wildcard SSL certificate. The way it works is:

  • You set up some basic DNS entries to point to the server you will run Easywildcard on (can be a dynamic IP)
  • You forward port 53 to the server you will run Easywildcard on (Easywildcard will only be listening for the short period of time it is running)
  • Easywildcard fires up certbot and bind to handle the requests

Setting up your DNS

This assumes:

  • Your domain is example.com
  • The host you run Easywildcard on is mydynamichost.anyplace.com
  • mydynamichost.example.com uses Dynamic DNS to stay updated

To get things going, create the following DNS records:

  • acme-dns.example.com that is a CNAME to mydymanichost.anyplace.com (or an A record to a static IP)
  • acme-challenge.example.com that is an NS type with an answer of acme-dns.example.com
  • _acme-challenge.example.com that is a CNAME to acme-challenge.example.com

That's it!

Setting up the machine to run Easywildcard

  • Make sure your Dynamic DNS provider is set up so your IP always has a static hostname (or use a provider with a static IP)
  • Make sure you forward port 53 externally to port 5053 on the local machine (or whatever port is specified below)

Usage

Until this is live on the HUB and documentation is complete, clone and then:

docker build --tag easywildcard .
DOMAIN="example.com"
EMAIL="[email protected]"
PORT=5053
mkdir -p /tmp/letsencrypt

Then, to get a new cert:

docker run -p ${PORT}:53/tcp -p ${PORT}:53/udp -v /tmp/letsencrypt/:/etc/letsencrypt --rm -i -e "EMAIL=${EMAIL}" -e "DOMAIN=${DOMAIN}" easywildcard

You can run the above for as many domains as you need SSL certs for.

From then out, to renew, you can do the following in cron:

  docker run -p ${PORT}:53/tcp -p ${PORT}:53/udp -v /tmp/letsencrypt/:/etc/letsencrypt --rm -i -e "RENEW=1" easywildcard

You can add certs at any time using the first command. Renew will just pick them up

Optional variables

STAGING=1 # To use staging servers
SERVER=<server> # To use a specific ACME server

easywildcard's People

Contributors

fmstrat avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.