---
title: "Installation — Certificates for Laravel | Roundly"
description: "Install via Composer, publish and run the registry migrations, pick a driver and optionally publish the config and translations."
url: https://roundly-consulting.com/open-source/docs/certificates-for-laravel/installation
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Certificates for Laravel](https://roundly-consulting.com/open-source/docs/certificates-for-laravel.md)

# Installation

Require the package, then publish and run the migrations. The service provider and the Certificates facade alias are auto-discovered — no manual registration:

```bash
composer require roundly-consulting/certificates-for-laravel

php artisan vendor:publish --tag="certificates-migrations"
php artisan migrate
```

The migrations are publish-only — the service provider never loads them, so a bare php artisan migrate creates nothing until you publish. They land in database/migrations as timestamped files you own: create\_certificates\_table, then add\_domains\_to\_certificates\_table. Republishing overwrites them in place instead of duplicating them.

The registry is recommended rather than required. Without the table the package still provisions certificates through the provider API (exists(), get(), generate()), but records nothing and cannot track expiry — find() and status() return null.

## Pick a driver

The default driver is kubernetes, where cert-manager issues in the background and a scheduled certificates:sync records the outcome (see Kubernetes & cert-manager). For Let’s Encrypt from a single server, switch to acme and give the CA a contact address, then issue:

```bash
CERTIFICATES_DRIVER=acme
CERTIFICATES_ACME_CONTACT=ops@example.com
```

```php
use RoundlyConsulting\Certificates\Facades\Certificates;

$certificate = Certificates::issueIfMissing('app.example.com');
```

## Optional publishing

The config and translations are optional — every config key is env-backed. Publish them only to override:

```bash
php artisan vendor:publish --tag="certificates-config"
php artisan vendor:publish --tag="certificates-translations"
```

The three publish tags are certificates-migrations, certificates-config and certificates-translations.

The translatable lines — exception and validation messages, console output, alert results — ship in English and Slovak under the certificates::messages namespace, and Laravel picks the one matching the app locale. Publish the translations only to override a line or add a language. The count lines (commands.pruned, commands.synced, alerts.ok / warning / critical and alerts.registry\_failed) are rendered with trans\_choice(): English uses singular|plural, Slovak {0} …|{1} …|\[2,4\] …|\[5,\*\] …. An override may keep a single line without | — it is rendered as is.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/certificates-for-laravel.md)
