An open API service indexing awesome lists of open source software.

https://github.com/pkg6/elego

Use the simplest Lego to generate SSL
https://github.com/pkg6/elego

Last synced: 2 months ago
JSON representation

Use the simplest Lego to generate SSL

Awesome Lists containing this project

README

        

# elego
Use the simplest Lego to generate SSL

# Install(go1.22.12 )

~~~
go install github.com/pkg6/elego/.cli/elego@latest
~~~

## Install pkg (go1.22.12 )

~~~
go get github.com/pkg6/elego
~~~

# Install(compressed file)

~~~
curl -sSL https://raw.githubusercontent.com/pkg6/elego/main/install.sh | bash
or
curl -sSL https://cdn.jsdelivr.net/gh/pkg6/elego@main/install.sh | bash
~~~

# Help

~~~
# ./elego --help
Usage of elego:
-cache string
When creating, a cache file will be generated and the path needs to be saved (default "/root/.elego")
-cadirurl string
Which supplier will we issue the certificate from (default "letsencrypt")
-deploy string
Where do you want to deploy your certificate (default "local")
-dns string
Enter your DNS name, please refer to https://go-acme.github.io/lego/dns/index.html
-domain string
Need to generate SSL domain names
-email string
email (default "[email protected]")
-force
Should a new certificate be forcibly generated
-path string
Path for saving certificates (default "/etc/nginx/ssl/")
-webroot string
Directory for domain deployment

~~~

# use webroot

~~~
elego --domain="test.example.com" --webroot="/data/wwwroot/test.example.com" --path="/etc/nginx/ssl/"
~~~

# use dns
> https://go-acme.github.io/lego/dns/index.html
~~~
export [email protected]
export CLOUDFLARE_API_KEY=b9841238feb177a84330febba8a83208921177bffe733
elego --domain="test.example.com" --dns="cloudflare" --path="/etc/nginx/ssl/"
~~~