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
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,9 @@ The architectures supported by this image are:
68
68
> * 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`
69
69
70
70
> 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`.
71
+
71
72
### Validation and initial setup
73
+
72
74
* 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.).
73
75
* For `http` validation, port 80 on the internet side of the router should be forwarded to this container's port 80
74
76
* 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 +81,26 @@ The architectures supported by this image are:
79
81
* 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.
80
82
* 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`).
81
83
* 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.
84
+
82
85
### Security and password protection
86
+
83
87
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
84
88
* 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`.
85
89
* 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>`
86
90
* 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
87
91
* 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.
92
+
88
93
### Site config and reverse proxy
94
+
89
95
* 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.
90
96
* 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).
91
97
* 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
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
94
100
* If you wish to redirect http to https, you must expose port 80
101
+
95
102
### Using certs in other containers
103
+
96
104
* This container includes auto-generated pfx and private-fullchain-bundle pem certs that are needed by other apps like Emby and Znc.
97
105
* To use these certs in other containers, do either of the following:
98
106
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 +109,9 @@ This will *ask* Google et al not to index and list your site. Be careful with th
101
109
1.`cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Certbot and used by nginx and various other apps
102
110
2.`privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)
103
111
3.`priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC
112
+
104
113
### Using fail2ban
114
+
105
115
* This container includes fail2ban set up with 4 jails by default:
106
116
1. nginx-http-auth
107
117
2. nginx-badbots
@@ -113,7 +123,9 @@ This will *ask* Google et al not to index and list your site. Be careful with th
113
123
* You can check the status of a specific jail via `docker exec -it swag fail2ban-client status <jail name>`
114
124
* You can unban an IP via `docker exec -it swag fail2ban-client set <jail name> unbanip <IP>`
115
125
* A list of commands can be found here: https://www.fail2ban.org/wiki/index.php/Commands
126
+
116
127
### Updating configs
128
+
117
129
* This container creates a number of configs for nginx, proxy samples, etc.
118
130
* Config updates are noted in the changelog but not automatically applied to your files.
119
131
* If you have modified a file with noted changes in the changelog:
Copy file name to clipboardExpand all lines: readme-vars.yml
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,9 @@ app_setup_block: |
88
88
> * 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`
89
89
90
90
> 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`.
91
+
91
92
### Validation and initial setup
93
+
92
94
* 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.).
93
95
* For `http` validation, port 80 on the internet side of the router should be forwarded to this container's port 80
94
96
* 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 +101,26 @@ app_setup_block: |
99
101
* 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.
100
102
* 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`).
101
103
* 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.
104
+
102
105
### Security and password protection
106
+
103
107
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
104
108
* 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`.
105
109
* 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>`
106
110
* 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
107
111
* 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.
112
+
108
113
### Site config and reverse proxy
114
+
109
115
* 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.
110
116
* 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).
111
117
* 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
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
114
120
* If you wish to redirect http to https, you must expose port 80
121
+
115
122
### Using certs in other containers
123
+
116
124
* This container includes auto-generated pfx and private-fullchain-bundle pem certs that are needed by other apps like Emby and Znc.
117
125
* To use these certs in other containers, do either of the following:
118
126
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 +129,9 @@ app_setup_block: |
121
129
1. `cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Certbot and used by nginx and various other apps
122
130
2. `privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)
123
131
3. `priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC
132
+
124
133
### Using fail2ban
134
+
125
135
* This container includes fail2ban set up with 4 jails by default:
126
136
1. nginx-http-auth
127
137
2. nginx-badbots
@@ -133,7 +143,9 @@ app_setup_block: |
133
143
* You can check the status of a specific jail via `docker exec -it swag fail2ban-client status <jail name>`
134
144
* You can unban an IP via `docker exec -it swag fail2ban-client set <jail name> unbanip <IP>`
135
145
* A list of commands can be found here: https://www.fail2ban.org/wiki/index.php/Commands
146
+
136
147
### Updating configs
148
+
137
149
* This container creates a number of configs for nginx, proxy samples, etc.
138
150
* Config updates are noted in the changelog but not automatically applied to your files.
139
151
* If you have modified a file with noted changes in the changelog:
0 commit comments