mirror of
https://github.com/linuxserver/docker-swag.git
synced 2026-03-03 00:43:34 +09:00
Compare commits
13 Commits
1.18.0-ls7
...
1.19.0-ls8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73c0dc9084 | ||
|
|
da8f646fc8 | ||
|
|
b309e1ce45 | ||
|
|
10b235cc1d | ||
|
|
9f700b50d9 | ||
|
|
e37e972875 | ||
|
|
e2699a7ee8 | ||
|
|
0aa7ffb50d | ||
|
|
f89d5883d9 | ||
|
|
5c5751255b | ||
|
|
1afac8b5bf | ||
|
|
093fadb043 | ||
|
|
4a6038f334 |
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -510,7 +510,7 @@ pipeline {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
if [ "${MULTIARCH}" == "true" ]; then
|
||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
|
||||
else
|
||||
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
|
||||
@@ -571,7 +571,7 @@ pipeline {
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
echo "Packages were updated. Cleaning up the image and exiting."
|
||||
if [ "${MULTIARCH}" == "true" ]; then
|
||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||
else
|
||||
docker rmi ${IMAGE}:${META_TAG}
|
||||
@@ -595,7 +595,7 @@ pipeline {
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
echo "There are no package updates. Cleaning up the image and exiting."
|
||||
if [ "${MULTIARCH}" == "true" ]; then
|
||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||
else
|
||||
docker rmi ${IMAGE}:${META_TAG}
|
||||
|
||||
32
README.md
32
README.md
@@ -58,17 +58,8 @@ The architectures supported by this image are:
|
||||
|
||||
## Application Setup
|
||||
|
||||
> ### Migrating from the old `linuxserver/letsencrypt` image
|
||||
> * If using docker cli:
|
||||
> * Stop and remove existing container via `docker stop letsencrypt` and `docker rm letsencrypt`
|
||||
> * Create new container using the sample on this page (container name: `swag`, image name: `linuxserver/swag`)
|
||||
> * If using docker compose:
|
||||
> * Edit the compose yaml to change the image to `linuxserver/swag` and change the service and container names to `swag`
|
||||
> * Issue `docker-compose up -d --remove-orphans`
|
||||
> * If you don't want to or can't use the option `--remove-orphans`, then you can first do `docker-compose down`, then edit the compose yaml as above, and then issue `docker-compose up -d`
|
||||
|
||||
> Make sure to also update any references to this container by name. For instance, Nextcloud's `config.php` references this container in its `trusted_proxies` directive, which would have to be updated to `swag`.
|
||||
### Validation and initial setup
|
||||
|
||||
* Before running this container, make sure that the url and subdomains are properly forwarded to this container's host, and that port 443 (and/or 80) is not being used by another service on the host (NAS gui, another webserver, etc.).
|
||||
* For `http` validation, port 80 on the internet side of the router should be forwarded to this container's port 80
|
||||
* For `dns` validation, make sure to enter your credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`
|
||||
@@ -79,20 +70,26 @@ The architectures supported by this image are:
|
||||
* 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.
|
||||
* 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`).
|
||||
* 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.
|
||||
|
||||
### Security and password protection
|
||||
|
||||
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
|
||||
* Per [RFC7919](https://datatracker.ietf.org/doc/html/rfc7919), the container is shipping [ffdhe4096](https://ssl-config.mozilla.org/ffdhe4096.txt) as the `dhparams.pem`.
|
||||
* If you'd like to password protect your sites, you can use htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it swag htpasswd -c /config/nginx/.htpasswd <username>`
|
||||
* You can add multiple user:pass to `.htpasswd`. For the first user, use the above command, for others, use the above command without the `-c` flag, as it will force deletion of the existing `.htpasswd` and creation of a new one
|
||||
* You can also use ldap auth for security and access control. A sample, user configurable ldap.conf is provided, and it requires the separate image [linuxserver/ldap-auth](https://hub.docker.com/r/linuxserver/ldap-auth/) to communicate with an ldap server.
|
||||
|
||||
### Site config and reverse proxy
|
||||
|
||||
* The default site config resides at `/config/nginx/site-confs/default`. Feel free to modify this file, and you can add other conf files to this directory. However, if you delete the `default` file, a new default will be created on container start.
|
||||
* Preset reverse proxy config files are added for popular apps. See the `README.md` file under `/config/nginx/proxy_confs` for instructions on how to enable them. The preset confs reside in and get imported from [this repo](https://github.com/linuxserver/reverse-proxy-confs).
|
||||
* If you wish to hide your site from search engine crawlers, you may find it useful to add this configuration line to your site config, within the server block, above the line where ssl.conf is included
|
||||
`add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";`
|
||||
This will *ask* Google et al not to index and list your site. Be careful with this, as you will eventually be de-listed if you leave this line in on a site you wish to be present on search engines
|
||||
* If you wish to redirect http to https, you must expose port 80
|
||||
|
||||
### Using certs in other containers
|
||||
|
||||
* This container includes auto-generated pfx and private-fullchain-bundle pem certs that are needed by other apps like Emby and Znc.
|
||||
* To use these certs in other containers, do either of the following:
|
||||
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/`
|
||||
@@ -101,7 +98,9 @@ This will *ask* Google et al not to index and list your site. Be careful with th
|
||||
1. `cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Certbot and used by nginx and various other apps
|
||||
2. `privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)
|
||||
3. `priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC
|
||||
|
||||
### Using fail2ban
|
||||
|
||||
* This container includes fail2ban set up with 4 jails by default:
|
||||
1. nginx-http-auth
|
||||
2. nginx-badbots
|
||||
@@ -113,7 +112,9 @@ This will *ask* Google et al not to index and list your site. Be careful with th
|
||||
* You can check the status of a specific jail via `docker exec -it swag fail2ban-client status <jail name>`
|
||||
* You can unban an IP via `docker exec -it swag fail2ban-client set <jail name> unbanip <IP>`
|
||||
* A list of commands can be found here: https://www.fail2ban.org/wiki/index.php/Commands
|
||||
|
||||
### Updating configs
|
||||
|
||||
* This container creates a number of configs for nginx, proxy samples, etc.
|
||||
* Config updates are noted in the changelog but not automatically applied to your files.
|
||||
* If you have modified a file with noted changes in the changelog:
|
||||
@@ -126,6 +127,9 @@ This will *ask* Google et al not to index and list your site. Be careful with th
|
||||
* Proxy sample files WILL be updated, however your renamed (enabled) proxy files will not.
|
||||
* You can check the new sample and adjust your active config as needed.
|
||||
|
||||
### Migration from the old `linuxserver/letsencrypt` image
|
||||
Please follow the instructions [on this blog post](https://www.linuxserver.io/blog/2020-08-21-introducing-swag#migrate).
|
||||
|
||||
## Usage
|
||||
|
||||
Here are some example snippets to help you get started creating a container.
|
||||
@@ -146,8 +150,8 @@ services:
|
||||
- PGID=1000
|
||||
- TZ=Europe/London
|
||||
- URL=yourdomain.url
|
||||
- SUBDOMAINS=www,
|
||||
- VALIDATION=http
|
||||
- SUBDOMAINS=www, #optional
|
||||
- CERTPROVIDER= #optional
|
||||
- DNSPLUGIN=cloudflare #optional
|
||||
- PROPAGATION= #optional
|
||||
@@ -175,8 +179,8 @@ docker run -d \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Europe/London \
|
||||
-e URL=yourdomain.url \
|
||||
-e SUBDOMAINS=www, \
|
||||
-e VALIDATION=http \
|
||||
-e SUBDOMAINS=www, `#optional` \
|
||||
-e CERTPROVIDER= `#optional` \
|
||||
-e DNSPLUGIN=cloudflare `#optional` \
|
||||
-e PROPAGATION= `#optional` \
|
||||
@@ -205,8 +209,8 @@ Container images are configured using parameters passed at runtime (such as thos
|
||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
|
||||
| `-e URL=yourdomain.url` | Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns). |
|
||||
| `-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) |
|
||||
| `-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`). |
|
||||
| `-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) |
|
||||
| `-e CERTPROVIDER=` | Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt. |
|
||||
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `ionos`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
|
||||
| `-e PROPAGATION=` | Optionally override (in seconds) the default propagation time for the dns plugins. |
|
||||
@@ -327,6 +331,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **19.09.21:** - Add an optional header to opt out of Google FLoC in `ssl.conf`.
|
||||
* **17.09.21:** - Mark `SUBDOMAINS` var as optional.
|
||||
* **01.08.21:** - Add support for ionos dns validation.
|
||||
* **15.07.21:** - Fix libmaxminddb issue due to upstream change.
|
||||
* **07.07.21:** - Rebase to alpine 3.14.
|
||||
|
||||
@@ -12,7 +12,7 @@ c-client-2007f-r11
|
||||
ca-certificates-20191127-r5
|
||||
ca-certificates-bundle-20191127-r5
|
||||
coreutils-8.32-r2
|
||||
curl-7.78.0-r0
|
||||
curl-7.79.0-r0
|
||||
expat-2.4.1-r0
|
||||
fail2ban-0.11.2-r0
|
||||
freetype-2.10.4-r1
|
||||
@@ -35,13 +35,13 @@ libbz2-1.0.8-r1
|
||||
libc-utils-0.7.2-r3
|
||||
libcap-2.50-r0
|
||||
libcrypto1.1-1.1.1l-r0
|
||||
libcurl-7.78.0-r0
|
||||
libcurl-7.79.0-r0
|
||||
libedit-20210216.3.1-r0
|
||||
libevent-2.1.12-r2
|
||||
libffi-3.3-r2
|
||||
libgcc-10.3.1_git20210424-r2
|
||||
libgcrypt-1.9.3-r0
|
||||
libgd-2.3.2-r0
|
||||
libgcrypt-1.9.4-r0
|
||||
libgd-2.3.2-r1
|
||||
libgpg-error-1.42-r0
|
||||
libice-1.0.10-r0
|
||||
libidn-1.37-r0
|
||||
@@ -94,7 +94,7 @@ musl-utils-1.2.2-r3
|
||||
nano-5.7-r2
|
||||
ncurses-libs-6.2_p20210612-r0
|
||||
ncurses-terminfo-base-6.2_p20210612-r0
|
||||
nettle-3.7.2-r0
|
||||
nettle-3.7.3-r0
|
||||
nghttp2-libs-1.43.0-r0
|
||||
nginx-1.20.1-r3
|
||||
nginx-mod-devel-kit-1.20.1-r3
|
||||
@@ -118,64 +118,64 @@ nginx-mod-stream-geoip2-1.20.1-r3
|
||||
nginx-vim-1.20.1-r3
|
||||
npth-1.6-r0
|
||||
oniguruma-6.9.7.1-r0
|
||||
openssl-1.1.1k-r0
|
||||
openssl-1.1.1l-r0
|
||||
p11-kit-0.23.22-r0
|
||||
pcre-8.44-r0
|
||||
pcre2-10.36-r0
|
||||
perl-5.32.1-r0
|
||||
perl-error-0.17029-r1
|
||||
perl-git-2.32.0-r0
|
||||
php7-7.4.22-r0
|
||||
php7-bcmath-7.4.22-r0
|
||||
php7-bz2-7.4.22-r0
|
||||
php7-common-7.4.22-r0
|
||||
php7-ctype-7.4.22-r0
|
||||
php7-curl-7.4.22-r0
|
||||
php7-dom-7.4.22-r0
|
||||
php7-exif-7.4.22-r0
|
||||
php7-fileinfo-7.4.22-r0
|
||||
php7-fpm-7.4.22-r0
|
||||
php7-ftp-7.4.22-r0
|
||||
php7-gd-7.4.22-r0
|
||||
php7-gmp-7.4.22-r0
|
||||
php7-iconv-7.4.22-r0
|
||||
php7-imap-7.4.22-r0
|
||||
php7-intl-7.4.22-r0
|
||||
php7-json-7.4.22-r0
|
||||
php7-ldap-7.4.22-r0
|
||||
php7-mbstring-7.4.22-r0
|
||||
php7-mysqli-7.4.22-r0
|
||||
php7-mysqlnd-7.4.22-r0
|
||||
php7-opcache-7.4.22-r0
|
||||
php7-openssl-7.4.22-r0
|
||||
php7-pdo-7.4.22-r0
|
||||
php7-pdo_mysql-7.4.22-r0
|
||||
php7-pdo_odbc-7.4.22-r0
|
||||
php7-pdo_pgsql-7.4.22-r0
|
||||
php7-pdo_sqlite-7.4.22-r0
|
||||
php7-pear-7.4.22-r0
|
||||
php7-7.4.23-r0
|
||||
php7-bcmath-7.4.23-r0
|
||||
php7-bz2-7.4.23-r0
|
||||
php7-common-7.4.23-r0
|
||||
php7-ctype-7.4.23-r0
|
||||
php7-curl-7.4.23-r0
|
||||
php7-dom-7.4.23-r0
|
||||
php7-exif-7.4.23-r0
|
||||
php7-fileinfo-7.4.23-r0
|
||||
php7-fpm-7.4.23-r0
|
||||
php7-ftp-7.4.23-r0
|
||||
php7-gd-7.4.23-r0
|
||||
php7-gmp-7.4.23-r0
|
||||
php7-iconv-7.4.23-r0
|
||||
php7-imap-7.4.23-r0
|
||||
php7-intl-7.4.23-r0
|
||||
php7-json-7.4.23-r0
|
||||
php7-ldap-7.4.23-r0
|
||||
php7-mbstring-7.4.23-r0
|
||||
php7-mysqli-7.4.23-r0
|
||||
php7-mysqlnd-7.4.23-r0
|
||||
php7-opcache-7.4.23-r0
|
||||
php7-openssl-7.4.23-r0
|
||||
php7-pdo-7.4.23-r0
|
||||
php7-pdo_mysql-7.4.23-r0
|
||||
php7-pdo_odbc-7.4.23-r0
|
||||
php7-pdo_pgsql-7.4.23-r0
|
||||
php7-pdo_sqlite-7.4.23-r0
|
||||
php7-pear-7.4.23-r0
|
||||
php7-pecl-apcu-5.1.20-r0
|
||||
php7-pecl-igbinary-3.2.4-r0
|
||||
php7-pecl-mailparse-3.1.1-r1
|
||||
php7-pecl-mcrypt-1.0.4-r0
|
||||
php7-pecl-memcached-3.1.5-r2
|
||||
php7-pecl-redis-5.3.4-r0
|
||||
php7-pgsql-7.4.22-r0
|
||||
php7-phar-7.4.22-r0
|
||||
php7-posix-7.4.22-r0
|
||||
php7-session-7.4.22-r0
|
||||
php7-simplexml-7.4.22-r0
|
||||
php7-soap-7.4.22-r0
|
||||
php7-sockets-7.4.22-r0
|
||||
php7-sodium-7.4.22-r0
|
||||
php7-sqlite3-7.4.22-r0
|
||||
php7-tokenizer-7.4.22-r0
|
||||
php7-xml-7.4.22-r0
|
||||
php7-xmlreader-7.4.22-r0
|
||||
php7-xmlrpc-7.4.22-r0
|
||||
php7-xmlwriter-7.4.22-r0
|
||||
php7-xsl-7.4.22-r0
|
||||
php7-zip-7.4.22-r0
|
||||
php7-pgsql-7.4.23-r0
|
||||
php7-phar-7.4.23-r0
|
||||
php7-posix-7.4.23-r0
|
||||
php7-session-7.4.23-r0
|
||||
php7-simplexml-7.4.23-r0
|
||||
php7-soap-7.4.23-r0
|
||||
php7-sockets-7.4.23-r0
|
||||
php7-sodium-7.4.23-r0
|
||||
php7-sqlite3-7.4.23-r0
|
||||
php7-tokenizer-7.4.23-r0
|
||||
php7-xml-7.4.23-r0
|
||||
php7-xmlreader-7.4.23-r0
|
||||
php7-xmlrpc-7.4.23-r0
|
||||
php7-xmlwriter-7.4.23-r0
|
||||
php7-xsl-7.4.23-r0
|
||||
php7-zip-7.4.23-r0
|
||||
pinentry-1.1.1-r0
|
||||
popt-1.18-r0
|
||||
procps-3.3.17-r0
|
||||
|
||||
@@ -32,7 +32,6 @@ param_usage_include_env: true
|
||||
param_env_vars:
|
||||
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
|
||||
- { env_var: "URL", env_value: "yourdomain.url", desc: "Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns)." }
|
||||
- { env_var: "SUBDOMAINS", env_value: "www,", desc: "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)" }
|
||||
- { env_var: "VALIDATION", env_value: "http", desc: "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`)." }
|
||||
param_usage_include_vols: true
|
||||
param_volumes:
|
||||
@@ -50,6 +49,7 @@ cap_add_param_vars:
|
||||
# optional container parameters
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "SUBDOMAINS", env_value: "www,", desc: "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)" }
|
||||
- { env_var: "CERTPROVIDER", env_value: "", desc: "Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt." }
|
||||
- { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `ionos`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." }
|
||||
- { env_var: "PROPAGATION", env_value: "", desc: "Optionally override (in seconds) the default propagation time for the dns plugins." }
|
||||
@@ -78,17 +78,8 @@ optional_block_1_items: ""
|
||||
# application setup block
|
||||
app_setup_block_enabled: true
|
||||
app_setup_block: |
|
||||
> ### Migrating from the old `linuxserver/letsencrypt` image
|
||||
> * If using docker cli:
|
||||
> * Stop and remove existing container via `docker stop letsencrypt` and `docker rm letsencrypt`
|
||||
> * Create new container using the sample on this page (container name: `swag`, image name: `linuxserver/swag`)
|
||||
> * If using docker compose:
|
||||
> * Edit the compose yaml to change the image to `linuxserver/swag` and change the service and container names to `swag`
|
||||
> * Issue `docker-compose up -d --remove-orphans`
|
||||
> * If you don't want to or can't use the option `--remove-orphans`, then you can first do `docker-compose down`, then edit the compose yaml as above, and then issue `docker-compose up -d`
|
||||
|
||||
> Make sure to also update any references to this container by name. For instance, Nextcloud's `config.php` references this container in its `trusted_proxies` directive, which would have to be updated to `swag`.
|
||||
### Validation and initial setup
|
||||
|
||||
* Before running this container, make sure that the url and subdomains are properly forwarded to this container's host, and that port 443 (and/or 80) is not being used by another service on the host (NAS gui, another webserver, etc.).
|
||||
* For `http` validation, port 80 on the internet side of the router should be forwarded to this container's port 80
|
||||
* For `dns` validation, make sure to enter your credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`
|
||||
@@ -99,20 +90,26 @@ app_setup_block: |
|
||||
* 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.
|
||||
* 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`).
|
||||
* 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.
|
||||
|
||||
### Security and password protection
|
||||
|
||||
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
|
||||
* Per [RFC7919](https://datatracker.ietf.org/doc/html/rfc7919), the container is shipping [ffdhe4096](https://ssl-config.mozilla.org/ffdhe4096.txt) as the `dhparams.pem`.
|
||||
* If you'd like to password protect your sites, you can use htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it swag htpasswd -c /config/nginx/.htpasswd <username>`
|
||||
* You can add multiple user:pass to `.htpasswd`. For the first user, use the above command, for others, use the above command without the `-c` flag, as it will force deletion of the existing `.htpasswd` and creation of a new one
|
||||
* You can also use ldap auth for security and access control. A sample, user configurable ldap.conf is provided, and it requires the separate image [linuxserver/ldap-auth](https://hub.docker.com/r/linuxserver/ldap-auth/) to communicate with an ldap server.
|
||||
|
||||
### Site config and reverse proxy
|
||||
|
||||
* The default site config resides at `/config/nginx/site-confs/default`. Feel free to modify this file, and you can add other conf files to this directory. However, if you delete the `default` file, a new default will be created on container start.
|
||||
* Preset reverse proxy config files are added for popular apps. See the `README.md` file under `/config/nginx/proxy_confs` for instructions on how to enable them. The preset confs reside in and get imported from [this repo](https://github.com/linuxserver/reverse-proxy-confs).
|
||||
* If you wish to hide your site from search engine crawlers, you may find it useful to add this configuration line to your site config, within the server block, above the line where ssl.conf is included
|
||||
`add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";`
|
||||
This will *ask* Google et al not to index and list your site. Be careful with this, as you will eventually be de-listed if you leave this line in on a site you wish to be present on search engines
|
||||
* If you wish to redirect http to https, you must expose port 80
|
||||
|
||||
### Using certs in other containers
|
||||
|
||||
* This container includes auto-generated pfx and private-fullchain-bundle pem certs that are needed by other apps like Emby and Znc.
|
||||
* To use these certs in other containers, do either of the following:
|
||||
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/`
|
||||
@@ -121,7 +118,9 @@ app_setup_block: |
|
||||
1. `cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Certbot and used by nginx and various other apps
|
||||
2. `privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)
|
||||
3. `priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC
|
||||
|
||||
### Using fail2ban
|
||||
|
||||
* This container includes fail2ban set up with 4 jails by default:
|
||||
1. nginx-http-auth
|
||||
2. nginx-badbots
|
||||
@@ -133,7 +132,9 @@ app_setup_block: |
|
||||
* You can check the status of a specific jail via `docker exec -it swag fail2ban-client status <jail name>`
|
||||
* You can unban an IP via `docker exec -it swag fail2ban-client set <jail name> unbanip <IP>`
|
||||
* A list of commands can be found here: https://www.fail2ban.org/wiki/index.php/Commands
|
||||
|
||||
### Updating configs
|
||||
|
||||
* This container creates a number of configs for nginx, proxy samples, etc.
|
||||
* Config updates are noted in the changelog but not automatically applied to your files.
|
||||
* If you have modified a file with noted changes in the changelog:
|
||||
@@ -146,11 +147,16 @@ app_setup_block: |
|
||||
* Proxy sample files WILL be updated, however your renamed (enabled) proxy files will not.
|
||||
* You can check the new sample and adjust your active config as needed.
|
||||
|
||||
### Migration from the old `linuxserver/letsencrypt` image
|
||||
Please follow the instructions [on this blog post](https://www.linuxserver.io/blog/2020-08-21-introducing-swag#migrate).
|
||||
|
||||
app_setup_nginx_reverse_proxy_snippet: false
|
||||
app_setup_nginx_reverse_proxy_block: ""
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "19.09.21:", desc: "Add an optional header to opt out of Google FLoC in `ssl.conf`." }
|
||||
- { date: "17.09.21:", desc: "Mark `SUBDOMAINS` var as optional." }
|
||||
- { date: "01.08.21:", desc: "Add support for ionos dns validation." }
|
||||
- { date: "15.07.21:", desc: "Fix libmaxminddb issue due to upstream change." }
|
||||
- { date: "07.07.21:", desc: "Rebase to alpine 3.14." }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/ssl.conf
|
||||
## Version 2021/09/19 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/ssl.conf
|
||||
|
||||
### Mozilla Recommendations
|
||||
# generated 2020-06-17, Mozilla Guideline v5.4, nginx 1.18.0-r0, OpenSSL 1.1.1g-r0, intermediate configuration
|
||||
@@ -38,6 +38,7 @@ ssl_early_data on;
|
||||
# Optional additional headers
|
||||
#add_header Cache-Control "no-transform" always;
|
||||
#add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'";
|
||||
#add_header Permissions-Policy "interest-cohort=()";
|
||||
#add_header Referrer-Policy "same-origin" always;
|
||||
#add_header X-Content-Type-Options "nosniff" always;
|
||||
#add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
|
||||
Reference in New Issue
Block a user