Skip to content

Docker usage

sineverba edited this page Feb 22, 2021 · 10 revisions

Pull from Docker Hub

$ docker pull sineverba/cfhookbash:latest

Make a first run, it will auto-register and will create the correct directories and files:

$ docker run -it --rm -v $(pwd)/data:/app/dehydrated --name cfhookbash sineverba/cfhookbash:latest

Edit necessary files

  • data/config
  • data/config.sh
  • data/domains.txt

Rerun it:

$ docker run -it --rm -v $(pwd)/data:/app/dehydrated --name cfhookbash sineverba/cfhookbash:latest

How to force renew

Pass the ENV VAR FORCE_RENEW=TRUE (caps lock for TRUE)

$ docker run -it --rm -v $(pwd)/data:/app/dehydrated -e FORCE_RENEW=TRUE --name cfhookbash sineverba/cfhookbash:latest

Migrating from stage version of Let's Encrypt to live version

If you launch docker with stage url, removing it LE blocks you, requesting to re-register. Simply delete the data/accounts folder and relaunch (2 times) the docker.

Crontab usage

Every monday, at 4AM

0 4 * * 1 docker run --rm -v /home/<USER>/cfhookbash/data:/app/dehydrated sineverba/cfhookbash:latest >> /home/<USER>/cfhookbash/log-cron-`date +\%Y-\%m-\%d-\%H-\%M-\%S`.log 2>&1
Clone this wiki locally