First you may install acme.sh via a simple command:
Code: Select all
curl -k https://get.acme.sh | sh
Code: Select all
cd ~/.acme.sh
./acme.sh --set-default-ca --server letsencrypt
./acme.sh --issue -d demo.wftpserver.com -w /opt/wftpserver/webclient
All the signed certs will be placed in "~/.acme.sh/demo.wftpserver.com_ecc/".
In WingFTP's administration, you may add an SSL cert configuration under "Server > Settings > SSL Certificate Manager", choose "fullchain.cer" as the certificate, and choose "demo.wftpserver.com.key" as the private key:
![Image](https://www.wftpserver.com/bbsres/lets_encrypt1.png)
You also need to select this new cert under "Domain > Settings > General Settings > Miscellaneous > SSL Certificate":
![Image](https://www.wftpserver.com/bbsres/lets_encrypt2.png)
WingFTP will cache the SSL context, so you need to reload the SSL context after renewing the cert. You can add a daily task under "Server > Task Scheduler" and input the below lua script:
Code: Select all
c_SetAdminOptionStr(ADMIN_OPTION_SSL_NAME_STR, c_GetAdminOptionStr(ADMIN_OPTION_SSL_NAME_STR))
for _,domain in pairs(c_GetDomainList()) do
c_SetOptionInt(domain, DOPTION_TLS_SESSION_TIMEOUT, 3600+(c_GetRandom()%100))
end
![Image](https://www.wftpserver.com/bbsres/lets_encrypt3.png)
For the Windows system, you need a Cygwin environment. If you do not have Cygwin, maybe you can install Git and run all the above commands in Git Bash: https://git-scm.com/
Linux system has a daily cron job to check and renew the certs if needed, but in Windows Git Bash, cron is not included by default, so you need to schedule a task to renew the SSL cert every 30 days, just execute the following command to schedule a task:
Code: Select all
schtasks /create /tn "Renew SSL cert" /tr "'C:/Program Files/Git/bin/sh.exe' --login -i -c 'C:/Users/xxx/.acme.sh/acme.sh --renew -d demo.wftpserver.com --force --ecc'" /sc daily /mo 30 /it