Skip to content

Commit 63554cf

Browse files
Merge pull request #2543 from bunkerity/dev
Road to 1.6.3-rc2
2 parents 2ae529a + 9a2ed36 commit 63554cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2250
-1056
lines changed

docs/assets/img/ui-wizard-step1.png

32.6 KB
Loading
191 KB
Loading

docs/assets/img/ui-wizard-step2.png

19.8 KB
Loading

docs/assets/img/ui-wizard-step3.png

95.4 KB
Loading

docs/assets/img/ui-wizard-step4.png

98.2 KB
Loading

docs/features.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ CrowdSec is a modern, open-source security engine that detects and blocks malici
16121612
- bw-db
16131613

16141614
crowdsec:
1615-
image: crowdsecurity/crowdsec:v1.6.6 # Use the latest version but always pin the version for a better stability/security
1615+
image: crowdsecurity/crowdsec:v1.6.10 # Use the latest version but always pin the version for a better stability/security
16161616
volumes:
16171617
- cs-data:/var/lib/crowdsec/data # To persist the CrowdSec data
16181618
- bw-logs:/var/log:ro # The logs of BunkerWeb for CrowdSec to parse
@@ -4650,6 +4650,7 @@ ROBOTSTXT_SITEMAP: "https://example.com/sitemap.xml"
46504650
---
46514651
46524652
For more information, see the [robots.txt documentation](https://www.robotstxt.org/robotstxt.html).
4653+
46534654
## SSL
46544655
46554656
STREAM support :white_check_mark:

docs/quickstart-guide.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ See the [examples folder](https://github.com/bunkerity/bunkerweb/tree/v1.6.3-rc1
372372
image: bunkerity/bunkerweb-ui:1.6.3-rc1
373373
environment:
374374
<<: *bw-ui-env
375-
TOTP_SECRETS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
375+
TOTP_ENCRYPTION_KEYS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
376376
restart: "unless-stopped"
377377
networks:
378378
- bw-universe
@@ -542,7 +542,7 @@ See the [examples folder](https://github.com/bunkerity/bunkerweb/tree/v1.6.3-rc1
542542
image: bunkerity/bunkerweb-ui:1.6.3-rc1
543543
environment:
544544
<<: *bw-ui-env
545-
TOTP_SECRETS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
545+
TOTP_ENCRYPTION_KEYS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
546546
restart: "unless-stopped"
547547
networks:
548548
- bw-universe
@@ -608,21 +608,51 @@ You should see a setup page just like this one:
608608

609609
Once you're on the setup page, you can enter the **administrator username, email, and password** and click on the "Next" button.
610610

611-
### Configure the Reverse Proxy and HTTPS
611+
### Configure the Reverse Proxy, HTTPS and other advanced settings
612612

613-
The next step will ask you to enter the **server name** (domain/FQDN) that the web UI will use. You can also choose to enable **Let's Encrypt** or use a **custom certificate**.
613+
=== "Basic setup"
614+
615+
The next step will ask you to enter the **server name** (domain/FQDN) that the web UI will use.
616+
617+
You can also choose to enable [Let's Encrypt](features.md#lets-encrypt)
618+
619+
<figure markdown>
620+
![Setup Wizard step 2](assets/img/ui-wizard-step2.png){ align=center }
621+
<figcaption>Setup Wizard step 2</figcaption>
622+
</figure>
623+
624+
=== "Advanced setup"
625+
626+
The next step will ask you to enter the **server name** (domain/FQDN) that the web UI will use.
627+
628+
You can also choose to enable [Let's Encrypt](features.md#lets-encrypt).
629+
630+
If you expand the `Advanced settings` section, you can also configure the following options:
631+
632+
* **Reverse Proxy**: Tweak the Reverse Proxy settings for your administrator interface (e.g., if you want to use a path).
633+
* [Real IP](features.md#real-ip): Configure the Real IP settings to properly identify the client's IP address (e.g., if you are behind a load balancer or a CDN).
634+
* [Custom Certificate](features.md#custom-ssl-certificate): Upload a custom TLS certificate if you don't want to use Let's Encrypt.
635+
636+
<figure markdown>
637+
![Setup Wizard step 2](assets/img/ui-wizard-step2-advanced.png){ align=center }
638+
<figcaption>Setup Wizard step 2 (advanced)</figcaption>
639+
</figure>
640+
641+
### PRO activation
642+
643+
If you have a PRO license, you can activate it by entering your license key in the `Upgrade to PRO` section. This will enable the PRO features of BunkerWeb.
614644

615645
<figure markdown>
616-
![Setup Wizard step 2](assets/img/ui-wizard-step2.png){ align=center }
617-
<figcaption>Setup Wizard step 2</figcaption>
646+
![Setup Wizard PRO step](assets/img/ui-wizard-step3.png){ align=center }
647+
<figcaption>Setup Wizard PRO step</figcaption>
618648
</figure>
619649

620650
### Overview of your settings
621651

622652
The last step will give you an overview of the settings you've entered. You can click on the "Setup" button to complete the setup.
623653

624654
<figure markdown>
625-
![Setup Wizard final step](assets/img/ui-wizard-step3.png){ align=center }
655+
![Setup Wizard final step](assets/img/ui-wizard-step4.png){ align=center }
626656
<figcaption>Setup Wizard final step</figcaption>
627657
</figure>
628658

docs/web-ui.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ To keep the logs accessible from the web UI, we recommend that you use a syslog
165165
DATABASE_URI: "mariadb+pymysql://bunkerweb:changeme@bw-db:3306/db" # Remember to set a stronger password for the database
166166
ADMIN_USERNAME: "changeme"
167167
ADMIN_PASSWORD: "changeme" # Remember to set a stronger password for the admin user
168-
TOTP_SECRETS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
168+
TOTP_ENCRYPTION_KEYS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
169169
volumes:
170170
- bw-logs:/var/log/bunkerweb # This is the volume used to store the logs
171171
restart: "unless-stopped"
@@ -302,7 +302,7 @@ To keep the logs accessible from the web UI, we recommend that you use a syslog
302302
<<: *bw-ui-env
303303
ADMIN_USERNAME: "changeme"
304304
ADMIN_PASSWORD: "changeme" # Remember to set a stronger password for the admin user
305-
TOTP_SECRETS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
305+
TOTP_ENCRYPTION_KEYS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
306306
volumes:
307307
- bw-logs:/var/log/bunkerweb
308308
restart: "unless-stopped"
@@ -451,6 +451,18 @@ Please note that when your username or password is updated, you will be logout f
451451

452452
### Two-Factor authentication
453453

454+
!!! tip "Mandatory encryption keys"
455+
456+
When enabling 2FA, you must provide at least one encryption key. This key will be used to encrypt your TOTP secrets.
457+
458+
The recommended way to generate a valid key is to use the `passlib` package:
459+
460+
```shell
461+
python3 -c "from passlib import totp; print(totp.generate_secret())"
462+
```
463+
464+
Set the generated key in the `TOTP_ENCRYPTION_KEYS` environment variable of the web UI. You can also set multiple keys separated by spaces or as a dictionary (for backward compatibility).
465+
454466
!!! warning "Lost secret key"
455467

456468
In case you lost your secret key, two options are available:
@@ -514,7 +526,7 @@ The web UI can be deployed and configured without going through the setup wizard
514526
- `ADMIN_USERNAME`: username to access the web UI.
515527
- `ADMIN_PASSWORD`: password to access the web UI.
516528
- `FLASK_SECRET`: a secret key used to encrypt the session cookie (if not set, a random key will be generated).
517-
- `TOTP_SECRETS`: a list of TOTP secrets separated by spaces or a dictionary (e.g.: `{"1": "mysecretkey"}` or `mysecretkey` or `mysecretkey mysecretkey1`). **We strongly recommend you to set this variable if you want to use 2FA, as it will be used to encrypt the TOTP secret keys** (if not set, a random number of secret keys will be generated). Check out the [passlib documentation](https://passlib.readthedocs.io/en/stable/narr/totp-tutorial.html#application-secrets) for more information.
529+
- `TOTP_ENCRYPTION_KEYS` (or `TOTP_SECRETS`): a list of TOTP encryption keys separated by spaces or a dictionary (e.g.: `{"1": "mysecretkey"}` or `mysecretkey` or `mysecretkey mysecretkey1`). **We strongly recommend you to set this variable if you want to use 2FA, as it will be used to encrypt the TOTP secret keys** (if not set, a random number of secret keys will be generated). Check out the [passlib documentation](https://passlib.readthedocs.io/en/stable/narr/totp-tutorial.html#application-secrets) for more information.
518530
- `LISTEN_ADDR`: the address where the web UI will listen (default is `0.0.0.0` in **Docker images** and `127.0.0.1` on **Linux installations**).
519531
- `LISTEN_PORT`: the port where the web UI will listen (default is `7000`).
520532
- `MAX_WORKERS`: the number of workers used by the web UI (default is the number of CPUs).
@@ -535,7 +547,7 @@ The web UI can be deployed and configured without going through the setup wizard
535547
python3 -c "import secrets; print(secrets.token_hex(64))"
536548
```
537549

538-
You can generate valid space-separated **TOTP_SECRETS** using the following command (you will need the `passlib` package):
550+
You can generate valid space-separated **TOTP_ENCRYPTION_KEYS** using the following command (you will need the `passlib` package):
539551

540552
```shell
541553
python3 -c "from passlib import totp; print(totp.generate_secret())"
@@ -557,12 +569,12 @@ The web UI can be deployed and configured without going through the setup wizard
557569
```conf
558570
ADMIN_USERNAME=changeme
559571
ADMIN_PASSWORD=changeme
560-
TOTP_SECRETS=mysecret
572+
TOTP_ENCRYPTION_KEYS=mysecret
561573
```
562574

563575
Replace the `changeme` data with your own values.
564576

565-
Remember to set a stronger secret key for the `TOTP_SECRETS`.
577+
Remember to set a stronger secret key for the `TOTP_ENCRYPTION_KEYS`.
566578

567579
Each time you edit the `/etc/bunkerweb/ui.env` file, you will need to restart the service:
568580

@@ -663,7 +675,7 @@ The web UI can be deployed and configured without going through the setup wizard
663675
<<: *ui-env
664676
ADMIN_USERNAME: "changeme"
665677
ADMIN_PASSWORD: "changeme" # Remember to set a stronger password for the changeme user
666-
TOTP_SECRETS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
678+
TOTP_ENCRYPTION_KEYS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
667679
networks:
668680
- bw-universe
669681
- bw-db
@@ -801,7 +813,7 @@ The web UI can be deployed and configured without going through the setup wizard
801813
<<: *ui-env
802814
ADMIN_USERNAME: "changeme"
803815
ADMIN_PASSWORD: "changeme" # Remember to set a stronger password for the changeme user
804-
TOTP_SECRETS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
816+
TOTP_ENCRYPTION_KEYS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
805817
labels:
806818
- "bunkerweb.SERVER_NAME=www.example.com"
807819
- "bunkerweb.USE_TEMPLATE=ui"
@@ -992,7 +1004,7 @@ The web UI can be deployed and configured without going through the setup wizard
9921004
<<: *ui-env
9931005
ADMIN_USERNAME: "changeme"
9941006
ADMIN_PASSWORD: "changeme" # Remember to set a stronger password for the changeme user
995-
TOTP_SECRETS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
1007+
TOTP_ENCRYPTION_KEYS: "mysecret" # Remember to set a stronger secret key (see the Prerequisites section)
9961008
networks:
9971009
- bw-universe
9981010
- bw-db

0 commit comments

Comments
 (0)