BSD Ports

security/lego 4.22.2_2 DragonFly

Let's Encrypt client and ACME library written in Go

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
MIT
Categories
security
Package size
16241.7 KiB, 103212.4 KiB installed

Description

lego is a client for Let's Encrypt users, written in Go. It has support for a number of ACME challenges, and no external dependencies.

In the other systems

SystemPortVersion
DragonFlysecurity/lego4.22.2_2
FreeBSDsecurity/lego5.5.2_2
OpenBSDsecurity/lego4.35.2

Install

Binary package:

pkg install lego

From DPorts:

cd /usr/dports/security/lego && make install clean

Dependencies

Run dependencies 1

No port depends on this one.

Configuration

No options to configure.

Service scripts
none

Message after installing

There are sample scripts in
    /usr/local/etc/lego
that you can use for renewing and deploying certificates.

In order to run the script regularly to update the certificates add this line
to /etc/periodic.conf:

    weekly_lego_enable="YES"

Additionally the following parameters may be added to /etc/periodic.conf:

Script to run to renew certificates, will be run as _lego (required)
    weekly_lego_renewscript="/usr/local/etc/lego/lego.sh"

To run a script after the renewal to deploy certificates
    weekly_lego_deployscript="/usr/local/etc/lego/deploy.sh"

Note that the deploy script is provided as a sample and may need to be modified
for your environment. The script will attempt to deploy certificates to
    /usr/local/etc/lego/ssl/certs
and private keys to
    /usr/local/etc/lego/ssl/private.
The script also tries to restart nginx.

If using the sample renew script, add the domains for which lego will manage
certificates to
    /usr/local/etc/lego/domains.txt, one domain on each line.

To add a Subject Alternate Name to the certificate, append the domain(s) to the
line:
    example.com www.example.com

To run lego for the first time, edit
    /usr/local/etc/lego/lego.sh
and set the EMAIL variable.

Then run lego.sh with the run argument as the _lego user:
    $ /usr/local/etc/lego/lego.sh run

Subsequent periodic runs will run with the renew argument by default, with a
renewal interval of 30 days.