GithubHelp home page GithubHelp logo

hartl3y94 / acmephp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acmephp/acmephp

0.0 0.0 0.0 633 KB

Let's Encrypt/ACME Command Line client written in PHP

Home Page: https://acmephp.github.io

License: MIT License

PHP 99.02% Shell 0.52% Dockerfile 0.46%

acmephp's Introduction

Acme PHP

Build Status StyleCI Packagist Version Software License

SymfonyInsight

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.

If you want to chat with us or have questions, ping @tgalopin or @jderusse on the Symfony Slack!

Why should I use Acme PHP when I have an official client?

Acme PHP provides several major improvements over the default clients:

  • Acme PHP comes by nature as a single binary file: a single download and you are ready to start working ;
  • Acme PHP is based on a configuration file instead command line arguments. Thus, the configuration is much more expressive and the same setup is used at every renewal ;
  • Acme PHP is very extensible it to create the certificate files structure you need for your webserver. It brings several default formatters to create classical file structures (nginx, nginx-proxy, haproxy, etc.) but you can very easily create your own if you need to ;
  • Acme PHP follows a strict BC policy preventing errors in your scripts or CRON even if you update it (see the Backward Compatibility policy of Acme PHP for more informations) ;

Documentation

Read the official Acme PHP documentation.

Backward Compatibility policy

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.).

Launch the Test suite

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.sh

Note: 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.

Run command

The run command is an all in one command who works with a domain config file like

contact_email: contact@company
key_type: RSA                                          # RSA or EC (for ECDSA). Default "RSA"

defaults:
  distinguished_name:
      country: FR
      locality: Paris
      organization_name: MyCompany
  solver: http

certificates:
  - domain: example.com
    distinguished_name:
      organization_name: MyCompany Internal
    solver: route53
    subject_alternative_names:
      - '*.example.com'
      - www.subdomain.example.com
    install:
      - action: install_aws_elb
        region: eu-west-1
        loadbalancer: my_elb
  - domain: www.example.com
    solver:
      name: http-file
      adapter: ftp                                     # ftp or sftp or local, see https://flysystem.thephpleague.com/
      root: /var/www/
      host: ftp.example.com
      username: username
      password: password
      # port: 21
      # passive: true
      # ssl: true
      # timeout: 30
      # privateKey: path/to/or/contents/of/privatekey

usage

$ acmephp run path-to-config.yml

Using docker

You 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.yml

acmephp's People

Contributors

alexsoft avatar benjilevens avatar bpolaszek avatar elliotfehr avatar erickpatrick avatar gitter-badger avatar grendel7 avatar jackdpeterson avatar jankal avatar jderusse avatar kirtangajjar avatar miranovy avatar pauladams8 avatar philipsharp avatar piotrantosik avatar remotelyliving avatar rewalexmckinnon avatar riddl avatar rokclimb15 avatar scullwm avatar sh1nto avatar tgalopin avatar tjp85 avatar xiaohuilam 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.