You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2021. It is now read-only.
[Letsencrypt](https://letsencrypt.org/) sets up an Nginx webserver and reverse proxy with php support and a built-in letsencrypt client that automates free SSL server certificate generation and renewal processes. It also contains fail2ban for intrusion prevention.
38
+
## IMPORTANT NOTICE - BREAKING CHANGES AHEAD
39
+
_Due to a trademark related request, this image will move to a new repo soon. The image name and address will be changed. We are working on making the transition as smooth as possible so as not to break current implementations used in production. But be warned that there will be breaking changes ahead, which will require user intervention. Check back here frequently for more updates. Apologies for the the disruption._
**SWAG - Secure Web-server And Gateway** (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes. It also contains fail2ban for intrusion prevention.
@@ -62,7 +65,7 @@ Here are some example snippets to help you get started creating a container.
62
65
63
66
```
64
67
docker create \
65
-
--name=letsencrypt \
68
+
--name=swag \
66
69
--cap-add=NET_ADMIN \
67
70
-e PUID=1000 \
68
71
-e PGID=1000 \
@@ -93,9 +96,9 @@ Compatible with docker-compose v2 schemas.
93
96
---
94
97
version: "2.1"
95
98
services:
96
-
letsencrypt:
99
+
swag:
97
100
image: linuxserver/letsencrypt
98
-
container_name: letsencrypt
101
+
container_name: swag
99
102
cap_add:
100
103
- NET_ADMIN
101
104
environment:
@@ -133,7 +136,7 @@ Container images are configured using parameters passed at runtime (such as thos
133
136
|`-e TZ=Europe/London`| Specify a timezone to use EG Europe/London. |
134
137
|`-e URL=yourdomain.url`| Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns). |
135
138
|`-e SUBDOMAINS=www,`| Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only) |
136
-
|`-e VALIDATION=http`|Letsencrypt validation method to use, options are `http`, `dns` or `duckdns` (`dns` method also requires `DNSPLUGIN` variable set) (`duckdns` method requires `DUCKDNSTOKEN` variable set, and the `SUBDOMAINS` variable must be either empty or set to `wildcard`). |
139
+
|`-e VALIDATION=http`|Certbot validation method to use, options are `http`, `dns` or `duckdns` (`dns` method also requires `DNSPLUGIN` variable set) (`duckdns` method requires `DUCKDNSTOKEN` variable set, and the `SUBDOMAINS` variable must be either empty or set to `wildcard`). |
137
140
|`-e DNSPLUGIN=cloudflare`| Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `google`, `inwx`, `linode`, `luadns`, `nsone`, `ovh`, `rfc2136`, `route53` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
138
141
|`-e PROPAGATION=`| Optionally override (in seconds) the default propagation time for the dns plugins. |
139
142
|`-e DUCKDNSTOKEN=`| Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org|
@@ -187,7 +190,7 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel
187
190
*`--cap-add=NET_ADMIN` is required for fail2ban to modify iptables
188
191
* If you need a dynamic dns provider, you can use the free provider duckdns.org where the `URL` will be `yoursubdomain.duckdns.org` and the `SUBDOMAINS` can be `www,ftp,cloud` with http validation, or `wildcard` with dns validation.
189
192
* After setup, navigate to `https://yourdomain.url` to access the default homepage (http access through port 80 is disabled by default, you can enable it by editing the default site config at `/config/nginx/site-confs/default`).
190
-
* Certs are checked nightly and if expiration is within 30 days, renewal is attempted. If your cert is about to expire in less than 30 days, check the logs under `/config/log/letsencrypt` to see why the renewals have been failing. It is recommended to input your e-mail in docker parameters so you receive expiration notices from letsencrypt in those circumstances.
193
+
* Certs are checked nightly and if expiration is within 30 days, renewal is attempted. If your cert is about to expire in less than 30 days, check the logs under `/config/log/letsencrypt` to see why the renewals have been failing. It is recommended to input your e-mail in docker parameters so you receive expiration notices from Let's Encrypt in those circumstances.
191
194
### Security and password protection
192
195
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
193
196
* The container provides a pre-generated 4096-bit dhparams.pem (rotated weekly via [Jenkins job](https://ci.linuxserver.io/blue/organizations/jenkins/Xtras-Builders-Etc%2Fdhparams-uploader/activity)) for new instances, however you may generate your own by running `docker exec letsencrypt openssl dhparam -out /config/nginx/dhparams.pem 4096` WARNING: This takes a very long time
@@ -204,10 +207,10 @@ This will *ask* Google et al not to index and list your site. Be careful with th
204
207
### Using certs in other containers
205
208
* This container includes auto-generated pfx and private-fullchain-bundle pem certs that are needed by other apps like Emby and Znc.
206
209
* To use these certs in other containers, do either of the following:
207
-
1.*(Easier)* Mount the letsencrypt config folder in other containers (ie. `-v /path-to-le-config:/le-ssl`) and in the other containers, use the cert location `/le-ssl/keys/letsencrypt/`
210
+
1.*(Easier)* Mount the container's config folder in other containers (ie. `-v /path-to-le-config:/le-ssl`) and in the other containers, use the cert location `/le-ssl/keys/letsencrypt/`
208
211
2.*(More secure)* Mount the letsencrypt folder `etc/letsencrypt` that resides under `/config` in other containers (ie. `-v /path-to-le-config/etc/letsencrypt:/le-ssl`) and in the other containers, use the cert location `/le-ssl/live/<your.domain.url>/` (This is more secure because the first method shares the entire letsencrypt config folder with other containers, including the www files, whereas the second method only shares the ssl certs)
209
212
* These certs include:
210
-
1.`cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by letsencrypt and used by nginx and various other apps
213
+
1.`cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Let's Encrypt and used by nginx and various other apps
211
214
2.`privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)
212
215
3.`priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC
213
216
### Using fail2ban
@@ -217,9 +220,9 @@ This will *ask* Google et al not to index and list your site. Be careful with th
217
220
3. nginx-botsearch
218
221
* To enable or disable other jails, modify the file `/config/fail2ban/jail.local`
219
222
* To modify filters and actions, instead of editing the `.conf` files, create `.local` files with the same name and edit those because .conf files get overwritten when the actions and filters are updated. `.local` files will append whatever's in the `.conf` files (ie. `nginx-http-auth.conf` --> `nginx-http-auth.local`)
220
-
* You can check which jails are active via `docker exec -it letsencrypt fail2ban-client status`
221
-
* You can check the status of a specific jail via `docker exec -it letsencrypt fail2ban-client status <jail name>`
222
-
* You can unban an IP via `docker exec -it letsencrypt fail2ban-client set <jail name> unbanip <IP>`
223
+
* You can check which jails are active via `docker exec -it swag fail2ban-client status`
224
+
* You can check the status of a specific jail via `docker exec -it swag fail2ban-client status <jail name>`
225
+
* You can unban an IP via `docker exec -it swag fail2ban-client set <jail name> unbanip <IP>`
223
226
* A list of commands can be found here: https://www.fail2ban.org/wiki/index.php/Commands
224
227
225
228
@@ -231,10 +234,10 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
231
234
232
235
## Support Info
233
236
234
-
* Shell access whilst the container is running: `docker exec -it letsencrypt /bin/bash`
235
-
* To monitor the logs of the container in realtime: `docker logs -f letsencrypt`
237
+
* Shell access whilst the container is running: `docker exec -it swag /bin/bash`
238
+
* To monitor the logs of the container in realtime: `docker logs -f swag`
236
239
* container version number
237
-
*`docker inspect -f '{{ index .Config.Labels "build_version" }}' letsencrypt`
240
+
*`docker inspect -f '{{ index .Config.Labels "build_version" }}' swag`
238
241
* image version number
239
242
*`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/letsencrypt`
240
243
@@ -246,17 +249,17 @@ Below are the instructions for updating containers:
246
249
247
250
### Via Docker Run/Create
248
251
* Update the image: `docker pull linuxserver/letsencrypt`
249
-
* Stop the running container: `docker stop letsencrypt`
250
-
* Delete the container: `docker rm letsencrypt`
252
+
* Stop the running container: `docker stop swag`
253
+
* Delete the container: `docker rm swag`
251
254
* Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
252
-
* Start the new container: `docker start letsencrypt`
255
+
* Start the new container: `docker start swag`
253
256
* You can also remove the old dangling images: `docker image prune`
254
257
255
258
### Via Docker Compose
256
259
* Update all images: `docker-compose pull`
257
-
* or update a single image: `docker-compose pull letsencrypt`
260
+
* or update a single image: `docker-compose pull swag`
258
261
* Let compose update all containers as necessary: `docker-compose up -d`
259
-
* or update a single container: `docker-compose up -d letsencrypt`
262
+
* or update a single container: `docker-compose up -d swag`
260
263
* You can also remove the old dangling images: `docker image prune`
261
264
262
265
### Via Watchtower auto-updater (especially useful if you don't remember the original parameters)
@@ -265,7 +268,7 @@ Below are the instructions for updating containers:
265
268
docker run --rm \
266
269
-v /var/run/docker.sock:/var/run/docker.sock \
267
270
containrrr/watchtower \
268
-
--run-once letsencrypt
271
+
--run-once swag
269
272
```
270
273
271
274
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.
@@ -293,6 +296,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
293
296
294
297
## Versions
295
298
299
+
***28.07.20:** - Start transition to new name, SWAG.
296
300
***17.06.20:** - Reformat ssl.conf. Pull in pre-generated dhparams.pem from DO Spaces. Deprecate `DHLEVEL` param.
297
301
***01.06.20:** - Rebasing to alpine 3.12, change ldap login address to `/ldaplogin` to avoid clashes (existing users need to manually update).
298
302
***31.05.20:** - Tweak Authelia confs (existing users can delete `authelia-server.conf` and `authelia-location.conf`, and restart to update).
@@ -382,9 +386,9 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
382
386
***13.03.18:** - Support for wildcard cert with dns validation added. Switched to v2 api for ACME.
383
387
***21.02.18:** - Reduce shellcheck directives by renaming secondary variables
***01.02.18:** - Big changes. `VALIDATION` parameter added for choosing letsencrypt validation methods, including dns through official plugins. `HTTPVAL` is deprecated. `STAGING` parameter added for testing. Backwards compatibility for the short term. Since tls-sni is disabled by letsencrypt, most users will have to change their settings and adopt the new parameters within the next 90 days. Reorganized the nginx default config, split ssl settings into new ssl.conf
389
+
***01.02.18:** - Big changes. `VALIDATION` parameter added for choosing certbot validation methods, including dns through official plugins. `HTTPVAL` is deprecated. `STAGING` parameter added for testing. Backwards compatibility for the short term. Since tls-sni is disabled by letsencrypt, most users will have to change their settings and adopt the new parameters within the next 90 days. Reorganized the nginx default config, split ssl settings into new ssl.conf
386
390
***13.01.18:** - Re-enable ipv6 due to update to fail2ban 0.10.1. Existing users can enable ipv6 by deleting `/config/fail2ban/action.d/iptables-common.local` and restarting the container after updating the image
387
-
***11.01.18:** - Halt the container if validation fails instead of a stop (so restart=always doesn't get users throttled with letsencrypt)
391
+
***11.01.18:** - Halt the container if validation fails instead of a stop (so restart=always doesn't get users throttled with Let's Encrypt)
388
392
***10.01.18:** - Add option for http validation on port 80
0 commit comments