Let's Encrypt or ZeroSSL ACME Command Line client written in PHP
Let's Encrypt or ZeroSSL ACME Command Line client written in PHP
Acme PHP is a simple yet very extensible CLI client for Let's Encrypt that will help you get and renew free HTTPS certificates.
Acme PHP is also an initiative to bring a robust, stable and powerful implementation of the ACME protocol in PHP. Using the Acme PHP library and core components, you will be able to deeply integrate the management of your certificates directly in your application (for instance, renew your certificates from your web interface). If you are interested by these features, have a look at the acmephp/core and acmephp/ssl libraries.
Acme PHP is now maintained by https://zerossl.com
Other companies are welcome to contribute to the maintenance of the library. Thanks to:
Acme PHP provides several major improvements over the default clients:
Read the official Acme PHP documentation.
Acme PHP follows a strict BC policy by sticking carefully to semantic versioning. This means your scripts, your CRON tasks and your code will keep working properly even when you update Acme PHP (either the CLI tool or the library), as long as you keep the same major version (1.X.X, 2.X.X, etc.).
The Acme PHP test suite uses the Docker Boulder image to create an ACME server.
To launch the test suite, you need to setup the proper Docker environment for the suite.
Useful scripts are available under the tests directory: in the Acme PHP root directory,
execute the following:
# Create the Docker environment required for the suite
sudo tests/setup.sh
# Run the tests
tests/run.sh
# Clean the docker environment
tests/teardown.shNote: you may have boulder errors sometimes in tests. Simply ignore them and rerun the suite, they are due to an issue in the container DNS.
Warning: as the acmephp/testing-ca Docker image needs to be mapped to the host network, you may have ports conflicts. See https://github.com/acmephp/testing-ca for more informations.
The run command is an all in one command who works with a domain
config file like
…usage
$ acmephp run path-to-config.ymlYou can also use the docker image to generate certificates.
Certificates and keys are stored into the volume /root/.acmephp
docker run --rm -ti -v /cache/.acmephp:/root/.acmephp -v $PWD/.config.yml:/etc/acmephp.yml:ro acmephp/acmephp:latest run /etc/acmephp.ymlNo open issues yet, or sync has not completed.