PHPackages                             ko7ta/laravel5.8-lets-encrypt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. ko7ta/laravel5.8-lets-encrypt

ActiveLibrary[Security](/categories/security)

ko7ta/laravel5.8-lets-encrypt
=============================

A Laravel package to easily generate SSL certificates using Let's Encrypt

2.0.1(4y ago)051MITPHPPHP ^7.2|^8.0

Since Oct 1Pushed 4y agoCompare

[ Source](https://github.com/ko7ta/laravel5.8-lets-encrypt)[ Packagist](https://packagist.org/packages/ko7ta/laravel5.8-lets-encrypt)[ Docs](https://github.com/ko7ta/laravel5.8-lets-encrypt)[ RSS](/packages/ko7ta-laravel58-lets-encrypt/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (7)Versions (7)Used By (0)

Let's Encrypt Laravel
=====================

[](#lets-encrypt-laravel)

A Laravel package for easily generating and renewing SSL certificates using Let's Encrypt. This package is especially useful if you have a Laravel application that manages the SSL certificates of many domains. This package is **not** recommended if you just need to generate a single SSL certificate for your application.

This package is essentially a Laravel-friendly wrapper around [Acme PHP](https://github.com/acmephp/acmephp).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ko7ta/laravel-lets-encrypt
```

Publish the configuration file and the migration:

```
php artisan vendor:publish --provider="Daanra\LaravelLetsEncrypt\LetsEncryptServiceProvider" --tag="lets-encrypt"
```

Run the migration:

```
php artisan migrate
```

**Note:**

This package assumes you have created a symbolic link to your storage directory using:

```
php artisan storage:link
```

If you do not want to do this, you have to configure a custom path generator, see the Configuration section below.

Usage
-----

[](#usage)

Creating a new SSL certificate for a specific domain is easy:

```
// Puts several jobs on the queue to handle the communication with the lets-encrypt server
[$certificate, $pendingDispatch] = \Daanra\LaravelLetsEncrypt\Facades\LetsEncrypt::create('mydomain.com');

// You could, for example, chain some jobs to enable a new virtual host
// in Apache and send a notification once the website is available
[$certificate, $pendingDispatch] = \Daanra\LaravelLetsEncrypt\Facades\LetsEncrypt::create('mydomain.com', [
    new CreateNewApacheVirtualHost('mydomain.com'),
    new ReloadApache(),
    new NotifyUserOfNewCertificate(request()->user()),
]);

// You can also do it synchronously:
\Daanra\LaravelLetsEncrypt\Facades\LetsEncrypt::createNow('mydomain.com');
```

You could also achieve the same by using an artisan command:

```
php artisan lets-encrypt:create -d mydomain.com
```

Certificates are stored in the database. You can query them like so:

```
// All certificates
\Daanra\LaravelLetsEncrypt\Models\LetsEncryptCertificate::all();
// All expired certificates
\Daanra\LaravelLetsEncrypt\Models\LetsEncryptCertificate::query()->expired()->get();
// All currently valid certificates
\Daanra\LaravelLetsEncrypt\Models\LetsEncryptCertificate::query()->valid()->get();
// All certificates that should be renewed (because they're more than 60 days old)
\Daanra\LaravelLetsEncrypt\Models\LetsEncryptCertificate::query()->requiresRenewal()->get();

// Find certificate by domain
$certificate = LetsEncryptCertificate::where('domain', 'mydomain.com')->first();
// If you no longer need it, you can soft delete
$certificate->delete();
// Or use a hard delete
$certificate->forceDelete();
```

Certificates are valid for 90 days. Before those 90 days are over, you will want to renew them. To do so, you could add the following to your `App\Console\Kernel`:

```
protected function schedule(Schedule $schedule)
{
    $schedule->job(new \Daanra\LaravelLetsEncrypt\Jobs\RenewExpiringCertificates)->daily();
}
```

This will automatically renew every certificate that is older than 60 days, ensuring that they never expire.

Configuration
-------------

[](#configuration)

By default this package will use Let's Encrypt's staging server to issue certificates. You should set:

```
LETS_ENCRYPT_API_URL=https://acme-v02.api.letsencrypt.org/directory
```

in the `.env` file of your production server.

By default, this package will attempt to validate a certificate using [a HTTP-01 challenge](https://letsencrypt.org/docs/challenge-types/). For this reason, a file will be temporarily stored in your application's storage directory under the path `app/public/.well-known/acme-challenge/`. You can customise this behavior by setting a custom `PathGenerator` class in your config under `path_generator`. Note that Let's Encrypt expects the following path:

```
/.well-known/acme-challenge/
```

to return the contents of the file located at `$pathGenerator->getPath($token)`.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [ko7ta](https://github.com/ko7ta)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 91.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~51 days

Total

6

Last Release

1789d ago

Major Versions

v0.2.2 → v1.0.02021-05-27

v1.0.0 → 2.0.12021-06-18

PHP version history (2 changes)v0.1PHP ^7.2

v0.2.1PHP ^7.2|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/69852995?v=4)[ko7ta](/maintainers/ko7ta)[@ko7ta](https://github.com/ko7ta)

---

Top Contributors

[![Daanra](https://avatars.githubusercontent.com/u/6588838?v=4)](https://github.com/Daanra "Daanra (54 commits)")[![ko7ta](https://avatars.githubusercontent.com/u/69852995?v=4)](https://github.com/ko7ta "ko7ta (5 commits)")

---

Tags

laravelencryptcertificatesslletsko7ta

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ko7ta-laravel58-lets-encrypt/health.svg)

```
[![Health](https://phpackages.com/badges/ko7ta-laravel58-lets-encrypt/health.svg)](https://phpackages.com/packages/ko7ta-laravel58-lets-encrypt)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[daanra/laravel-lets-encrypt

A Laravel package to easily generate SSL certificates using Let's Encrypt

22650.9k](/packages/daanra-laravel-lets-encrypt)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

241641.4k1](/packages/tzsk-otp)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
