aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
blob: bb6daa4d48cfa4c75b26eb30e71a8071c4d45433 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# lets-ca.sh

## Installation

Start off by making a letsencrypt-user and group.

```bash
$ sudo groupadd -r letsencrypt
$ sudo useradd -d /etc/letsencrypt -m -r -g letsencrypt letsencrypt
```
You now have a directory named `/etc/letsencrypt/`, where all letsencrypt-files will go.


Now we need to get the actual files needed, and we need to place them somewhere.

```bash
$ cd /usr/local/lib
$ sudo git clone https://github.com/diafygi/acme-tiny.git
$ sudo git clone https://github.com/dennisse/lets-ca.sh.git
$ cd /usr/local/sbin
$ sudo ln -s /usr/local/lib/acme-tiny/acme_tiny.py .
$ sudo ln -s /usr/local/lib/lets-ca.sh/lets-ca.sh .
```


If you want your certificates to be automatically resigned, you might want to add the cron-file as well.

```bash
$ cd /etc/cron.weekly
$ sudo ln -s /usr/local/lib/lets-ca.sh/lets-ca.sh-cron lets-ca-cron
```


Now we need to create an account-key for letsencrypt, and the challenge-dir.

```bash
$ cd /etc/letsencrypt
$ sudo openssl genrsa 4096 > account.key
$ sudo chmod 400 account.key
$ chown letsencrypt:letsencrypt account.key
$ mkdir -p /var/www/letsencrypt-challenges
$ chown letsencrypt:letsencrypt /var/www/letsencrypt-challenges
```


Now you need a good openssl.cnf in /etc/letsencrypt. Go make it.

And, lastly, we need the cross-signed cert from letsencrypt.

```bash
$ cd /etc/ssl
$ wget https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem
```