Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uriegel/letsencrypt-cert
Support for LetsEncrypt in 'UwebServer'
https://github.com/uriegel/letsencrypt-cert
Last synced: 8 days ago
JSON representation
Support for LetsEncrypt in 'UwebServer'
- Host: GitHub
- URL: https://github.com/uriegel/letsencrypt-cert
- Owner: uriegel
- License: mit
- Created: 2020-03-13T10:58:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T06:33:13.000Z (8 months ago)
- Last Synced: 2024-05-28T13:52:48.681Z (6 months ago)
- Language: C#
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UwebServerCert
LetsEncrypt bot to automatically create an LetsEncrypt certificate for a Web Server## Installation
```
dotnet tool install LetsencryptCert --global
```## Executing the tool for the first time
Copy ```cert.json``` to current directory with following content:
```
{
"account": "",
"domains": [
"", "", ""
],
"data": {
"CountryName": "",
"State": "",
"Organization": "",
"OrganizationUnit": "",
"CommonName": ""
}
}```
```
LetsencryptCert -create
```
This lets LetsencryptCert create an account.Create a file ```letsencrypt-uweb``` in ```/etc``` (Linux) or ```c:\program data\letsencrypt-uweb``` (Windows). This text file should contain a password for the to be created pfx certificate.
## Obtaining certificate (test mode)
After executing the tool for the first time and having created an account, you can obtain a certificate from LetsEncrypt by running the tool:```
LetsencryptCert
```Your webserver has to serve the token to LetsEncrypt.
## Obtaining certificate
To get a secure certificate, you have to set the command line argument ```-prod```:
```
LetsencryptCert -create -prod
LetsencryptCert -prod
```## Executing tool every day (Linux)
```
crontab -e
```Append
```
PATH=$PATH:/home/pi/.dotnet/tools
DOTNET_ROOT=/home/pi/.dotnet
0 4 * * * LetsencryptCert > /home/pi/logs/LetsencryptCert.log 2>&1
```This executes dns update every day at 4 AM (universal time). Last log is saved in ```/home/pi/logs/LetsencryptCert.log```