Skip to content

Commit fca5dd3

Browse files
committed
docs(readme): finish authentik integration instructions
finish adding integration instructions for Authentik + Traefik and Keeweb
1 parent 0e88891 commit fca5dd3

File tree

1 file changed

+89
-11
lines changed

1 file changed

+89
-11
lines changed

README.md

Lines changed: 89 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ KeeWeb is a browser and desktop password manager which is capable of opening up
4949
- [entryPoints (Normal)](#entrypoints-normal)
5050
- [entryPoints (Cloudflare)](#entrypoints-cloudflare)
5151
- [Authentik Integration](#authentik-integration)
52+
- [Labels](#labels-1)
53+
- [Dynamic.yml](#dynamicyml-1)
5254
- [Env \& Volumes](#env--volumes)
5355
- [Env Variables](#env-variables)
5456
- [Volumes](#volumes)
@@ -257,23 +259,23 @@ http:
257259
routers:
258260
keeweb-http:
259261
service: keeweb
260-
rule: Host(`keeweb.localhost`) || Host(`keeweb.domain.com`)
262+
rule: Host(`keeweb.localhost`) || Host(`keeweb.domain.lan`)
261263
entryPoints:
262264
- http
263265
middlewares:
264266
- https-redirect@file
265267

266268
keeweb-https:
267269
service: keeweb
268-
rule: Host(`keeweb.localhost`) || Host(`keeweb.domain.com`)
270+
rule: Host(`keeweb.localhost`) || Host(`keeweb.domain.lan`)
269271
entryPoints:
270272
- https
271273
tls:
272274
certResolver: cloudflare
273275
domains:
274-
- main: "domain.com"
276+
- main: "domain.lan"
275277
sans:
276-
- "*.domain.com"
278+
- "*.domain.lan"
277279

278280
services:
279281
keeweb:
@@ -429,9 +431,9 @@ entryPoints:
429431
options: default
430432
certResolver: cloudflare
431433
domains:
432-
- main: domain.com
434+
- main: domain.lan
433435
sans:
434-
- '*.domain.com'
436+
- '*.domain.lan'
435437
```
436438

437439
<br />
@@ -487,9 +489,9 @@ In the example below, we will add `forwardedHeaders` -> `trustedIPs` and add all
487489
options: default
488490
certResolver: cloudflare
489491
domains:
490-
- main: domain.com
492+
- main: domain.lan
491493
sans:
492-
- '*.domain.com'
494+
- '*.domain.lan'
493495
```
494496

495497
<br />
@@ -502,7 +504,7 @@ Save the files and then give Traefik and your Keeweb containers a restart.
502504

503505
#### Authentik Integration
504506

505-
If you are adding [Authentik](https://goauthentik.io/) as middleware in the steps above; the last thing you must do is log in to your Authentik admin panel and add a new **Provider** so that we can access Keeweb via your domain.
507+
This section will not explain how to install and set up [Authentik](https://goauthentik.io/). We are only going to cover adding Keeweb integration to Authentik.
506508

507509
<br />
508510

@@ -532,7 +534,7 @@ Add the following provider values:
532534
<br />
533535

534536
Select **Forward Auth (single application)**:
535-
- **External Host**: `https://keeweb.domain.com`
537+
- **External Host**: `https://keeweb.domain.lan`
536538

537539
<br />
538540

@@ -586,7 +588,83 @@ Move `Keeweb (Password Manager)` to the right side **Selected Applications** box
586588

587589
<br />
588590

589-
You should be able to access `keeweb.domain.com` and be prompted now to authenticate with Authentik.
591+
If you followed our [Traefik](#traefik-integration) guide above, you were shown how to add your Keeweb container to Traefik using either the **[dynamic file](#dynamicyml)** or **[labels](#labels)**. Depending on which option you picked, follow that section's guide below.
592+
593+
- For **label** users, go to the section [Labels](#labels-1) below.
594+
- For **dynamic file** users, go to the section [Dynamic File](#dynamicyml-1) below.
595+
596+
<br />
597+
598+
##### Labels
599+
600+
Open your Keeweb's `docker-compose.yml` and modify your labels to include Authentik as a **middleware** by adding `authentik@file` to the label `traefik.http.routers.keeweb-https.middlewares`. You should have something similar to the example below:
601+
602+
```yml
603+
services:
604+
keeweb:
605+
container_name: keeweb
606+
image: ghcr.io/keeweb/keeweb:latest # Github image
607+
# image: keeweb/keeweb:latest # Dockerhub image
608+
restart: unless-stopped
609+
volumes:
610+
- ./keeweb:/config
611+
environment:
612+
- PUID=1000
613+
- PGID=1000
614+
- TZ=Etc/UTC
615+
labels:
616+
617+
# General
618+
- traefik.enable=true
619+
620+
# Router > http
621+
- traefik.http.routers.keeweb-http.rule=Host(`keeweb.localhost`) || Host(`keeweb.domain.lan`)
622+
- traefik.http.routers.keeweb-http.service=keeweb
623+
- traefik.http.routers.keeweb-http.entrypoints=http
624+
- traefik.http.routers.keeweb-http.middlewares=https-redirect@file
625+
626+
# Router > https
627+
- traefik.http.routers.keeweb-https.rule=Host(`keeweb.localhost`) || Host(`keeweb.domain.lan`)
628+
- traefik.http.routers.keeweb-https.service=keeweb
629+
- traefik.http.routers.keeweb-https.entrypoints=https
630+
- traefik.http.routers.keeweb-https.middlewares=authentik@file
631+
- traefik.http.routers.keeweb-https.tls=true
632+
- traefik.http.routers.keeweb-https.tls.certresolver=cloudflare
633+
- traefik.http.routers.keeweb-https.tls.domains[0].main=domain.lan
634+
- traefik.http.routers.keeweb-https.tls.domains[0].sans=*.domain.lan
635+
636+
# Load Balancer
637+
- traefik.http.services.keeweb.loadbalancer.server.port=443
638+
- traefik.http.services.keeweb.loadbalancer.server.scheme=https
639+
```
640+
641+
<br />
642+
643+
##### Dynamic.yml
644+
645+
If you opted to use the [dynamic file](#dynamicyml), open your Traefik's `dynamic.yml` file and apply the `authentik@file` middleware to look something like the following:
646+
647+
<br />
648+
649+
```yml
650+
keeweb-https:
651+
service: keeweb
652+
rule: Host(`keeweb.localhost`) || Host(`keeweb.domain.lan`)
653+
entryPoints:
654+
- https
655+
middlewares:
656+
- authentik@file
657+
tls:
658+
certResolver: cloudflare
659+
domains:
660+
- main: "domain.lan"
661+
sans:
662+
- "*.domain.lan"
663+
```
664+
665+
<br />
666+
667+
After you've done everything above, give your **Traefik** and **Authentik** containers a restart. Once they come back up; you should be able to access `keeweb.domain.lan` and be prompted now to authenticate with Authentik. Once you authenticate, you should be re-directed to your Keeweb home screen which asks you to load a vault file.
590668

591669
<br />
592670

0 commit comments

Comments
 (0)