mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
Let's Encrypt tutorial: use sudo where appropriate
This commit is contained in:
@@ -32,13 +32,13 @@ sudo mkdir -p /var/lib/lego
|
|||||||
Now get a certificate. The HTTP based challenge will be created in a file in `/var/www/sftpgo.com/.well-known/acme-challenge`. This directory must be publicly served by your web server.
|
Now get a certificate. The HTTP based challenge will be created in a file in `/var/www/sftpgo.com/.well-known/acme-challenge`. This directory must be publicly served by your web server.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
lego --accept-tos --path="/var/lib/lego" --email="<you email address here>" --domains="sftpgo.com" --http.webroot="/var/www/sftpgo.com" --http run
|
sudo lego --accept-tos --path="/var/lib/lego" --email="<you email address here>" --domains="sftpgo.com" --http.webroot="/var/www/sftpgo.com" --http run
|
||||||
```
|
```
|
||||||
|
|
||||||
You should be now able to list your certificate.
|
You should be now able to list your certificate.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
lego --path="/var/lib/lego" list
|
sudo lego --path="/var/lib/lego" list
|
||||||
Found the following certs:
|
Found the following certs:
|
||||||
Certificate Name: sftpgo.com
|
Certificate Name: sftpgo.com
|
||||||
Domains: sftpgo.com
|
Domains: sftpgo.com
|
||||||
@@ -49,9 +49,9 @@ Found the following certs:
|
|||||||
Now copy the certificate inside a private path to the SFTPGo service.
|
Now copy the certificate inside a private path to the SFTPGo service.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
mkdir -p /etc/sftpgo/certs
|
sudo mkdir -p /etc/sftpgo/certs
|
||||||
cp /var/lib/lego/certificates/sftpgo.com.{crt,key} /etc/sftpgo/certs
|
sudo cp /var/lib/lego/certificates/sftpgo.com.{crt,key} /etc/sftpgo/certs
|
||||||
chown -R sftpgo:sftpgo /etc/sftpgo/certs
|
sudo chown -R sftpgo:sftpgo /etc/sftpgo/certs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Enable HTTPS for SFTPGo Web UI and REST API
|
## Enable HTTPS for SFTPGo Web UI and REST API
|
||||||
|
|||||||
Reference in New Issue
Block a user