Skip to content

Docker usage

sineverba edited this page Feb 20, 2022 · 10 revisions

Pull from Docker Hub (you really don't need to use latest but you must use a specific version. This is the better method to work with Docker image)

$ docker pull sineverba/cfhookbash

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 required 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

$ sudo crontab -e

Every monday, at 01:12

12 1 * * 1 docker run --rm -v /home/sineverba/cfhookbash/data:/app/dehydrated sineverba/cfhookbash:latest >> /home/sineverba/cfhookbash-log-cron-`date +\%Y-\%m-\%d-\%H-\%M-\%S`.log 2>&1

Issue with Raspberry and Alpine version

If you have issues with Alpine version on Raspberry, try this:

$ wget https://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
$ sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
$ rm libseccomp2_2.5.1-1_armhf.deb